-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
254 lines (233 loc) · 6.16 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
# pyproject.toml
[build-system]
requires = ["setuptools>=61.0.0", "setuptools_scm[toml]>=6.2", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "gpm_api"
description = "Python Package for the Global Precipitation Measurement (GPM) Mission Data Archive"
readme = "README.md"
authors = [
{ name = "Gionata Ghiggi", email = "gionata.ghiggi@epfl.ch" },
]
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"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.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Hydrology",
"Topic :: Scientific/Engineering :: Image Processing",
]
keywords = ["GPM", "Precipitation", "API", "DPR", "PMW", "IMERG"]
dependencies = [
"xarray",
"xarray-datatree", # to be deprecated as soon datatree in xarray is working
"xoak",
"netcdf4",
"dask",
"distributed",
"tqdm",
"click",
"pyyaml",
"donfig",
"trollsift",
"matplotlib>=3.8.3", # introduce pcolormesh rgb
"cartopy>=0.22.0",
"pyproj",
"numpy",
"pandas",
"scipy",
"pycolorbar>=0.1.0",
]
requires-python = ">=3.9"
dynamic = ["version"]
[project.optional-dependencies]
dev = ["pre-commit", "loghub",
"black[jupyter]", "blackdoc", "codespell", "ruff",
"pytest", "pytest-cov", "pytest-mock", "pytest-check", "pytest-sugar",
"pytest-watcher", "deepdiff",
"pip-tools", "bumpver", "twine", "wheel", "build", "setuptools>=61.0.0",
"ximage", "pyvista", "polars", "pyarrow", "pyresample", "h5py", "xoak", "scikit-learn",
"sphinx", "sphinx-gallery", "sphinx-book-theme", "nbsphinx", "sphinx_mdinclude"]
[project.urls]
homepage = "https://github.com/ghiggi/gpm_api"
repository = "https://github.com/ghiggi/gpm_api"
source = "https://github.com/ghiggi/gpm_api"
tracker = "https://github.com/ghiggi/gpm_api/issues"
documentation = "https://gpm-api.readthedocs.io"
changelog = "https://github.com/ghiggi/gpm_api/blob/main/CHANGELOG.md"
[tool.setuptools_scm]
write_to = "gpm/_version.py"
[tool.setuptools]
license-files = ["LICENSE"]
[tool.setuptools.packages.find]
include = ["gpm*"]
[project.scripts]
download_gpm_daily_data="gpm.scripts.download_gpm_daily_data:download_gpm_daily_data"
download_gpm_monthly_data="gpm.scripts.download_gpm_monthly_data:download_gpm_monthly_data"
download_gpm_files="gpm.scripts.download_gpm_files:download_gpm_files"
[tool.pytest.ini_options]
minversion = "7"
addopts = "-ra --strict-config --strict-markers --cov --cov-report term-missing --cov-report xml --cov-report lcov:lcov.info --check-max-report=10"
xfail_strict = true
# filterwarnings = ["error"]
log_cli_level = "info"
testpaths = [
"gpm/tests",
]
[tool.black]
line-length = 120
# skip-string-normalization = true
target-version = [
"py39",
"py310",
"py311",
]
[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",
# NumPy-specific rules (for 2.0)
"NPY",
#---------------------
#### Future rules ####
# flake8-use-pathlib
# "PTH",
# refurb
# "FURB", # require preview
]
ignore = [
"E722",
"B904",
"B006", # {} defaults in function arguments
"PT011", # pytest raised error must be checked if match the expected error msg
"PERF203",
# "PD011", # suggest values --> to_numpy
"PD901",
"PD013", # suggest melt instead of stack
"PLW2901",
"PLW0603",
"RUF012",
"RUF015",
"RET504",
# Docstyle Rules
"D404", # Docstring can't start with "This"
"D401", # First sentence must be in imperative mood
"D100", "D101","D102", "D103", "D104", "D105", # Missing docstrings
# Complexity rules
"PLR0913", # restrict max number of function argument
"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
"D100", "D101","D102", "D103", "D104", "D105", # Missing docstrings
]
"setup.py" = ["D100"]
"*__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 = "ges,nd"