-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathpyproject.toml
175 lines (159 loc) · 4.97 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
[project]
name = "gwcs"
description = "Generalized World Coordinate System"
requires-python = ">=3.10"
authors = [
{ name = "gwcs developers", email = "[email protected]" },
]
dependencies = [
"asdf >= 3.3.0",
"astropy >= 6.0",
"numpy>=1.24",
"scipy>=1.14.1",
"asdf_wcs_schemas >= 0.4.0",
"asdf-astropy >= 0.5.0",
]
dynamic = [
"version",
]
[project.readme]
file = "README.rst"
content-type = "text/x-rst"
[project.license]
file = "licenses/LICENSE.rst"
content-type = "text/x-rst"
[project.urls]
Homepage = "https://github.com/spacetelescope/gwcs"
Tracker = "https://github.com/spacetelescope/gwcs/issues"
Documentation = "https://gwcs.readthedocs.io/en/stable/"
"Source Code" = "https://github.com/spacetelescope/jwst"
[project.entry-points."asdf.extensions"]
gwcs = "gwcs.extension:get_extensions"
[project.optional-dependencies]
docs = [
"sphinx",
"sphinx-automodapi",
"sphinx-rtd-theme",
"stsci-rtd-theme",
"sphinx-astropy",
"sphinx-asdf",
"tomli; python_version <'3.11'",
]
test = [
"ci-watson>=0.3.0",
"pytest>=8.0.0",
"pytest-astropy>=0.11.0",
]
[build-system]
requires = [
"setuptools>=61.2",
"setuptools_scm[toml]>=3.4",
]
build-backend = "setuptools.build_meta"
[tool.setuptools.package-data]
"gwcs.tests.data" = [
"*",
]
[tool.setuptools.packages.find]
namespaces = false
[tool.build_sphinx]
source-dir = "docs"
build-dir = "docs/_build"
all_files = "1"
[tool.distutils.upload_docs]
upload-dir = "docs/_build/html"
show-response = 1
[tool.pytest.ini_options]
minversion = 8
doctest_plus = true
doctest_rst = true
text_file_format = "rst"
log_cli_level = "INFO"
xfail_strict = true
testpaths = [
"gwcs",
"docs",
]
addopts = [
"-ra",
"--color=yes",
"--doctest-rst",
"--strict-config",
"--strict-markers",
"-p no:legacypath",
]
norecursedirs = [
"build",
"docs/_build",
".tox",
]
filterwarnings = [
"ignore:Models in math_functions:astropy.utils.exceptions.AstropyUserWarning",
"ignore:numpy.ndarray size changed:RuntimeWarning",
]
[tool.coverage.run]
omit = [
"gwcs/tests/test_*",
"gwcs/tags/tests/test_*",
"*/gwcs/tests/test_*",
"*/gwcs/tags/tests/test_*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"except ImportError",
"raise AssertionError",
"raise NotImplementedError",
"def main\\(.*\\):",
"pragma: py{ignore_python_version}",
]
[tool.setuptools_scm]
[tool.ruff.lint]
select = [
"F", # Pyflakes (part of default flake8)
"W", "E", # pycodestyle (part of default flake8)
"I", # isort (import sorting)
"UP", # pyupgrade (upgrade code to modern python)
"YTT", # flake8-2020 (system version info)
#"ANN", # flake8-annotations (best practices for type annotations)
"S", # flake8-bandit (security checks)
"BLE", # flake8-blind-except (prevent blind except statements)
"B", # flake8-bugbear (prevent common gotcha bugs)
"A", # flake8-builtins (prevent shadowing of builtins)
"C4", # flake8-comprehensions (best practices for comprehensions)
"T10", # flake8-debugger (prevent debugger statements in code)
"EM", # flake8-errormessages (best practices for error messages)
"ISC", # flake8-implicit-str-concat (prevent implicit string concat)
"ICN", # flake8-import-conventions (enforce import conventions)
"INP", # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces)
"PIE", # flake8-pie (misc suggested improvement linting)
"T20", # flake8-print (prevent print statements in code)
"PT", # flake8-pytest-style (best practices for pytest)
"Q", # flake8-quotes (best practices for quotes)
"RSE", # flake8-raise (best practices for raising exceptions)
"RET", # flake8-return (best practices for return statements)
"SIM", # flake8-simplify (suggest simplifications to code where possible)
"TID", # flake8-tidy-imports (prevent banned api and best import practices)
"INT", # flake8-gettext (when to use printf style strings)
"PTH", # flake8-use-pathlib (prefer pathlib over os.path)
"ERA", # eradicate (remove commented out code)
"PGH", # pygrep (simple grep checks)
"PL", # pylint (general linting, flake8 alternative)
"TRY", # tryceratops (linting for try/except blocks)
"FLY", # flynt (f-string conversion where possible)
"NPY", # NumPy-specific checks (recommendations from NumPy)
"PERF", # Perflint (performance linting)
"RUF", # ruff specific checks
]
ignore = [
"ISC001", # conflicts with formatter at times
"PLR2004", # magic values (this should be dealt with at some point)
"PLR0912", # Too many branches in function
"PLR0913", # Too many arguments in function
"PLR0915", # Too many statements in function
]
[tool.ruff.lint.extend-per-file-ignores]
"gwcs/tests/*" = ["S101"]
"gwcs/converters/tests/*" = ["S101"]
"docs/conf.py" = ["INP001", "ERA001"]
"convert_schemas.py" = ["PTH"]