-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
205 lines (181 loc) · 5.01 KB
/
pyproject.toml
File metadata and controls
205 lines (181 loc) · 5.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
[project]
name = "pdrtpy"
description = 'PhotoDissociation Region Toolbox (PDRT), astrophysics analysis tools'
readme = "README.rst"
requires-python = ">=3.11"
license = {file = "LICENSE"}
keywords = []
dynamic = ["version"]
authors = [
{ name = "Marc Pound", email = "mpound@umd.edu" },
{ name = "Mark Wolfire", email = "mwolfire@umd.edu" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Topic :: Scientific/Engineering :: Astronomy",
"Intended Audience :: Science/Research",
]
dependencies = [
'astropy>=6.1',
'numpy',
'scipy',
'matplotlib',
'lmfit',
'numdifftools',
'emcee',
'corner',
'mpl-interactions',
'mpl-interactions[jupyter]',
'pandas',
'tqdm',
'dust_extinction'
]
[dependency-groups]
dev = [
"coverage[toml]",
"coverage-badge",
"ipdb",
"myst_nb",
"numpydoc",
"pip-tools",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-xdist",
"pytest-timeout",
"ruff",
"sphinx",
"sphinx-autobuild",
"sphinx-inline-tabs",
"sphinx-book-theme",
"sphinxcontrib-mermaid",
"pdrtpy[all]",
]
[project.optional-dependencies]
nb = [
"jupyter",
"jupyterlab",
"ipympl",
]
all = ["pdrtpy[nb]"]
[project.urls]
Documentation = "https://pdrtpy.readthedocs.io"
Source = "https://github.com/mpound/pdrtpy"
Issues = "https://github.com/mpound/pdrtpy/issues"
[project.scripts]
[tool.hatch.version]
path = "pdrtpy/__init__.py"
[tool.hatch.envs.default]
# By default hatch will effectively do $ pip install dysh[all]
features = ["all"]
# run via: $ hatch run <script>
[tool.hatch.envs.default.scripts]
test = "pytest {args}"
lint = "ruff check . {args}"
lint-all = "ruff check --select ALL {args}"
lint-fix = "ruff check --select ALL --fix {args}"
# hatch run docs serves on localhost:8000
docs = "sphinx-autobuild {root}/docs/source {root}/docs/build -b html {args}"
# hatch run docs-build writes static output
docs-build = "sphinx-build {root}/docs/source {root}/docs/build -b html {args}"
[tool.hatch.envs.test]
# run via: $ hatch run test:<script>
[tool.hatch.envs.test.scripts]
matrix = "pytest {args}"
cov = "pytest --cov-report=xml --cov-config=pyproject.toml --cov=pdrtpy --cov=tests {args}"
# Run tests across all supported version of Python
[[tool.hatch.envs.test.matrix]]
python = ["311", "312", "313", "314"]
[tool.hatch.build.targets.sdist]
include = ["/pdrtpy", "/tests", "/bin"]
exclude = [
"/.github",
"/.gitignore",
"*.swp",
"/attic",
"/build",
"/docs",
"/dist",
"/goals",
"/notebooks",
"/scripts",
]
[tool.hatch.build.targets.wheel]
packages = ["pdrtpy"]
[tool.coverage.run]
branch = true
source = [
"pdrtpy/"
]
parallel = true
omit = [
"*/tests/*",
"test_*.py"
]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.pyright]
reportImplicitStringConcatenation = false
[tool.ruff]
line-length = 120
src = ["pdrtpy"]
extend-exclude = ["*.ipynb", "*.fits"]
[tool.ruff.lint]
select = [
"F", # https://docs.astral.sh/ruff/rules/pyflakes-f
"E", # https://docs.astral.sh/ruff/rules/error-e
"W", # https://docs.astral.sh/ruff/rules/warning-w
"B", # https://docs.astral.sh/ruff/rules/flake8-bugbear-b
"I", # https://docs.astral.sh/ruff/rules/isort-i
"NPY", # https://docs.astral.sh/ruff/rules/numpy-specific-rules-npy
"PD", # https://docs.astral.sh/ruff/rules/pandas-vet-pd
"RUF", # https://docs.astral.sh/ruff/rules/ruff-specific-rules-ruf
"UP", # https://docs.astral.sh/ruff/rules/printf-string-formatting/
"S101", # https://docs.astral.sh/ruff/rules/assert/
"T10", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"PLR5501", # https://docs.astral.sh/ruff/rules/collapsible-else-if/
"PLR2044", # https://docs.astral.sh/ruff/rules/empty-comment/
"G010",
]
fixable = ["ALL"]
ignore = [
"E741", # ambiguous-variable-name
"RUF002", # ambiguous characters
"RUF052", # dummy var used
"PD015", # TODO: This really should be removed
"E501", # line too long TODO: This really should be removed
"NPY002", # https://docs.astral.sh/ruff/rules/numpy-legacy-random/
]
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
# Ignore in all `__init__.py` files
"__init__.py" = ["ALL"]
"**/{tests,docs,tools}/*" = ["E402", "B011", "B017", "S101"]
"test_*.py" = ["E402", "B011", "B017", "S101"] # Allow assert, blind exceptions, etc. in test files
# The stuff in the attic doesn't need to be linted at all
"attic/**" = ["ALL"]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests", "pdrtpy", "docs"]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore:.*do_format.*:RuntimeWarning"
]
addopts = [
"--timeout=300",
]
#markers = []
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"