-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (156 loc) · 5.02 KB
/
Copy pathpyproject.toml
File metadata and controls
175 lines (156 loc) · 5.02 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
[project]
name = "pyflexplot"
description = "PyFlexPlot - Visualize and post-process FLEXPART dispersion simulation results stored in NetCDF format"
readme = "README.md"
requires-python = ">=3.13,<3.14"
authors = [
{ name = "Stefan Ruedisuehli", email = "stefan.ruedisuehli@env.ethz.ch" },
]
maintainers = [
{ name = "Pirmin Kaufmann", email = "pirmin.kaufmann@meteoswiss.ch" },
]
keywords = ["COSMO", "Dispersion", "Flexpart", "mapping", "visualization"]
dynamic = ["classifiers", "version"]
dependencies = [
"PyYAML (>=6.0.3,<7.0.0)",
"boto3 (>=1.43.41,<2.0.0)",
"botocore (>=1.43.41,<2.0.0)",
"cartopy (>=0.25.0,<0.26.0)",
"click (>=8.4.2,<9.0.0)",
"geopy (>=2.4.1,<3.0.0)",
"matplotlib (>=3.11.0,<4.0.0)",
"netCDF4 (>=1.7.4,<2.0.0)",
"numpy (>=2.5.1,<3.0.0)",
"pydantic-settings (>=2.14.2,<3.0.0)",
"pydantic (>=2.13.4,<3.0.0)",
"pypdf (>=6.14.2,<7.0.0)",
"pyshp (>=3.1.4,<4.0.0)",
"scipy (>=1.18.0,<2.0.0)",
"shapely (>=2.1.2,<3.0.0)",
"toml (>=0.10.2,<0.11.0)",
"typing-extensions (>=4.16.0,<5.0.0)",
]
[project.urls]
documentation = "https://github.io/MeteoSwiss-APN/pyflexplot"
repository = "https://github.com/MeteoSwiss-APN/pyflexplot"
[project.scripts]
crop-netcdf = "srtools.crop_netcdf:main"
pyflexplot = "pyflexplot.cli.cli:cli"
[dependency-groups]
dev = [
{ include-group = "lint" },
{ include-group = "test" },
]
lint = [
"black (>=26.5.1,<27.0.0)",
"boto3-stubs (>=1.43.41,<2.0.0)",
"botocore-stubs (>=1.43.14,<2.0.0)",
"codespell (>=2.4.2,<3.0.0)",
"flake8 (>=7.3.0,<8.0.0)",
"mypy (>=2.1.0,<3.0.0)",
"pylint (>=4.0.6,<5.0.0)",
"ruff (>=0.15.20,<0.16.0)",
"scipy-stubs (>=1.18.0.0,<2.0.0.0)",
"types-pyyaml (>=6.0.12.20260518,<7.0.0)",
"types-setuptools (>=83.0.0.20260706,<84.0.0)",
"types-shapely (>=2.1.0.20260630,<3.0.0.0)",
"types-toml (>=0.10.8.20260518,<0.11.0.0)",
]
test = [
"moto[s3] (>=5.2.2,<6.0.0)",
"pytest-cov (>=7.1.0,<8.0.0)",
"pytest (>=9.1.1,<10.0.0)",
]
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.codespell]
ignore-words-list = "ende,ue,fo,activ,nd,feld"
skip = "requirements/*,*.pdf,environment.yml"
[tool.coverage.run]
# To prevent the following error we exclude netCDF4 sources from the coverage report
# No source for code: '/src/app-root/src/netCDF4/_netCDF4.pyx'; see https://coverage.readthedocs.io/en/7.14.3/messages.html#error-no-source
omit = ["*/netCDF4/*"]
[tool.flake8]
max-line-length = 88
# max-complexity = 10
ignore = [
"E203", # Allow whitespace before ':' (https://github.com/PyCQA/pycodestyle/issues/373)
"F811", # Allow redefinition of unused name (necessary for typing.overload)
"I002", # Don't check for isort configuration
"W503", # Allow line break before binary operator (PEP 8-compatible)
]
per-file-ignores = [
"__init__.py: F401", # Allow unused imports
]
[tool.mypy]
disable_error_code = ["annotation-unchecked"]
warn_unused_ignores = true
files = ["src", "tests", "various"]
exclude = [
"ref_.*\\.py$" # exclude generated python reference files
]
[[tool.mypy.overrides]]
# Note: Only globally ignore missing imports as a matter of last resort!
# See https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
module = [
# Add external modules w/o type hints here
"cartopy.*",
]
ignore_missing_imports = true
[tool.poetry]
requires-poetry = ">=2.0,<3.0"
packages = [
{ include = "pyflexplot", from = "src" },
{ include = "srtools", from = "src" },
{ include = "srutils", from = "src" },
{ include = "words", from = "src" },
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
]
version = "0.0.0" # DO NOT SET. The version of the package is always set by the CI/CD pipeline using mchbuild tasks.
[[tool.poetry.source]]
name = "pypi-meteoswiss"
url = "https://service.meteoswiss.ch/nexus/repository/python-all/simple"
priority = "primary"
[[tool.poetry.source]]
name = "pypi-mch-publish"
# only hub entrypoint can be used for publishing libraries (accessible from CI/CD server)
url = "https://hub.meteoswiss.ch/nexus/repository/python-mch/"
priority = "explicit"
[tool.pylint.master]
disable = [
"C0114", # missing-module-docstring
"C0115", # missing-class-docstring
"C0116", # missing-function-docstring
"R0801", # duplications are already covered by SonarQube
"W0511", # fix me or to-do comments are already covered by SonarQube
]
[tool.pylint.basic]
argument-naming-style = "any"
attr-naming-style = "any"
max-args = 8
max-positional-arguments = 8
[tool.pylint.format]
max-line-length = 120
[tool.pylint.design]
# Minimum number of public methods for a class (see R0903).
min-public-methods = 0
[tool.pytest.ini_options]
addopts = [
"-s",
"-ra",
"--pdbcls=IPython.terminal.debugger:TerminalPdb",
"--tb=short",
]
pythonpath = "src"
testpaths = ["tests"]
[tool.ruff]
line-length = 120
# Exclude the reference files from formatting and checking
extend-exclude = ["tests/**/ref_*.py"]