-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathpyproject.toml
208 lines (195 loc) · 5.34 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
[project]
name = "asdf"
description = "Python implementation of the ASDF Standard"
readme = 'README.rst'
license = { file = 'LICENSE' }
authors = [{ name = 'The ASDF Developers', email = 'help@stsci.edu' }]
requires-python = '>=3.8'
classifiers = [
"License :: OSI Approved :: BSD License",
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Development Status :: 5 - Production/Stable',
]
dynamic = [
'version',
]
dependencies = [
"asdf-standard>=1.0.1",
"asdf-transform-schemas>=0.3",
"asdf-unit-schemas>=0.1",
"importlib-metadata>=4.11.4",
'importlib_resources>=3; python_version < "3.9"',
"jmespath>=0.6.2",
"jsonschema>=4.0.1",
"numpy>=1.20",
'numpy<1.25,>=1.20; python_version < "3.9"',
"packaging>=19",
"pyyaml>=5.4.1",
"semantic_version>=2.8",
]
[project.optional-dependencies]
all = [
"lz4>=0.10",
]
docs = [
"sphinx-asdf>=0.1.4",
'tomli; python_version < "3.11"',
]
tests = [
"astropy>=5.0.4",
"fsspec[http]>=2022.8.2",
"gwcs>=0.18.3",
"lz4>=0.10",
"psutil",
"pytest>=6",
"pytest-doctestplus",
"pytest-openfiles",
"pytest-remotedata",
]
[project.urls]
'documentation' = 'https://asdf.readthedocs.io/en/stable'
'repository' = 'https://github.com/asdf-format/asdf'
'tracker' = 'https://github.com/asdf-format/asdf/issues'
[project.entry-points]
'asdf.extensions' = {asdf = 'asdf.core._integration:get_extensions'}
'asdf.resource_mappings' = {asdf = 'asdf.core._integration:get_json_schema_resource_mappings'}
asdf_extensions = {builtin = 'asdf.extension._legacy:BuiltinExtension'}
console_scripts = {asdftool = 'asdf.commands.main:main'}
pytest11 = {asdf_schema_tester = 'pytest_asdf.plugin'}
[build-system]
build-backend = 'setuptools.build_meta'
requires = [
"setuptools>=60",
"setuptools_scm[toml]>=3.4",
"wheel",
]
[tool.setuptools.packages.find]
include = ['asdf*', 'pytest_asdf*']
[tool.setuptools.package-data]
'asdf.commands.tests.data' = ["*"]
'asdf.tags.core.tests.data' = ["*"]
'asdf.tests.data' = ["*"]
[tool.setuptools_scm]
write_to = "asdf/_version.py"
[tool.black]
line-length = 120
force-exclude = '''
^/(
(
\.eggs
| \.git
| \.pytest_cache
| \.tox
| asdf/extern
| build
| dist
)/
)
'''
[tool.isort]
profile = "black"
filter_files = true
line_length = 120
extend_skip_glob = ["asdf/extern/*", ".eggs/*", ".tox/*"]
[tool.pytest.ini_options]
testpaths = ['asdf', 'docs']
minversion = 4.6
norecursedirs = ['build', 'docs/_build', 'docs/sphinxext']
doctest_plus = 'enabled'
remote_data_strict = true
open_files_ignore = ['test.fits', 'asdf.fits']
# The asdf.asdftypes module emits a warning on import,
# which pytest trips over during collection:
filterwarnings = [
'error',
'ignore:numpy.ndarray size changed:RuntimeWarning',
]
# Configuration for pytest-doctestplus
text_file_format = 'rst'
addopts = '--color=yes --doctest-rst'
[tool.coverage.run]
omit = [
'asdf/_astropy_init*',
'asdf/conftest*',
'asdf/cython_version*',
'asdf/setup_package*',
'asdf/*/setup_package*',
'asdf/*/*/setup_package*',
'asdf/testing/*',
'asdf/tests/*',
'asdf/*/tests/*',
'asdf/*/*/tests/*',
'asdf/version.*',
'asdf/compat*',
'asdf/extern*',
# And again for running against installed version
'*/asdf/_astropy_init*',
'*/asdf/conftest*',
'*/asdf/cython_version*',
'*/asdf/setup_package*',
'*/asdf/*/setup_package*',
'*/asdf/*/*/setup_package*',
'*/asdf/testing/*',
'*/asdf/tests/*',
'*/asdf/*/tests/*',
'*/asdf/*/*/tests/*',
'*/asdf/version.*',
'*/asdf/compat*',
'*/asdf/extern*',
]
[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 }',
]
[tool.ruff]
target-version = "py38"
line-length = 120
select = ["ALL"]
extend-ignore = [
# Ignored check groups
"C90", # mccabe complexity
"D", # pydocstyle
"ANN", # flake8-annotations
"FBT", # flake8-boolean-trap
"ARG", # flake8-unused-arguments
"DTZ", # flake8-datetimez
"PTH", # flake8-use-pathlib
# Individually ignored checks
"PIE810", # Call `startswith` once with a `tuple`
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"SLF001", # Private member accessed
"TRY002", # Create your own exception
"TRY301", # Abstract raise to an inner function
"TRY400", # Use logging.exception instead of logging.error
]
extend-exclude = ["asdf/extern/*", "docs/*"]
[tool.ruff.per-file-ignores]
"test_*.py" = ["S101"]
"asdf/tests/_helpers.py" = ["S101"]
"compatibility_tests/common.py" = ["S101"]
[tool.flynt]
exclude = ["asdf/extern/*"]
[tool.codespell]
skip="*.pdf,*.fits,*.asdf,.tox,asdf/extern,build,./tags,.git,docs/_build"
ignore-words-list="""
fo,
"""