-
Notifications
You must be signed in to change notification settings - Fork 38
/
pyproject.toml
229 lines (210 loc) · 5.97 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
[build-system]
requires = [
"setuptools >= 40.6.0",
"setuptools_scm>=6.2",
]
build-backend = "setuptools.build_meta"
[project]
authors = [
{name = "ESMValTool Development Team", email = "[email protected]"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Hydrology",
"Topic :: Scientific/Engineering :: Physics",
]
dynamic = [
"readme",
"version",
]
dependencies = [
"cartopy",
"cf-units",
"dask[array,distributed]!=2024.8.0", # ESMValCore/issues/2503
"dask-jobqueue",
"esgf-pyclient>=0.3.1",
"esmf-regrid>=0.11.0",
"esmpy", # not on PyPI
"filelock",
"fiona",
"fire",
"geopy",
"humanfriendly",
"iris-grib>=0.20.0", # github.com/ESMValGroup/ESMValCore/issues/2535
"isodate>=0.7.0",
"jinja2",
"nc-time-axis", # needed by iris.plot
"nested-lookup",
"netCDF4",
"numpy!=1.24.3,<2.0.0", # avoid pulling 2.0.0rc1
"packaging",
"pandas",
"pillow",
"prov",
"psutil",
"py-cordex",
"pybtex",
"pyyaml",
"requests",
"scipy>=1.6",
"scitools-iris>=3.10.0",
"shapely>=2.0.0",
"stratify>=0.3",
"yamale",
]
description = "A community tool for pre-processing data from Earth system models in CMIP and running analysis scripts"
license = {text = "Apache License, Version 2.0"}
name = "ESMValCore"
requires-python = ">=3.10"
[project.optional-dependencies]
test = [
"pytest>6.0.0",
"pytest-cov>=2.10.1",
"pytest-env",
"pytest-html!=2.1.0",
"pytest-metadata>=1.5.1",
"pytest-mock",
"pytest-xdist",
"ESMValTool_sample_data==0.0.3",
]
doc = [
"autodocsumm>=0.2.2",
"ipython",
"nbsphinx",
"sphinx>=6.1.3",
"pydata_sphinx_theme",
]
develop = [
"esmvalcore[test,doc]",
"pre-commit",
"pylint",
"pydocstyle",
"vprof",
]
[project.scripts]
esmvaltool = "esmvalcore._main:run"
[project.urls]
Code = "https://github.com/ESMValGroup/ESMValCore"
Community = "https://github.com/ESMValGroup/Community"
Documentation = "https://docs.esmvaltool.org"
Homepage = "https://esmvaltool.org"
Issues = "https://github.com/ESMValGroup/ESMValCore/issues"
[tool.setuptools]
include-package-data = true
license-files = ["LICENSE"]
packages = ["esmvalcore"]
zip-safe = false
[tool.setuptools.dynamic]
readme = {file = "README.md", content-type = "text/markdown"}
[tool.setuptools_scm]
version_scheme = "release-branch-semver"
# Configure tests
[tool.pytest.ini_options]
addopts = [
"-ra",
"--strict-config",
"--strict-markers",
"--doctest-modules",
"--ignore=esmvalcore/cmor/tables/",
"--cov-report=xml:test-reports/coverage.xml",
"--cov-report=html:test-reports/coverage_html",
"--html=test-reports/report.html",
]
log_cli_level = "INFO"
env = {MPLBACKEND = "Agg"}
log_level = "WARNING"
minversion = "6"
markers = [
"installation: Test requires installation of dependencies",
"use_sample_data: Run functional tests using real data",
]
testpaths = ["tests"]
xfail_strict = true
[tool.coverage.run]
parallel = true
source = ["esmvalcore"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
# Configure type checks
[tool.mypy]
# See https://mypy.readthedocs.io/en/stable/config_file.html
ignore_missing_imports = true
enable_error_code = [
"truthy-bool",
]
# Configure linters
[tool.codespell]
skip = "*.ipynb,esmvalcore/config/extra_facets/ipslcm-mappings.yml"
ignore-words-list = "vas,hist,oce"
[tool.ruff]
line-length = 79
[tool.ruff.lint]
select = [
"B",
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"ISC001", # pycodestyle
"W", # pycodestyle
]
ignore = [
"E501", # Disable line-too-long as this is taken care of by the formatter.
"D105", # Disable Missing docstring in magic method as these are well defined.
]
[tool.ruff.lint.per-file-ignores]
"tests/**.py" = [
"B011", # `assert False` is valid test code.
# Docstrings in tests are only needed if the code is not self-explanatory.
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
]
[tool.ruff.lint.isort]
known-first-party = ["esmvalcore"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
# Configure linters that are run by Prospector
# TODO: remove once we have enabled all ruff rules for the tools provided by
# Prospector, see https://github.com/ESMValGroup/ESMValCore/issues/2528.
[tool.pylint.main]
jobs = 1 # Running more than one job in parallel crashes prospector.
ignore-paths = [
"doc/conf.py", # Sphinx configuration file
]
[tool.pylint.basic]
good-names = [
"_", # Used by convention for unused variables
"i", "j", "k", # Used by convention for indices
"logger", # Our preferred name for the logger
]
[tool.pylint.format]
max-line-length = 79
[tool.pylint."messages control"]
disable = [
"import-error", # Needed because Codacy does not install dependencies
"file-ignored", # Disable messages about disabling checks
"line-too-long", # Disable line-too-long as this is taken care of by the formatter.
"locally-disabled", # Disable messages about disabling checks
]
[tool.pydocstyle]
convention = "numpy"