forked from zarr-developers/zarr-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (160 loc) · 6.37 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (160 loc) · 6.37 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
[build-system]
requires = ["hatchling>=1.29.0", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "zarr-metadata"
dynamic = ["version"]
description = "Spec-defined metadata types, models, and validators for Zarr v2 and v3."
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
license-files = ["LICENSE.txt"]
authors = [
{ name = "Davis Bennett", email = "davis.v.bennett@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
keywords = ["zarr"]
dependencies = [
# >=4.16: first release where `Sentinel` pickles by reference
# (`__reduce__` returns the sentinel's name), so `UNSET` — and any model
# holding it — can cross process boundaries and be deep-copied with its
# singleton identity intact. 4.15 and earlier refuse to pickle sentinels.
"typing_extensions>=4.16",
]
[project.urls]
Homepage = "https://github.com/zarr-developers/zarr-python"
Source = "https://github.com/zarr-developers/zarr-python/tree/main/packages/zarr-metadata"
Issues = "https://github.com/zarr-developers/zarr-python/issues"
Changelog = "https://github.com/zarr-developers/zarr-python/blob/main/packages/zarr-metadata/CHANGELOG.md"
Documentation = "https://zarr-metadata.readthedocs.io/"
[dependency-groups]
test = ["pytest", "pydantic>=2.13", "jsonschema", "hypothesis"]
docs = [
# Pins match the zarr-python docs environment in the repo-root
# pyproject.toml so the two sites render with the same toolchain.
"mkdocs-material==9.7.6",
"mkdocs==1.6.1",
"mkdocstrings==1.0.4",
"mkdocstrings-python==2.0.5",
"griffe-inherited-docstrings==1.1.3",
# mkdocstrings uses ruff to format rendered signatures
"ruff==0.15.20",
]
[tool.hatch.version]
source = "vcs"
tag-pattern = '^zarr_metadata-v(?P<version>.+)$'
# `git_describe_command` ensures we get the zarr_metadata tags instead of latest.
# `local_scheme` strips the git commit info so the appending info is just a counter from latest tag.
# test-pypi doesn't accept git commit info in tags, and the count should be enough to distinguish unique runs.
raw-options = { root = "../..", git_describe_command = "git describe --dirty --tags --long --match zarr_metadata-v*", local_scheme = "no-local-version" }
[tool.hatch.build.targets.wheel]
packages = ["src/zarr_metadata"]
# An allowlist, so nothing that merely happens to sit in the package directory
# — a scratch script, a stray notebook — can ride along in a release. The list
# keeps an sdist self-testing and self-documenting: every fixture this suite
# reads is a JSON file sitting next to the test module that loads it, so
# `/tests` is the whole test dependency, and `/docs` plus `/mkdocs.yml` are a
# self-contained site (mkdocstrings reads `src`, nothing reaches outside the
# package) so `just docs-check` runs from an unpacked sdist too. `changes/`
# and `.readthedocs.yaml` are deliberately absent: towncrier fragments are
# repo bookkeeping, and the RTD config addresses paths from the repo root.
# `pyproject.toml`, `README.md` and `LICENSE.txt` are added by hatchling itself.
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/docs",
"/mkdocs.yml",
"/justfile",
"/CHANGELOG.md",
]
[tool.ruff]
extend = "../../pyproject.toml"
target-version = "py311"
[tool.ruff.lint]
# `Any` defeats the point of a package whose product is precise types, so it
# is banned in annotations here rather than merely discouraged. Use `object`
# for "any value" (the caller must narrow) and the document TypedDicts where
# the shape is known; a genuinely dynamic annotation needs an explicit noqa
# saying why.
extend-select = ["ANN401"]
[tool.pytest.ini_options]
minversion = "7"
testpaths = ["tests"]
xfail_strict = true
addopts = ["-ra", "--strict-config", "--strict-markers"]
filterwarnings = [
"error",
# Pydantic validates these public immutable-shape TypedDicts correctly but
# cannot enforce the type checker's ReadOnly mutation restriction.
"ignore:Items? .* using the `ReadOnly` qualifier.*:UserWarning:pydantic._internal._generate_schema",
]
[tool.numpydoc_validation]
checks = [
"GL10",
"SS04",
"PR02",
"PR03",
"PR05",
"PR06",
]
# CI pins pyright==1.1.404: later versions regress PEP 661 sentinel typing in
# class attributes (microsoft/pyright#11115), which zarr_metadata.model._sentinel
# relies on. Use the same pin locally; unpin when the fix lands.
[tool.pyright]
include = ["src"]
enableExperimentalFeatures = true
typeCheckingMode = "strict"
pythonVersion = "3.11"
[tool.towncrier]
# Fragments for this package live alongside the package source, separate
# from the parent zarr-python `changes/` directory, so a PR touching only
# `packages/zarr-metadata/` produces a release note for this package only.
directory = "changes"
filename = "CHANGELOG.md"
package = "zarr_metadata"
underlines = ["", "", ""]
title_format = "## {version} ({project_date})"
issue_format = "[#{issue}](https://github.com/zarr-developers/zarr-python/pull/{issue})"
start_string = "<!-- towncrier release notes start -->\n"
# Declaring any type replaces towncrier's built-in set, so all five the
# `changes/README.md` menu offers are restated here. They are the defaults
# verbatim except for `misc`, whose `showcontent` towncrier defaults to false:
# a `misc` entry would render as a bare PR link, which tells a reader nothing.
# A change worth a release note is worth a sentence, whatever its category.
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Removals"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Misc"
showcontent = true