-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathpyproject.toml
More file actions
192 lines (185 loc) · 4.73 KB
/
Copy pathpyproject.toml
File metadata and controls
192 lines (185 loc) · 4.73 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"setuptools-scm[toml]>=6.2",
]
[project]
name = "xpublish"
description = "Publish Xarray Datasets via a REST API."
readme = "README.md"
keywords = [
"api",
"xarray",
]
license = { file = "LICENSE" }
maintainers = [
{ name = "Joe Hamman", email = "jhamman@ucar.edu" },
{ name = "Alex Kerney", email = "akerney@gmri.org" },
]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
]
dynamic = [ "version" ]
dependencies = [
"cachey>=0.2.1",
"fastapi>=0.115",
"numpy>=1.26",
"pluggy>=1",
"pydantic>=2.6",
"toolz>=0.12",
"uvicorn>=0.22",
"xarray>=2025.7.1",
]
urls.documentation = "https://xpublish.readthedocs.io/"
urls.repository = "https://github.com/xpublish-community/xpublish"
entry-points."xpublish.plugin".dataset_info = "xpublish.plugins.included.dataset_info:DatasetInfoPlugin"
entry-points."xpublish.plugin".module_version = "xpublish.plugins.included.module_version:ModuleVersionPlugin"
entry-points."xpublish.plugin".plugin_info = "xpublish.plugins.included.plugin_info:PluginInfoPlugin"
[dependency-groups]
dev = [
"fsspec",
# Starlette's TestClient imports httpx2 on recent releases and plain httpx on
# older ones; keep both so the suite runs across the supported fastapi range
# (e.g. the min-deps session pins fastapi to its floor, pulling old starlette).
"httpx",
"httpx2",
"importlib-metadata",
"netcdf4",
"pooch",
"pre-commit",
"pytest>=9",
"pytest-asyncio",
"pytest-cov",
"pytest-mock",
"pytest-sugar",
"requests",
]
docs = [
"autodoc-pydantic==2.2",
"myst-nb",
"pydata-sphinx-theme",
"sphinx<8",
"sphinx-autodoc-typehints",
"sphinx-autosummary-accessors",
"sphinx-design",
"sphinx-github-changelog",
"sphinxcontrib-openapi",
]
[tool.setuptools]
packages = [
"xpublish",
]
[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "dirty-tag"
[tool.ruff]
line-length = 100
format.preview = true
format.quote-style = "single"
lint.extend-select = [
"B", # flake8-bugbear
# "T4",
"B9",
"C",
"D", # pydocstyle
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle
]
lint.ignore = [
"C901",
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"E402",
# "E203",
# "E266",
"E501",
# "W503",
"E722",
]
lint.exclude = [
"docs/",
"tests/",
]
lint.per-file-ignores."docs/*" = [
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
]
lint.per-file-ignores."tests/*" = [
"D103", # Missing docstring in public function
"D205", # blank line between summary and description
"D415", # first line should end with punctuation
]
# Allow fastapi.Depends and other dependency injection style function arguments
lint.flake8-bugbear.extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Path",
"fastapi.Query",
]
lint.flake8-quotes.docstring-quotes = "double"
lint.flake8-quotes.inline-quotes = "single"
lint.isort.combine-as-imports = true
lint.isort.known-first-party = [
"xpublish",
]
lint.isort.known-third-party = [
"cachey",
"fastapi",
"numpy",
"pandas",
"pkg_resources",
"pluggy",
"pydantic",
"pytest",
"setuptools",
"sphinx_autosummary_accessors",
"starlette",
"uvicorn",
"xarray",
]
# Unlike Flake8, default to a complexity level of 10.
lint.mccabe.max-complexity = 18
# Use Google style docstrings
lint.pydocstyle.convention = "google"
[tool.repo-review]
ignore = [
"MY", # MyPy
"GH103", # manual triggerable workflow
"GH212", # Dependabot grouping
"PP309", # pytest filter warnings
"PC140", # mypy in pre-commit
"PC160", # spell checker
"PC170", # pygrep to check RST files
"PC901", # custom pre-commit commit message
"PC902", # custom pre-commit autofix message
]
[tool.pytest]
addopts = [ "--cov=xpublish", "--cov-report=xml", "--verbose", "-ra", "--strict-config", "--strict-markers" ]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
filterwarnings = [
"error",
"ignore:numpy.ndarray size changed:RuntimeWarning",
]
log_cli = true
log_level = "INFO"
minversion = "9"
strict = true
testpaths = [ "tests" ]