forked from Deltares/hydromt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
183 lines (162 loc) · 6.78 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
[build-system]
requires = ["flit_core >=3.4.0,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "hydromt"
authors = [
{ name = "Dirk Eilander", email = "dirk.eilander@deltares.nl" },
{ name = "Hélène Boisgontier", email = "helene.boisgontier@deltares.nl" },
{ name = "Sam Vente", email = "sam.vente@deltares.nl" },
]
dependencies = [
"affine", # Spatial rasterers affine transformations (bbox pixel coalision)
"bottleneck", # Spearmen rank computation
"click", # CLI configuration
"dask", # lazy computing
"fsspec", # general file systems utilities
"geopandas>=0.10", # pandas but geo, wraps fiona and shapely
"importlib_metadata", # entrypoints backport
"mercantile", # tile handling
"netcdf4", # netcfd IO
"numba", # speed up computations (used in e.g. stats)
"numpy>=1.23, <2", # pin necessary to ensure compatability with C headers
"packaging", # compare versions of hydromt
"pandas", # Dataframes
"pooch", # data fetching
"pyarrow<16", # prevents incompat with pandas.
"pydantic~=2.4", # Validation
"pydantic-settings~=2.2", # Settings Management
"pyflwdir>=0.5.4", # Hight models and derivatives
"pyogrio>=0.6", # io for geopandas dataframes
"pyproj", # projections for Coordinate reference systems
"pystac", # STAC integration
"pyyaml", # yaml interface
"rasterio", # raster wrapper around gdal
"requests", # donwload stuff
"rioxarray", # wraps rasterio and xarray. Almost superceded by hydromt/raster.py
"scipy", # scientific utilities
"shapely>=2.0.0", # geometry transforms
"tomli", # parsing toml files
"tomli-w", # writing toml files
"universal_pathlib>=0.2", # provides path compatability between different filesystems
"xarray", # ndim data arrays
"xmltodict", # xml parser also used to read VRT
"xugrid>=0.9.0", # xarray wrapper for mesh processing
"zarr", # zarr
]
requires-python = ">=3.9"
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Hydrology",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
dynamic = ['version', 'description']
[project.optional-dependencies]
io = [
"gcsfs>=2023.12.1", # google cloud file system
"openpyxl", # excel IO
"fastparquet", # parquet IO
"pillow", # image IO
"rio-vrt==0.2.0", # write VRT files
"s3fs", # S3 file system
]
extra = [
"matplotlib", # plotting; required for slippy tiles
"pyet", # calc evapotraspiration, quite well used, used in all wflow models but domain specific
]
dev = [
"flit", # needed to publish to pypi
"pip>=23.1.2", # needed for recursive dependencies
"pre-commit", # linting
"ruff", # linting
"twine", # needed to publish to pypi
]
test = [
"pytest>=8", # testing framework
"pytest-cov", # test coverage
"pytest-mock", # mocking
"pytest-timeout", # darn hanging tests
]
doc = [
"hydromt[examples,extra]", # examples are included in the docs
"nbsphinx", # build notebooks in docs
"pydata-sphinx-theme>=0.15.2", # theme
"sphinx_autosummary_accessors", # doc layout
"sphinx", # build docks
"sphinx_design", # doc layout
"sphinx-click", # click integration
]
examples = [
"cartopy", # plotting examples
"jupyterlab", # run examples in jupyter notebook
"notebook", # jupyter integration
]
full = ["hydromt[io,extra,dev,test,doc,examples]"]
slim = ["hydromt[io,extra,examples]"]
[project.urls]
Documentation = "https://deltares.github.io/hydromt"
Source = "https://github.com/Deltares/hydromt"
[project.scripts]
hydromt = "hydromt.cli.main:main"
[project.entry-points."hydromt.components"]
core = "hydromt.model.components"
[project.entry-points."hydromt.drivers"]
core = "hydromt.data_catalog.drivers"
[project.entry-points."hydromt.models"]
core = "hydromt.model.model"
[project.entry-points."hydromt.catalogs"]
core = "hydromt.data_catalog.predefined_catalog"
[project.entry-points."hydromt.uri_resolvers"]
core = "hydromt.data_catalog.uri_resolvers"
[tool.setuptools.dynamic]
description = { file = "hydromt/__init__.py" }
[tool.ruff]
line-length = 88
target-version = "py39"
exclude = ["docs"]
[tool.ruff.lint]
# enable pydocstyle (E), pyflake (F) and isort (I), pytest-style (PT), bugbear (B)
select = ["E", "F", "I", "PT", "D", "B", "ICN", "TID"]
ignore = ["D211", "D213", "D206", "E501", "E741", "D105", "E712", "B904"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D100", "D101", "D102", "D103", "D104"]
"hydromt/__init__.py" = ["E402", "F401", "F403"]
"hydromt/models/__init__.py" = ["F401"]
"hydromt/_compat.py" = ["F401"]
"tests/conftest.py" = ["E402"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.flit.sdist]
include = ["hydromt"]
exclude = ["docs", "examples", "envs", "tests", "binder", ".github"]
[tool.pytest.ini_options]
addopts = "--ff "
testpaths = ["tests"]
markers = ["integration: marks tests as being integration tests"]
filterwarnings = [
"error",
# "ignore:rasterio.errors.NotGeoreferencedWarning", # upstream issue with rasterio, see https://github.com/rasterio/rasterio/issues/2497
"ignore:Detected a customized `__new__` method in subclass:DeprecationWarning", #upstream error in universal_pathlib see https://github.com/fsspec/universal_pathlib?tab=readme-ov-file#migrating-to-v020
"ignore::ResourceWarning", # upstream issue with aoihttp, can remove once aoihttp 4.0 is stable: https://github.com/aio-libs/aiohttp/issues/5426
"ignore::pytest.PytestUnraisableExceptionWarning", # combine with the above: https://github.com/pytest-dev/pytest/issues/9825
'ignore:pathlib\.Path\.__enter__:DeprecationWarning', # xugrid in python 3.11
# "ignore:Implicit None on return values is deprecated and will raise KeyErrors:DeprecationWarning"
]
[tool.mypy]
# TODO: Re-enable the tests
exclude = ["docs/.*", "tests/.*"]
plugins = ["pydantic.mypy", "numpy.typing.mypy_plugin"]
python_version = "3.9"
ignore_missing_imports = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_equality = true
extra_checks = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true