-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
263 lines (240 loc) · 6.87 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
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "pyaerocom"
version = "0.26.0.dev0"
authors = [{ name = "MET Norway" }]
description = "pyaerocom model evaluation software"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Topic :: Scientific/Engineering :: Atmospheric Science",
]
requires-python = ">=3.10"
dependencies = [
"aerovaldb>=0.1.1",
"scitools-iris>=3.11.0",
"xarray>=2022.12.0",
"cartopy>=0.21.1",
"matplotlib>=3.7.1",
"matplotlib<3.10.0", # geojsoncontour bug with .collections deprecation in matplotlib, see #1462
"scipy>=1.10.1",
"pandas>=1.5.3",
"numpy>=1.25.0",
"seaborn>=0.12.2",
"dask",
"geonum==1.5.0",
"simplejson",
"requests",
"geocoder_reverse_natural_earth",
"tqdm",
"openpyxl",
"geojsoncontour",
"typer>=0.7.0",
# python < 3.11
'tomli>=2.0.1; python_version < "3.11"',
'importlib-resources>=5.10; python_version < "3.11"',
'typing-extensions>=4.6.1; python_version < "3.11"',
# https://github.com/SciTools/cf-units/issues/218
'cf-units>=3.3.0',
"pydantic>=2.7.1",
"pyproj>=3.0.0",
"pyaro>=0.0.14",
"pooch>=1.7.0",
"psutil>=5.0.0",
]
[project.readme]
file = "README.rst"
content-type = "text/x-rst"
[project.urls]
Homepage = "https://github.com/metno/pyaerocom"
"Bug Tracker" = "https://github.com/metno/pyaerocom/issues"
Documentation = "https://pyaerocom.readthedocs.io"
"Source Code" = "https://github.com/metno/pyaerocom"
[project.optional-dependencies]
docs = [
"sphinx>=7.2.6",
"sphinxcontrib-napoleon",
"sphinx_rtd_theme",
"sphinx-argparse",
"nbsphinx",
]
test = ["pytest>=7.4", "pytest-dependency", "pytest-cov", "packaging"]
lint = ["mypy>=1.5.1", "types-requests", "types-setuptools", "types-simplejson"]
dev = ["pytest-sugar", "pytest-xdist", "pre-commit"]
[project.scripts]
pya = "pyaerocom.scripts.cli:main"
cams2_83 = "pyaerocom.scripts.cams2_83.cli:app"
cams2_83_mos = "pyaerocom.scripts.cams2_83.cli_mos:app"
[tool.flit.sdist]
include = ["LICENSE", "README.*", "pyaerocom_env.yml", "tests"]
exclude = [
".git*",
".pre-commit-config.yaml",
".readthedocs.yaml",
"changelog",
"docs",
"release_checklist.md",
"scripts",
"suppl",
]
[tool.pytest.ini_options]
minversion = "7.4"
log_cli = false
log_cli_level = "WARNING"
addopts = ["--failed-first", "--import-mode=importlib"]
xfail_strict = true
testpaths = ["tests"]
filterwarnings = [
# treat warnings as errors
"error",
"ignore::pytest.PytestUnraisableExceptionWarning",
# except deprecation and future warnings ouside this packege
'ignore::PendingDeprecationWarning:^(?!pyaerocom|tests).*:',
'ignore::DeprecationWarning:^(?!pyaerocom|tests).*:',
'ignore::FutureWarning:^(?!pyaerocom|tests).*:',
# Ignore self-deprecation warnings related to plotting
'ignore:matplotlib based plotting is no longer directly supported. This (function|class) may be removed in future versions\.:DeprecationWarning:(pyaerocom|tests):',
# and not on this list
"ignore:Using DEFAULT_SPHERICAL_EARTH_RADIUS:UserWarning:iris.*:", # Issue #1394
]
[tool.coverage.run]
source = ["pyaerocom"]
omit = [
# not used
"pyaerocom/aeroval/utils.py",
"pyaerocom/io/read_aeronet_invv2.py",
"pyaerocom/io/read_aeronet_sdav2.py",
"pyaerocom/io/read_aeronet_sunv2.py",
"pyaerocom/plugins/gaw/*",
"pyaerocom/extras/satellite_l2/*",
]
[tool.coverage.report]
fail_under = 75
skip_covered = true
exclude_lines = [
"pragma: no cover",
"NotImplementedError",
"abc.ABC",
'if __name__ == "__main__":',
]
[tool.ruff]
include = ["pyproject.toml", "pyaerocom/**/*.py", "tests/**/*.py"]
target-version = "py310"
line-length = 99
extend-exclude = ["pyaerocom-tutorials", "scripts"]
[tool.ruff.lint]
select = ["E", "F", "I002", "UP"]
ignore = ["E402", "E501"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"cli.py" = ["UP007"]
"cli_mos.py" = ["UP007"]
"*/extras/satellite_l2/*.py" = [
"F402", # https://docs.astral.sh/ruff/rules/import-shadowed-by-loop-var/
"F821", # https://docs.astral.sh/ruff/rules/undefined-name/
"F841", # https://docs.astral.sh/ruff/rules/unused-variable/
]
[tool.mypy]
python_version = "3.10"
warn_unused_configs = true
warn_unused_ignores = true
warn_no_return = true
warn_return_any = false
warn_unreachable = true
show_error_codes = true
pretty = true
sqlite_cache = true
exclude = "pyaerocom-tutorials|_build"
[[tool.mypy.overrides]]
module = [
"cartopy.*",
"iris.*",
"matplotlib.*",
"geonum.*",
"geopy.*",
"scipy.*",
"mpl_toolkits.*",
"cf_units",
"geojsoncontour",
"pandas",
"dask",
"seaborn",
"openpyxl",
"tqdm",
"coda",
]
ignore_missing_imports = true
[tool.pylint.messages_control]
disable = "C0330, C0326"
[tool.pylint.format]
max-line-length = 99
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py310, py311, py312, py313, lint, type-check, docs, build
skip_missing_interpreters = True
isolated_build = True
requires =
setuptools >=40.6.0,<=60.9.3
cython > 0.29.15
[testenv]
commands_pre =
python --version
python -m pip freeze --all
commands =
python -m pytest -ra -q {posargs:--cov --no-cov-on-fail}
extras =
test
setenv =
UDUNITS2_XML_PATH=/usr/share/xml/udunits/udunits2-common.xml
deps =
scitools-iris ==3.11.0; python_version < "3.11"
cartopy ==0.21.1; python_version < "3.11"
matplotlib ==3.7.1; python_version < "3.11"
scipy ==1.10.1; python_version < "3.11"
numpy ==1.25.0; python_version < "3.11"
seaborn ==0.12.2; python_version < "3.11"
geonum ==1.5.0; python_version < "3.11"
typer ==0.7.0; python_version < "3.11"
tomli ==2.0.1; python_version < "3.11"
importlib-resources ==5.10; python_version < "3.11"
typing-extensions ==4.6.1; python_version < "3.11"
cf-units ==3.3.0; python_version < "3.11"
pydantic ==2.7.1; python_version < "3.11"
pyaro == 0.0.14; python_version < "3.11"
pooch ==1.7.0; python_version < "3.11"
xarray ==2022.12.0; python_version < "3.11"
pandas ==1.5.3; python_version < "3.11"
[testenv:lint]
skip_install = True
commands =
pre-commit run --all-files --show-diff-on-failure
deps =
pre-commit
[testenv:type-check]
ignore_outcome = True
commands =
mypy pyaerocom/
extras =
lint
[testenv:docs]
commands =
sphinx-build {posargs:-T} docs/ docs/_build/html
extras =
docs
[testenv:build]
commands =
python -m build
deps =
build
"""