forked from zarr-developers/pydantic-zarr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
256 lines (229 loc) · 6.48 KB
/
Copy pathpyproject.toml
File metadata and controls
256 lines (229 loc) · 6.48 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
250
251
252
253
254
255
256
[build-system]
requires = ["hatchling>=1.28.0", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pydantic-zarr"
dynamic = ["version"]
description = 'Pydantic models for the Zarr file format'
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.12"
license = "MIT"
keywords = ["zarr", "pydantic"]
authors = [{ name = "Davis Bennett", email = "davis.v.bennett@gmail.com" }]
maintainers = [{ name = "David Stansby" }]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = ["pydantic>=2.10", "numpy>=2.0.0", "packaging>=21.0"]
[project.urls]
Documentation = "https://pydantic-zarr.readthedocs.io/"
Issues = "https://github.com/zarr-developers/pydantic-zarr/issues"
Source = "https://github.com/zarr-developers/pydantic-zarr"
[project.optional-dependencies]
zarr = ["zarr>=3.0.0"]
[dependency-groups]
test-base = [
"coverage",
"pytest==9.1.0",
"pytest-cov",
"pytest-examples",
"xarray==2025.10.0",
"dask==2025.11.0",
]
test = [
{include-group = "test-base"},
"pydantic-zarr[zarr]",
]
docs = [
{include-group = "test-base"},
"mkdocs-material",
"mkdocstrings[python]",
"pytest-examples",
"pydantic==2.12.*",
"zarr>=3.1.0",
"towncrier",
]
dev = [
{include-group = "test"},
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/pydantic_zarr/_version.py"
[tool.hatch.envs.test]
dependency-groups = ["test"]
dependencies = [
"zarr~={matrix:zarr}",
]
[tool.hatch.envs.test.scripts]
test = "pytest tests/test_pydantic_zarr/"
test-cov = "pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src tests/test_pydantic_zarr"
list-env = "pip list"
[[tool.hatch.envs.test.matrix]]
python = ["3.12", "3.13", "3.14"]
zarr = ["3.0.10", "3.1.0"]
[tool.hatch.envs.test-base]
dependency-groups = ["test-base"]
[tool.hatch.envs.test-base.scripts]
test = "pytest tests/test_pydantic_zarr/"
test-cov = "pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src tests/test_pydantic_zarr"
list-env = "pip list"
[[tool.hatch.envs.test-base.matrix]]
python = ["3.12", "3.13", "3.14"]
[tool.hatch.envs.docs]
dependency-groups = ['docs']
[tool.hatch.envs.docs.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve --watch src"
deploy = "mkdocs gh-deploy"
test = "pytest tests/test_docs"
[tool.hatch.envs.types]
extra-dependencies = ["mypy>=1.0.0", "pydantic"]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/pydantic_zarr tests}"
[tool.coverage.run]
source_pkgs = ["pydantic_zarr", "tests"]
branch = true
parallel = true
omit = ["src/pydantic_zarr/__about__.py"]
[tool.coverage.paths]
pydantic_zarr = ["src/pydantic_zarr", "*/pydantic-zarr/src/pydantic_zarr"]
tests = ["tests", "*/pydantic-zarr/tests"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
[tool.ruff]
line-length = 100
force-exclude = true
extend-exclude = [
".bzr",
".direnv",
".eggs",
".git",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"venv",
"docs",
]
[tool.ruff.lint]
extend-select = [
"ANN", # flake8-annotations
"B", # flake8-bugbear
"EXE", # flake8-executable
"C4", # flake8-comprehensions
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PERF", # Perflint
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RET", # flake8-return
"RSE", # flake8-raise
"RUF",
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TCH", # flake8-type-checking
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"ANN401",
"PT011", # TODO: apply this rule
"PT012", # TODO: apply this rule
"RET505",
"RET506",
"RUF005",
"SIM108",
"TRY003",
"UP038", # https://github.com/astral-sh/ruff/issues/7871
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"UP007"
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**" = ["ANN001", "ANN201", "RUF029", "SIM117", "SIM300"]
[tool.mypy]
python_version = "3.12"
ignore_missing_imports = true
namespace_packages = false
warn_unreachable = true
plugins = "pydantic.mypy"
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
strict = true
# TODO: remove each of these and fix any errors:
disallow_any_generics = false
warn_return_any = false
[tool.pytest.ini_options]
minversion = "7"
xfail_strict = true
testpaths = ["tests"]
log_cli_level = "INFO"
addopts = ["--durations=10", "-ra", "--strict-config", "--strict-markers"]
filterwarnings = [
"error",
# https://github.com/zarr-developers/zarr-python/issues/2948
"ignore:The `order` keyword argument has no effect for Zarr format 3 arrays:RuntimeWarning",
# Because AsyncArray.config is only present in zarr >= 3.1.0, ignore the warning until our
# zarr min version is 3.1.0
"ignore:Use AsyncArray.config instead"
]
[tool.repo-review]
ignore = [
"PC111", # black formatting for docs, not sure if want,
"PC180", # markdown formatter, no thanks
"RTD100", # read the docs, no thanks,
"RTD101", # read the docs, no thanks
"RTD102", # read the docs, no thanks,
"RTD103", # read the docs, no thanks
]
[tool.numpydoc_validation]
# See https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks for list of checks
checks = [
"GL06",
"GL07",
# Currently broken; see https://github.com/numpy/numpydoc/issues/573
# "GL09",
"GL10",
"SS02",
"SS04",
"PR02",
"PR03",
"PR05",
"PR06",
]
[tool.towncrier]
directory = 'changes'
package = 'pydantic_zarr'
package_dir = 'src'
filename = "docs/release-notes.md"
title_format = "## {name} {version} ({project_date})"
issue_format = "[#{issue}](https://github.com/zarr-developers/pydantic-zarr/issues/{issue})"
start_string = "<!-- towncrier release notes start -->\n"