Package Layout#
The Python package lives under hydromodpy/. This page is the map
of every subpackage with one-line responsibilities and the
recommended starting file. For deeper reading, follow the link to the
matching Per-Package Reference entry.
Top-level facade#
hydromodpy/
|-- __init__.py Lazy public exports plus PROJ bootstrap.
|-- _api.py Top-level helpers (open, run, calibrate,
| index, compare_pair, report,
| audit_prune, doctor).
|-- _bootstrap.py PROJ database setup at import time.
|-- _lazy.py Lazy-export tables (LAZY_IMPORTS,
| MODULE_EXPORTS).
|-- __main__.py ``python -m hydromodpy`` entry point.
`-- project/ Public ``Project`` facade subpackage.
|-- __init__.py Re-exports ``Project`` and its helpers.
|-- facade.py ``Project`` class.
|-- accessors.py Read-only accessors on Project.
|-- catalog.py Project-level catalog binding.
|-- phases.py Lazy-phase Project orchestration.
|-- runner.py Project execution wrapper.
`-- dispatch/ Workflow / calibration adapters bound to
``Project`` (workflow.py, calibration.py).
The hydromodpy.project.Project facade composes setup, data
loading, mesh construction, solver execution, and result ingestion.
Most user code only touches it.
Subpackages#
Subpackage |
Role and entry file |
|---|---|
|
Cross-run analysis: simulation comparison
( |
|
Ask/tell engine, parameter sets, objective dispatch, optimizer
adapters (CmaEs, Optuna, RandomSearch, ScipyDE,
ScipyNelderMead, Grid, GpMapping, DaMhGp), persistence,
diagnostics, runnable cases. Entry: |
|
Read-only view over the workspace data cache. The simulation
catalog itself is opened with |
|
|
|
Root |
|
Kernel leaf with no sibling-layer dependency. Hosts unit
aliases ( |
|
Data managers per variable ( |
|
Solver-agnostic figures registered through
|
|
Process layer. |
|
Workspace catalog ( |
|
JSON Schema export and partial-field validator.
|
|
Simulation orchestration. |
|
Backend abstraction ( |
|
Spatial-support stack: |
|
Composable steps and the immutable |
|
Public object-oriented facade above the matrix. It binds
workflow and calibration launchers to |
|
Experimental observability tooling for runtime capture and JSONL-to-DuckDB ingestion. It is isolated from modeling layers and is not a stable V1 public API. See validity_frame. |
Repository folders outside the package#
HydroModPy/
|-- docs/ Sphinx documentation source (this site).
|-- examples/ Runnable example projects (TOML + Python).
|-- hydromodpy/ Python package (see layout above).
|-- hydromodpy_annex/ Project-specific tools that depend on the
| package but stay outside the core API.
|-- install/ Conda environment files and WSL helpers.
|-- tests/ Five-tier test tree (unit, integration,
| e2e, regression, validation).
|-- tools/ Doc-gallery, PlantUML setup, CI helpers.
`-- validation_cases/ Reusable scientific benchmark inventory.
Dependency direction is one-way: hydromodpy_annex/ and tools/
may import the core package, but the package itself must not import
from them. The architecture matrix in Layered Architecture
enforces the same rule between subpackages.
Solver binaries#
MODFLOW, MODPATH, and MT3D-USGS executables are not shipped with the
wheel. They are downloaded on first use into a managed cache
(~/.cache/hydromodpy/bin/ by default) by
hydromodpy.solver.modflow_common.binaries. hmp install-binaries
fetches them eagerly. See Install for the CLI flags.
See also#
Layered Architecture for the strict import rules between subpackages.
Code Reading Guide for guided reading paths inside each package.
Per-Package Reference for one focused page per subpackage.