-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
224 lines (197 loc) · 5.05 KB
/
pyproject.toml
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
[tool.poetry]
name = "astrodata"
version = "0.0.0"
description = "A package for managing astronomical data through a uniform interface"
authors = ["D. J. Teal <[email protected]>", "DRAGONS development team"]
license = "BSD3"
readme = "README.md"
[tool.poetry.urls]
"Homepage" = "https://github.com/GeminiDRSoftware/astrodata/"
"Documentation" = "https://geminidrsoftware.github.io/astrodata/"
"Repository" = "https://github.com/GeminiDRSoftware/astrodata/"
[tool.poetry.dependencies]
python = "^3.10"
astropy = "^6.0.0"
asdf = "^3.1.0"
gwcs = "^0.21.0"
jsonschema = "^4.21.1"
numpy = "^1.26.4"
[tool.poetry.group.dev]
[tool.poetry.group.dev.dependencies]
ruff = "^0.5.6"
coverage = "^7.4.4"
isort = "^5.13.2"
pre-commit = "^3.6.2"
xenon = "^0.9.1"
tomlkit = "^0.13.0"
[tool.poetry.group.docs]
[tool.poetry.group.docs.dependencies]
sphinx = "^7.2.6"
sphinx-automodapi = "^0.17.0"
sphinx-autoapi = "^3.0.0"
sphinx-rtd-theme = "^2.0.0"
myst-parser = "^2.0.0"
tomli = "^2.0.1"
pygments = "^2.17.2"
[tool.poetry.group.test]
[tool.poetry.group.test.dependencies]
pytest = "^8.1.1"
coverage = "^7.4.4"
pytest-cov = "^4.1.0"
pytest-doctestplus = "^1.2.1"
hypothesis = "^6.99.13"
nox = "^2024.4.15"
watchdog = "^4.0.1"
rst-extract = {git = "https://github.com/teald/rst_extract/"}
[tool.poetry.group.build_test.dependencies]
devpi = "^2.2.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
testpaths = [
"tests",
# "docs/examples", # TODO: placeholder for example testing
]
markers = [
"dragons_remote_data: data used by DRAGONS tests",
"dragons: tests that require a DRAGONS environment",
]
doctest_plus = "enabled"
text_file_format = "rst"
# TODO: addopts = "--doctest-rst --cov=astrodata --cov-report=html"
addopts = "--doctest-rst"
# TODO: plugins = ["pytest_profiling"]
[tool.coverage.run]
omit = [
"astrodata/__init*",
"astrodata/conftest.py",
"astrodata/*setup_package*",
"astrodata/tests/*",
"astrodata/*/tests/*",
"astrodata/extern/*",
"astrodata/version*",
"*/astrodata/__init*",
"*/astrodata/conftest.py",
"*/astrodata/*setup_package*",
"*/astrodata/tests/*",
"*/astrodata/*/tests/*",
"*/astrodata/extern/*",
"*/astrodata/version*",
"_*.py",
]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about packages we have installed
"except ImportError",
# Don't complain if tests don't hit assertions
"raise AssertionError",
"raise NotImplementedError",
# Don't complain about script hooks
"def main(.*):",
# Ignore branches that don't pertain to this version of Python
"pragma: py{ignore_python_version}",
# Don't complain about IPython completion helper
"def _ipython_key_completions_",
# Don't worry about breakpoints (from testing file)
"breakpoint",
]
# TODO: Expand ruff settings
[tool.ruff]
line-length = 79
exclude = [
".*/",
"_build",
"build",
"dist",
"docs",
"tests", # TODO: Need to lint the tests. -- Issue #46
]
include = [
"astrodata",
"noxfile.py",
"tests/script_tests",
]
[tool.ruff.lint]
# select = ["ALL"]
select = ["F", "E", "D", "I"]
# Ruff ignored linting rules:
# These rules are ignored for the entire project. They should be
# used sparingly and only when the rule is not applicable to the
# project as a whole.
#
# For most of these rules, they should be removed from the ignore
# list and the code should be refactored to remove the issue(s).
#
# Some have associated issues that can be found in the project's
# issue tracker
# (https://github.com/GeminiDRSoftware/astrodata/issues)
# + ANN: Annotations
# + B: Bugbear lint rules
# + C: Complexity
# + DTZ003: datetime issue
# + EM: Error messages
# + FIX: FIXME statements
# + N811: Imported constant names
# + PERF: Performance
# + PTH: os.path issue
# + PLR: Refactors
# + PYI024: collections.namedtuple
# + RET504: Return statement with no value
# + RUF: Ruff specific rules
# + SLOT: __slots__ in derived classes
# + SIM: Simplicity
# + SLF001: Private member accessed
# + T201: print statements
# + TD: TODO statements
# + TRY003: string literals in exceptions
ignore = [
"ANN",
"B",
"C",
"DTZ003", # TODO: datetime issue -- Issue #17
"EM",
"FIX", # TODO: Reinstate TODO statements -- Issue #44
"N811",
"PERF",
"PLR",
"PTH", # TODO: os.path issue -- Issue #45
"PYI024",
"RET504",
"RUF",
"SIM",
"SLOT",
"SLF001",
"T201",
"TD", # TODO: Reinstate TODO statements -- Issue #44
"TRY003",
]
[tool.ruff.lint.per-file-ignores]
# Tests should not be worried about:
# + ERA001: Commented out code
# + S101: Use of assert
# + D: Docstring content
# + PLR2004: Magic numbers (false positives at times)
# + SLF001: Private member accessed
# + N: Naming convention
"tests/*" = [
"ERA001",
"S101",
"D",
"PLR2004",
"SLF001",
"N",
]
"astrodata/testing.py" = [
"S101",
"S603",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
[tool.script_tests]
"docs/quickstart.rst" = ""
"docs/manuals/usermanual/intro.rst" = ""