-
Notifications
You must be signed in to change notification settings - Fork 26
/
pyproject.toml
204 lines (173 loc) · 4.92 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
[project]
name = "drizzle"
description = "A package for combining dithered images into a single image"
requires-python = ">=3.10"
authors = [
{ name = "STScI", email = "[email protected]" },
]
dependencies = [
"numpy",
]
dynamic = [
"version",
]
[project.readme]
file = "README.rst"
content-type = "text/x-rst"
[project.license]
file = "LICENSE.rst"
content-type = "text/plain"
[project.urls]
Homepage = "https://github.com/spacetelescope/drizzle"
"Bug Tracker" = "https://github.com/spacetelescope/drizzle/issues"
Documentation = "http://spacetelescope.github.io/drizzle/"
"Source Code" = "https://github.com/spacetelescope/drizzle"
[project.optional-dependencies]
test = [
"astropy",
"pytest",
"pytest-cov",
"pytest-doctestplus",
]
docs = [
"tomli; python_version<'3.11'",
"sphinx",
"sphinx-automodapi",
"sphinx-rtd-theme",
"matplotlib",
"pytest-doctestplus",
]
[build-system]
requires = [
"setuptools>=61.2",
"setuptools_scm[toml]>=3.4",
"numpy>=2.0.0",
]
build-backend = "setuptools.build_meta"
[tool.setuptools]
zip-safe = false
include-package-data = false
[tool.setuptools.packages.find]
namespaces = false
[tool.pytest.ini_options]
minversion = "6"
norecursedirs = [
"build",
"docs/_build",
]
[tool.setuptools_scm]
[tool.ruff]
lint.select = ["ALL"]
line-length = 100
lint.extend-select = [
"F",
"W",
"E",
"C4",
"COM",
]
exclude = [
"docs",
".tox",
".eggs",
"build",
]
lint.ignore = [
# flake8-builtins (A) : shadowing a Python built-in.
# New ones should be avoided and is up to maintainers to enforce.
"A00",
# flake8-annotations (ANN)
"ANN101", # No annotation for `self`.
"ANN102", # No annotation for `cls`.
# flake8-bugbear (B)
"B008", # FunctionCallArgumentDefault
# flake8-commas (COM)
"COM812", # TrailingCommaMissing
"COM819", # TrailingCommaProhibited
# pydocstyle (D)
# Missing Docstrings
"D102", # Missing docstring in public method. Don't check b/c docstring inheritance.
"D105", # Missing docstring in magic method. Don't check b/c class docstring.
# Whitespace Issues
"D200", # FitsOnOneLine
# Docstring Content Issues
"D410", # BlankLineAfterSection. Using D412 instead.
"D400", # EndsInPeriod. NOTE: might want to revisit this.
# pycodestyle (E, W)
"E711", # NoneComparison (see unfixable)
"E741", # AmbiguousVariableName. Physics variables are often poor code variables
# flake8-fixme (FIX)
"FIX002", # Line contains TODO | notes for improvements are OK iff the code works
# pep8-naming (N)
"N803", # invalid-argument-name. Physics variables are often poor code variables
"N806", # non-lowercase-variable-in-function. Physics variables are often poor code variables
# pandas-vet (PD)
"PD",
# flake8-self (SLF)
"SLF001", # private member access
# flake8-todos (TD)
"TD002", # Missing author in TODO
# Ruff-specific rules (RUF)
"RUF005", # unpack-instead-of-concatenating-to-collection-literal -- it's not clearly faster.
"Q000", # Single quotes found but double quotes preferred
]
[tool.ruff.lint.extend-per-file-ignores]
"setup.py" = [
"INP001", # Part of configuration, not a package.
"ICN001",
"UP018"
]
"test_*.py" = [
"B018", # UselessExpression
"D", # pydocstyle
"PGH001", # No builtin eval() allowed
"S101", # Use of assert detected
]
".pyinstaller/*.py" = ["INP001"] # Not a package.
"conftest.py" = ["INP001"] # Part of configuration, not a package.
"docs/*.py" = [
"INP001", # implicit-namespace-package. The examples are not a package.
]
"examples/*.py" = [
"E402", # Imports are done as needed.
"INP001", # implicit-namespace-package. The examples are not a package.
"T203" # pprint found
]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true
mypy-init-return = true
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.flake8-type-checking]
exempt-modules = []
[tool.ruff.lint.isort]
known-first-party = ["astropy", "extension_helpers"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.coverage.run]
omit = [
"drizzle/__init__*",
"drizzle/**/conftest.py",
"drizzle/**/setup*",
"drizzle/**/tests/*",
"drizzle/version*",
"drizzle/_version.py",
"*/drizzle/__init__*",
"*/drizzle/**/conftest.py",
"*/drizzle/**/setup*",
"*/drizzle/**/tests/*",
]
[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 defensive assertion code:
"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}",
]