[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",
"bottleneck",
"click",
"dask",
"fsspec[http]",
"geopandas[all]>=0.10",
"importlib_metadata",
"mercantile",
"netcdf4",
"numba",
"numpy",
"packaging",
"pandas",
"pooch",
"pyarrow",
"pydantic~=2.4",
"pydantic-settings~=2.2",
"pyflwdir>=0.5.4",
"pyogrio>=0.6",
"pyproj",
"pystac",
"pyyaml",
"rasterio",
"requests",
"rioxarray",
"scipy",
"shapely>=2.1.0",
"tomli",
"tomli-w",
"universal_pathlib>=0.2",
"xarray",
"xmltodict",
"xugrid>=0.9.0",
"zarr>=3.1,<4",
]
requires-python = ">=3.11"
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",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = ['version', 'description']
[project.optional-dependencies]
io = [
"gcsfs>=2023.12.1",
"fastparquet",
"openpyxl",
"pillow",
"s3fs",
]
vrt = [
"gdal>=3.5.0",
]
extra = [
"matplotlib",
"pyet",
]
dev = [
"flit",
"mypy",
"pandas-stubs",
"pre-commit",
"ruff",
"twine",
"types-openpyxl",
"types-PyYAML",
"types-Pillow",
"types-requests",
"types-xmltodict",
]
test = [
"pytest>=8",
"pytest-cov",
"pytest-mock",
"pytest-timeout",
]
doc = [
"hydromt[examples,extra]",
"nbsphinx",
"pydata-sphinx-theme>=0.15.2",
"sphinx_autosummary_accessors",
"sphinx",
"sphinx_design",
"sphinx-click",
"sbom4python",
"autodoc_pydantic",
]
examples = [
"cartopy",
"jupyterlab",
"notebook",
]
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"
[project.entry-points."hydromt.catalogs"]
core = "hydromt.data_catalog.predefined_catalog"
[project.entry-points."hydromt.uri_resolvers"]
core = "hydromt.data_catalog.uri_resolvers"
[tool.snakedown]
api_content_path = "foo/"
site_root = "bar"
notebook_path = "examples"
notebook_content_path = "user-guide"
pkg_path = "hydromt"
skip_undoc = true
skip_private = false
ssg = "Zola"
exclude = []
[tool.snakedown.externals]
builtins = { name = "Python", url = "https://docs.python.org/3/" }
[tool.snakedown.render.zola]
use_shortcodes = true
[tool.setuptools.dynamic]
description = { file = "hydromt/__init__.py" }
[tool.ruff]
line-length = 88
target-version = "py311"
exclude = ["docs", "hydromt/model/__init__.py"]
[tool.ruff.lint]
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"]
"examples/**" = ["B018", "D103"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.flit.sdist]
include = ["hydromt"]
exclude = ["docs", "examples", "envs", "tests", "binder", ".github"]
[tool.pytest.ini_options]
addopts = ["--ff", "-m", "not manual"]
testpaths = ["tests"]
markers = [
"integration: marks tests as being integration tests",
"manual: marks tests as manual, to be run before release",
]
filterwarnings = [
"error",
"ignore:numpy.ndarray size changed:RuntimeWarning",
"ignore:Detected a customized `__new__` method in subclass:DeprecationWarning",
"ignore::ResourceWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
'ignore:pathlib\.Path\.__enter__:DeprecationWarning',
"ignore:__array_wrap__ must accept context and return_scalar arguments \\(positionally\\) in the future:DeprecationWarning",
'ignore:Python 3.14 will, by default, filter extracted tar archives:DeprecationWarning',
"ignore:'mode' parameter is deprecated and will be removed in Pillow 13:DeprecationWarning",
"ignore:numpy.ndarray size changed:RuntimeWarning",
"ignore:Consolidated metadata is currently not part in the Zarr format 3 specification:UserWarning",
"ignore:Engine 'radolan' loading failed.*:RuntimeWarning",
]
[tool.mypy]
exclude = ["docs/.*", "tests/.*"]
plugins = ["pydantic.mypy", "numpy.typing.mypy_plugin"]
python_version = "3.11"
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
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "win-64"]
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.py313.dependencies]
python = "3.13.*"
[tool.pixi.pypi-dependencies]
hydromt = { path = ".", editable = true }
[tool.pixi.feature.doc.dependencies]
pandoc = "*"
[tool.pixi.feature.io.dependencies]
pyflwdir = ">=0.5.4"
[tool.pixi.feature.vrt.dependencies]
gdal = ">=3.5.0"
[tool.pixi.feature.doc.tasks]
doctest = { cmd = [
"sphinx-build",
"-M",
"doctest",
"docs",
"docs/_build",
"-W",
] }
docs-build = { cmd = [
"sphinx-build",
"-M",
"html",
"docs",
"docs/_build",
"-W",
], depends-on = [
"doctest",
] }
docs-build-notest = { cmd = [
"sphinx-build",
"-M",
"html",
"docs",
"docs/_build",
] }
docs = { depends-on = ["docs-build"] }
doc = { depends-on = ["docs-build"] }
serve = { cmd = ["python", "-m", "http.server", "-d", "docs/_build/html"] }
generate-sbom = { cmd = [
"sbom4python",
"--module",
"hydromt",
"--output-file",
"hydromt-core-sbom.json",
"--sbom",
"spdx",
"--format",
"json",
] }
[tool.pixi.feature.test.tasks]
test = { cmd = ["pytest"] }
test-lf = { cmd = ["pytest", "--lf", "--tb=short"] }
test-err-warn = { cmd = ["pytest", "--tb=short", "-W", "error"] }
test-cov = { cmd = [
"pytest",
"--verbose",
"--cov=hydromt",
"--cov-report=xml",
"--cov-branch",
] }
[tool.pixi.feature.dev.tasks]
install = { depends-on = ["install-pre-commit"] }
install-pre-commit = "pre-commit install"
lint = { cmd = ["pre-commit", "run", "--all"] }
mypy = "mypy ."
pypi = { depends-on = [
"pypi-git-clean",
"pypi-git-restore",
"pypi-flit-build",
"pypi-twine",
] }
pypi-git-clean = { cmd = ["git", "clean", "-xdf"] }
pypi-git-restore = { cmd = ["git", "restore", "-SW", "."] }
pypi-flit-build = { cmd = ["flit", "build"] }
pypi-twine = { cmd = ["python", "-m", "twine", "check", "dist/*"] }
clean = { depends-on = [
"clean-dist",
"clean-docs-generated",
"clean-docs-build",
"clean-docs-examples",
] }
clean-dist = { cmd = ["rm", "-rf", "dist"] }
clean-docs-generated = { cmd = ["rm", "-rf", "docs/_generated"] }
clean-docs-build = { cmd = ["rm", "-rf", "docs/_build"] }
clean-docs-examples = { cmd = ["rm", "-rf", "docs/examples"] }
[tool.pixi.environments]
default = { features = [
"py311",
"io",
"vrt",
"extra",
"dev",
"test",
"doc",
"examples",
], solve-group = "py311" }
full-latest = { features = [
"py313",
"io",
"vrt",
"extra",
"dev",
"test",
"doc",
"examples",
], solve-group = "py313" }
min-latest = { features = ["py313", "test"], solve-group = "py313" }
slim-latest = { features = [
"py313",
"io",
"vrt",
"extra",
"examples",
], solve-group = "py313" }
full-py313 = { features = [
"py313",
"io",
"vrt",
"extra",
"dev",
"test",
"doc",
"examples",
], solve-group = "py313" }
min-py313 = { features = ["py313", "test"], solve-group = "py313" }
full-py312 = { features = [
"py312",
"io",
"vrt",
"extra",
"dev",
"test",
"doc",
"examples",
], solve-group = "py312" }
min-py312 = { features = ["py312", "test"], solve-group = "py312" }
full-py311 = { features = [
"py311",
"io",
"vrt",
"extra",
"dev",
"test",
"doc",
"examples",
], solve-group = "py311" }
min-py311 = { features = ["py311", "test"], solve-group = "py311" }