-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
208 lines (187 loc) · 4.61 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
[build-system]
requires = ["hatchling", "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.11"
license = "MIT"
keywords = ["zarr", "pydantic"]
authors = [
{ name = "Davis Bennett", email = "[email protected]" },
]
maintainers = [
{ name = "David Stansby"}
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
"zarr<3",
"pydantic>2.0.0"
]
[project.urls]
Documentation = "https://zarr.dev/pydantic-zarr/"
Issues = "https://github.com/zarr-developers/pydantic-zarr/issues"
Source = "https://github.com/zarr-developers/pydantic-zarr"
[project.optional-dependencies]
test = [
"coverage",
"pytest",
"pytest-cov",
"pytest-examples",
]
docs = [
"mkdocs-material",
"mkdocstrings[python]",
"pytest-examples",
"pydantic==2.6"
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/pydantic_zarr/_version.py"
[tool.hatch.envs.test]
features = ["test"]
[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"
[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13"]
[tool.hatch.envs.docs]
features = ['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",
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**" = ["ANN001", "ANN201", "RUF029", "SIM117", "SIM300"]
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
namespace_packages = false
strict = true
warn_unreachable = true
plugins = "pydantic.mypy"
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
[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"
]
[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
]