Skip to content

Commit

Permalink
Merge pull request #100 from torresramiro350/future-proof-hal
Browse files Browse the repository at this point in the history
Adding a pyproject toml file
  • Loading branch information
xiaojieww authored Oct 18, 2024
2 parents fcf2e71 + c7e3f7d commit e7bc0e1
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
101 changes: 101 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "hawc_hal"
version = "1.1"
authors = ["Giacomo Vianello <[email protected]>"]
maintainers = [
"Xiaojie Wang <[email protected]>",
"Ramiro Torres-Escobedo <[email protected]>",
]
description = "HAWC Accelerated Likelihood; Read and handle HAWC data"
license = "BSD-3-Clause"
packages = [{ include = "hawc_hal" }, { include = "scripts" }]

[tool.poetry.urls]
homepage = "https://threeml.readthedocs.io/en/stable/index.html"
repository = "https://github.com/threeML/hawc_hal"
documentation = "https://threeml.readthedocs.io/en/stable/notebooks/hal_example.html"
"Bug Tracker" = "https://github.com/threeML/hawc_hal/issues"

[tool.poetry.dependencies]
python = "^3.8"
numpy = ">=1.14"
healpy = "*"
threeml = "*"
astromodels = "*"
pandas = "*"
pytest = "*"
six = "*"
astropy = "*"
scipy = "*"
matplotlib = "*"
numba = "*"
reproject = "*"
tqdm = "*"
uproot = "*"
awkward = "*"
mplhep = "*"
hist = "*"
ruff = "*"
pyright = "*"


[tool.poetry.scripts]
hdf5tofits = "scripts.hal_hdf5_to_fits:main"
halfitpointsrc = "scripts.hal_fit_point_source:main"

[tool.ruff]
include = [
"pyproject.toml",
"hawc_hal/**/*.py",
"scripts/**/*.py",
"notebooks/**/*.ipynb",
]
exclude = [
"codecov.yml",
"data/*",
"ci/*",
"notebooks",
"tests",
".eggs",
".git",
".git-rewrite",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 88
indent-width = 4
docstring-code-format = false


[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
15 changes: 15 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
line-length = 90
target-version = "py310"
[lint]
select = ["F"]
ignore = ["E501"]

# [lint.isort]
# line-after-imports = 2

[format]
quote-style = "double"
docstring-code-format = true
docstring-code-line-length = 60
skip-magic-trailing-comma = true
# quote-style = "single"

0 comments on commit e7bc0e1

Please sign in to comment.