-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
313 lines (277 loc) · 8.41 KB
/
pyproject.toml
File metadata and controls
313 lines (277 loc) · 8.41 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
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
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "disdrodb"
authors = [
{name = "Gionata Ghiggi"},
]
description = "An open-source python software for standardized processing, sharing, and analysis of disdrometer data."
readme = "README.md"
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Operating System :: OS Independent",
"Operating System :: Unix",
"Operating System :: Microsoft",
"Operating System :: MacOS",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Topic :: Scientific/Engineering :: Atmospheric Science",
]
keywords = ["python", "disdrometer","parsivel", "drop size distribution", "radar", "remote sensing", "precipitation", "rainfall"]
dependencies = [
"click",
"tqdm",
"pooch",
"donfig",
"requests",
"PyYAML",
"trollsift",
"netCDF4",
"pyarrow",
"pandas",
"numpy",
"scipy",
"dask[distributed]",
"xarray",
"numbagg",
"bottleneck",
"flox",
"matplotlib",
"pycolorbar",
]
requires-python = ">=3.11"
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"jupyter",
"pre-commit",
"pytest",
"pydantic>=2.0.0", # requirement? l0/check_configs
"pytest-cov",
"pytest-mock",
"requests-mock",
"setuptools",
"build",
"twine",
"loghub",
]
[project.urls]
Homepage = "https://github.com/ltelab/disdrodb"
Documentation = "https://disdrodb.readthedocs.io"
Repository = "https://github.com/ltelab/disdrodb"
Source = "https://github.com/ltelab/disdrodb"
Issues = "https://github.com/ltelab/disdrodb/issues"
Changelog = "https://github.com/ltelab/disdrodb/blob/main/CHANGELOG.md"
[tool.setuptools_scm]
write_to = "disdrodb/_version.py"
[tool.setuptools.packages.find]
include = ["disdrodb*"]
[project.scripts]
# Initialization
disdrodb_initialize_station="disdrodb.cli.disdrodb_initialize_station:disdrodb_initialize_station"
disdrodb_data_archive_directory="disdrodb.cli.disdrodb_data_archive_directory:disdrodb_data_archive_directory"
disdrodb_metadata_archive_directory="disdrodb.cli.disdrodb_metadata_archive_directory:disdrodb_metadata_archive_directory"
# Metadata archive
disdrodb_download_metadata_archive="disdrodb.cli.disdrodb_download_metadata_archive:disdrodb_download_metadata_archive"
disdrodb_check_metadata_archive="disdrodb.cli.disdrodb_check_metadata_archive:disdrodb_check_metadata_archive"
# Products options
disdrodb_check_products_options="disdrodb.cli.disdrodb_check_products_options:disdrodb_check_products_options"
# Open directories
disdrodb_open_metadata_archive="disdrodb.cli.disdrodb_open_metadata_archive:disdrodb_open_metadata_archive"
disdrodb_open_data_archive="disdrodb.cli.disdrodb_open_data_archive:disdrodb_open_data_archive"
disdrodb_open_logs_directory="disdrodb.cli.disdrodb_open_logs_directory:disdrodb_open_logs_directory"
disdrodb_open_metadata_directory="disdrodb.cli.disdrodb_open_metadata_directory:disdrodb_open_metadata_directory"
disdrodb_open_product_directory="disdrodb.cli.disdrodb_open_product_directory:disdrodb_open_product_directory"
disdrodb_open_readers_directory="disdrodb.cli.disdrodb_open_readers_directory:disdrodb_open_readers_directory"
disdrodb_open_products_options="disdrodb.cli.disdrodb_open_products_options:disdrodb_open_products_options"
# Data transfer
disdrodb_download_archive="disdrodb.cli.disdrodb_download_archive:disdrodb_download_archive"
disdrodb_download_station="disdrodb.cli.disdrodb_download_station:disdrodb_download_station"
disdrodb_upload_archive="disdrodb.cli.disdrodb_upload_archive:disdrodb_upload_archive"
disdrodb_upload_station="disdrodb.cli.disdrodb_upload_station:disdrodb_upload_station"
# Pytmatrix utility
pytmatrix_lut = "disdrodb.cli.pytmatrix_lut:main"
# L0A
disdrodb_run_l0a_station="disdrodb.cli.disdrodb_run_l0a_station:disdrodb_run_l0a_station"
disdrodb_run_l0a="disdrodb.cli.disdrodb_run_l0a:disdrodb_run_l0a"
# L0B
disdrodb_run_l0b_station="disdrodb.cli.disdrodb_run_l0b_station:disdrodb_run_l0b_station"
disdrodb_run_l0b="disdrodb.cli.disdrodb_run_l0b:disdrodb_run_l0b"
# L0C
disdrodb_run_l0c_station="disdrodb.cli.disdrodb_run_l0c_station:disdrodb_run_l0c_station"
disdrodb_run_l0c="disdrodb.cli.disdrodb_run_l0c:disdrodb_run_l0c"
# L0
disdrodb_run_l0_station="disdrodb.cli.disdrodb_run_l0_station:disdrodb_run_l0_station"
disdrodb_run_l0="disdrodb.cli.disdrodb_run_l0:disdrodb_run_l0"
# L1
disdrodb_run_l1_station="disdrodb.cli.disdrodb_run_l1_station:disdrodb_run_l1_station"
disdrodb_run_l1="disdrodb.cli.disdrodb_run_l1:disdrodb_run_l1"
# L2E
disdrodb_run_l2e_station="disdrodb.cli.disdrodb_run_l2e_station:disdrodb_run_l2e_station"
disdrodb_run_l2e="disdrodb.cli.disdrodb_run_l2e:disdrodb_run_l2e"
# L2M
disdrodb_run_l2m_station="disdrodb.cli.disdrodb_run_l2m_station:disdrodb_run_l2m_station"
disdrodb_run_l2m="disdrodb.cli.disdrodb_run_l2m:disdrodb_run_l2m"
# Wrappers
disdrodb_run_station="disdrodb.cli.disdrodb_run_station:disdrodb_run_station"
disdrodb_run="disdrodb.cli.disdrodb_run:disdrodb_run"
# Summary
disdrodb_create_summary_station="disdrodb.cli.disdrodb_create_summary_station:disdrodb_create_summary_station"
disdrodb_create_summary="disdrodb.cli.disdrodb_create_summary:disdrodb_create_summary"
[tool.pytest.ini_options]
addopts = "--cov --cov-report term-missing --cov-report xml --cov-report lcov:lcov.info"
[tool.black]
line-length = 120
preview = true
[tool.ruff]
line-length = 120
indent-width = 4
# Addional file to be formatted by ruff (in addition to *py)
extend-include = ["*.ipynb"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"docs",
"dist",
"node_modules",
"venv",
]
[tool.ruff.format]
# Enable reformatting of code snippets in docstrings.
docstring-code-format = true
[tool.ruff.lint]
select = [
# pydocstyle
"D",
# Pyflakes
"F",
# pycodestyle
"E",
"W",
# isort
"I",
# pyupgrade
"UP",
# flake8-quotes
"Q",
# flake8-bugbear
"B",
# flake8-return
"RET",
# flake8-unused-arguments
"ARG",
# flake8-raise
"RSE",
# flake8-pytest-style
"PT",
# flake8-simplify
"SIM",
# Perflint
"PERF",
# pandas-vet
"PD",
# pylint
"PL",
# flake8-commas
"COM",
# flake8-slots
"SLOT",
# flake8-comprehensions
"C4",
# Ruff custom rules
"RUF"
#---------------------
#### Future rules ####
# flake8-use-pathlib
# "PTH",
# NumPy-specific rules (for 2.0)
# "NPY",
# refurb
# "FURB", # require preview
]
ignore = [
"E722",
"PT011", # pytest raised error must be checked if match the expected error msg
"PT030",
"PERF203",
"PLW2901",
"B904",
"RET504",
# "PD901",
"RUF043",
"PLC0415",
"PLC0206",
"PLW1641",
"RUF059",
# Docstyle Rules
"D100", # Missing docstring in public module
"D404", # Docstring can't start with "This"
"D401", # First sentence must be in imperative mood
# Complexity rules
"PLR0913",
"PLR2004",
"PLR0912",
"PLR0915",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
# Ignore `E402` (import violations) in all Jupyter Notebooks.
"*.ipynb" = ["E402"]
# Rules to ignore in test files
"test_*.py" = [
"ARG", # avoid problems with fixtures
"D101","D102", "D103", "D104", "D105", # Missing docstrings
]
"conftest.py" = [
"D101","D102", "D103", "D104", "D105",
]
"*__init__.py" = ["D104"]
[tool.doc8]
ignore-path = [
"docs/build",
"docs/api/generated",
"docs/_templates",
"docs/tutorials",
"docs/examples",
]
file-encoding = "utf8"
max-line-length = 120
ignore = ["D001"]
[tool.codespell]
ignore-words-list = "nd,mis,thi,thet,ALS"
[tool.coverage.run]
omit = [
"disdrodb/l0/readers/*",
"disdrodb/l0/manuals/*",
]