Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
249 lines (218 loc) · 5.95 KB
/
Copy pathpyproject.toml
File metadata and controls
249 lines (218 loc) · 5.95 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
[project]
name = "asdf"
description = "Python implementation of the ASDF Standard"
readme = "README.rst"
requires-python = ">=3.11"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
authors = [{ name = "The ASDF Developers" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = [
"asdf-standard>=1.1.0",
"importlib-metadata>=4.11.4 ; python_version<='3.11'",
"jmespath>=0.6.2",
"numpy>=1.22",
"packaging>=19",
"pyyaml>=6.0",
"semantic_version>=2.8",
"typing-extensions>=4.16",
# for vendorized jsonschema
"attrs>=22.2.0",
# end of vendorized jsonschema deps
]
dynamic = ["version"]
[project.optional-dependencies]
all = ["asdf[lz4]", "asdf[http]"]
http = ["fsspec[http]>=2022.8.2"]
lz4 = ["lz4>=0.10"]
tests = [
"asdf[all]",
"psutil",
"pytest>=8",
"syrupy>=5.1",
"scipy>=1.12 ; python_version>='3.12'",
]
typing = [
"pyrefly==1.4.0",
"types-PyYAML",
"types-jmespath",
"nox",
"scipy-stubs",
]
benchmark = ["asdf[tests]", "pytest-benchmark"]
test = ["asdf[tests]"]
[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 = { builtin = "asdf.extension._legacy:BuiltinExtension" }
"asdf.extensions" = { asdf = "asdf._core._integration:get_extensions" }
"asdf.resource_mappings" = { asdf = "asdf._core._integration:get_json_schema_resource_mappings" }
[project.scripts]
asdftool = "asdf._commands.main:main"
[dependency-groups]
# Used for S3 integration testing
mocks3 = ["boto", "fsspec", "moto[s3,server]", "s3fs>2023.12.1"]
docs = [
"furo",
"graphviz",
"sphinx-asdf>=0.2.2",
"sphinx-inline-tabs",
"towncrier",
]
[build-system]
requires = ["setuptools>=60", "setuptools_scm[toml]>=8", "wheel"]
build-backend = "setuptools.build_meta"
[tool.uv.dependency-groups]
# In sphinx <9.1 autodoc doesn't work with our documentation
# sphinx >=9.1 is only available on Python >=3.12
docs = { requires-python = ">=3.12" }
[tool.setuptools.packages.find]
include = ["asdf*"]
exclude = ["asdf/_jsonschema/json/*"]
[tool.setuptools.package-data]
"asdf.commands.tests.data" = ["*"]
"asdf.tags.core.tests.data" = ["*"]
"asdf.tests.data" = ["*"]
[tool.setuptools_scm]
version_file = "asdf/_version.py"
version_scheme = "release-branch-semver"
[tool.black]
line-length = 120
force-exclude = '''
^/(
(
\.eggs
| \.git
| \.pytest_cache
| asdf/_extern
| asdf/_jsonschema
| build
| dist
)/
)
'''
[tool.pytest.ini_options]
testpaths = ["asdf", "docs"]
minversion = "4.6"
filterwarnings = [
"error", # also set in _tests/conftest to work with pyargs
"ignore:numpy.ndarray size changed:RuntimeWarning",
"ignore:Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.",
]
addopts = [
"--doctest-modules",
"--doctest-glob=*.rst",
"--color=yes",
"-rsxfE",
"-p no:legacypath",
]
[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*",
"asdf/_jsonschema/**",
# 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*",
"*/asdf/_jsonschema/**",
]
[tool.coverage.report]
exclude_also = [
# 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 = "py311"
line-length = 120
extend-exclude = ["asdf/_extern/*", "asdf/_jsonschema/*", "docs/*"]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 88
[tool.ruff.lint]
future-annotations = true
select = [
# minimal set to match pre-ruff behavior
"E", # pycodestyle
"F", # pyflakes, autoflake
"I", # isort
"S", # bandit
"UP", # pyupgrade
"RUF", # ruff specific, includes yesqa
"TC", # type-checking
]
ignore = [
"S310", # URL open for permitted schemes
"RUF005", # prefer concatenate over add for collections
"RUF012", # mutable-class-default (typing related)
]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["S101"]
"asdf/_tests/_helpers.py" = ["S101"]
"integration_tests/compatibility/common.py" = ["S101"]
[tool.flynt]
exclude = ["asdf/_extern/*", "asdf/_jsonschema/*"]
[tool.codespell]
skip = "*.pdf,*.asdf,asdf/_extern,asdf/_jsonschema,build,./tags,.git,docs/_build"
ignore-words-list = """
fo,afile,
"""
[tool.towncrier]
filename = "CHANGES.rst"
directory = "changes"
package = "asdf"
title_format = "{version} ({project_date})"
ignore = [".gitkeep"]
wrap = true
issue_format = "`#{issue} <https://github.com/asdf-format/asdf/pull/{issue}>`_"
[tool.towncrier.fragment.feature]
[tool.towncrier.fragment.bugfix]
[tool.towncrier.fragment.doc]
[tool.towncrier.fragment.removal]
[tool.towncrier.fragment.general]
[tool.pyrefly]
project-excludes = ["asdf/_jsonschema/"]
search-path = [".", "integration_tests/compatibility"]
baseline = ".pyrefly-baseline.json"
[tool.pyrefly.errors]
bad-override = "warn"
bad-param-name-override = "warn"
# Disable automatic table sorting for pyproject.toml
[[tool.tombi.schemas]]
path = "tombi://www.schemastore.org/pyproject.json"
include = ["pyproject.toml"]
format.rules.table-keys-order.enabled = false