forked from Ouranosinc/xclim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
323 lines (295 loc) · 7.27 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
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
[build-system]
requires = ["flit_core >=3.8,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "xclim"
authors = [
{name = "Travis Logan", email = "logan.travis@ouranos.ca"}
]
maintainers = [
{name = "Trevor James Smith", email = "smith.trevorj@ouranos.ca"},
{name = "Pascal Bourgault", email = "bourgault.pascal@ouranos.ca"}
]
readme = {file = "README.rst", content-type = "text/x-rst"}
requires-python = ">=3.9.0"
keywords = ["xclim", "xarray", "climate", "climatology", "bias correction", "ensemble", "indicators", "analysis"]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Atmospheric Science"
]
dynamic = ["description", "version"]
dependencies = [
"boltons>=20.1",
"bottleneck>=1.3.1",
# cf-xarray is differently named on conda-forge
"cf-xarray>=0.6.1",
"cftime>=1.4.1",
"Click>=8.1",
"dask[array]>=2.6",
"jsonpickle",
"numba",
"numpy>=1.20.0",
"pandas>=2.2",
"pint>=0.10",
"pyarrow", # Strongly encouraged for pandas v2.2.0+
"pyyaml",
"scikit-learn>=0.21.3",
"scipy>=1.9.0",
"statsmodels",
"xarray>=2023.11.0",
"yamale"
]
[project.optional-dependencies]
dev = [
# Dev tools and testing
"black ==24.4.0",
"blackdoc ==0.3.9",
"bump-my-version >=0.17.1",
"codespell",
"coverage[toml]",
"flake8",
"flake8-alphabetize",
"flake8-rst-docstrings",
"h5netcdf",
"ipython",
"isort ==5.13.2",
"mypy",
"nbconvert <7.14", # Pinned due to directive errors in sphinx. See: https://github.com/jupyter/nbconvert/issues/2092
"nbqa",
"nbval",
"netCDF4 >=1.4",
"platformdirs >=3.2",
"pre-commit >=2.9",
"pybtex",
"pylint",
"pytest <8.0", # Pinned due to breakage with xdoctest. See: https://github.com/Erotemic/xdoctest/issues/151
"pytest-cov",
"pytest-socket",
"pytest-xdist[psutil] >=3.2",
"ruff >=0.2.0",
"tokenize-rt",
"tox >=4.0",
# "tox-conda", # Will be added when a tox@v4.0+ compatible plugin is released.
"tox-gh >=1.3.1",
"vulture",
"xdoctest",
"yamllint",
# Documentation and examples
"distributed >=2.0",
"ipykernel",
"matplotlib",
"nbsphinx",
"nc-time-axis",
"pooch",
"sphinx",
"sphinx-autodoc-typehints",
"sphinx-codeautolink",
"sphinx-copybutton",
"sphinx-mdinclude",
"sphinx-rtd-theme >=1.0",
"sphinxcontrib-bibtex",
"sphinxcontrib-svg2pdfconverter[Cairosvg]"
]
[project.scripts]
xclim = "xclim.cli:cli"
[project.urls]
"Homepage" = "https://xclim.readthedocs.io/"
"Source" = "https://github.com/Ouranosinc/xclim/"
"Changelog" = "https://xclim.readthedocs.io/en/stable/history.html"
"Issue tracker" = "https://github.com/Ouranosinc/xclim/issues"
"About Ouranos" = "https://www.ouranos.ca/en/"
[tool]
[tool.black]
target-version = [
"py39",
"py310",
"py311",
"py312"
]
[tool.bumpversion]
current_version = "0.48.3-dev.11"
commit = true
commit_args = "--no-verify"
tag = false
allow_dirty = false
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\-(?P<release>[a-z]+)(\\.(?P<build>\\d+)))?"
serialize = [
"{major}.{minor}.{patch}-{release}.{build}",
"{major}.{minor}.{patch}"
]
[[tool.bumpversion.files]]
filename = "xclim/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""
[tool.bumpversion.parts.build]
independent = false
[tool.bumpversion.parts.release]
optional_value = "release"
values = [
"dev",
"release"
]
[tool.codespell]
skip = 'xclim/data/*.json,docs/_build,docs/notebooks/xclim_training/*.ipynb,docs/references.bib,__pycache__,*.nc,*.png,*.gz,*.whl'
ignore-words-list = "absolue,astroid,bloc,bui,callendar,degreee,environnement,hanel,inferrable,lond,nam,nd,ressources,vas"
[tool.coverage.run]
relative_files = true
omit = ["tests/*.py"]
[tool.flit.sdist]
include = [
"AUTHORS.rst",
"CHANGES.rst",
"CITATION.cff",
"CONTRIBUTING.rst",
"LICENSE",
"Makefile",
"README.rst",
"docs/**/*.gif",
"docs/**/*.jpg",
"docs/**/*.png",
"docs/**/*.rst",
"docs/Makefile",
"docs/conf.py",
"docs/make.bat",
"docs/notebooks/_finder.py",
"requirements_upstream.txt",
"tests/**/*.py",
"tests/**/*.txt",
"tox.ini",
"xclim/**/*.json",
"xclim/**/*.py",
"xclim/**/*.txt",
"xclim/**/*.yml"
]
exclude = [
"**/*.py[co]",
"**/__pycache__",
".*",
"docs/_*",
"docs/modules.rst",
"docs/paper/*",
"docs/xclim*.rst",
"pylintrc"
]
[tool.isort]
profile = "black"
py_version = 39
append_only = true
add_imports = "from __future__ import annotations"
[tool.mypy]
python_version = 3.9
show_error_codes = true
warn_return_any = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = [
"boltons.*",
"bottleneck.*",
"cftime.*",
"clisops.core.subset.*",
"dask.*",
"lmoments3.*",
"matplotlib.*",
"numba.*",
"numpy.*",
"pandas.*",
"pint.*",
"SBCK.*",
"scipy.*",
"sklearn.cluster.*",
"xarray.*",
"yaml.*"
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = [
"--verbose",
"--color=yes",
"--numprocesses=0",
"--maxprocesses=8",
"--dist=worksteal"
]
norecursedirs = ["docs/notebooks/*"]
filterwarnings = ["ignore::UserWarning"]
testpaths = "tests tests/test_sdba"
usefixtures = "xdoctest_namespace"
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL", "NUMBER", "ELLIPSIS"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"requires_docs: mark tests that can only be run with documentation present (deselect with '-m \"not requires_docs\"')",
"requires_internet: mark tests that require internet access (deselect with '-m \"not requires_internet\"')"
]
[tool.ruff]
src = ["xclim"]
line-length = 150
target-version = "py39"
exclude = [
".git",
"docs",
"build",
".eggs"
]
[tool.ruff.format]
line-ending = "auto"
[tool.ruff.lint]
ignore = [
"D205",
"D400",
"D401"
]
select = [
"C9",
"D",
"E",
"F",
"W"
]
[tool.ruff.lint.flake8-bandit]
check-typed-exception = true
[tool.ruff.lint.flake8-import-conventions.aliases]
"matplotlib.pyplot" = "plt"
"xclim.indices" = "xci"
numpy = "np"
pandas = "pd"
scipy = "sp"
xarray = "xr"
[tool.ruff.lint.isort]
known-first-party = ["xclim"]
case-sensitive = true
detect-same-package = false
lines-after-imports = 1
no-lines-before = ["future", "standard-library"]
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.ruff.lint.per-file-ignores]
"docs/*.py" = ["D100", "D101", "D102", "D103"]
"tests/*.py" = ["D100", "D101", "D102", "D103"]
"xclim/**/__init__.py" = ["F401", "F403"]
"xclim/core/indicator.py" = ["D214", "D405", "D406", "D407", "D411"]
"xclim/core/locales.py" = ["E501", "W505"]
"xclim/core/missing" = ["D103"]
"xclim/indices/_agro.py" = ["E501"]
"xclim/indices/fire/_cffwis.py" = ["D103"]
"xclim/sdba/utils.py" = ["D103"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 180
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.vulture]
exclude = []
ignore_decorators = ["@pytest.fixture"]
ignore_names = []
min_confidence = 90
paths = ["xclim", "tests"]
sort_by_size = true