cli#
hydromodpy.cli is the top-level dispatcher for the hmp and
hydromodpy console entry points. One verb per module under
cli/commands/, registered through ALL_COMMANDS in
cli/commands/__init__.py.
Sub-modules#
cli/main.py– argparse dispatcher; iteratesALL_COMMANDSand forwards the parsed namespace toargs._handler.cli/commands/– one module per verb (see inventory below).cli/_workers/– CLI application services for commands whose reusable Python surface is not part ofhydromodpy._api. Workers may assemble diagnostics, catalog listings and developer reports, but they must not become hidden scientific workflow implementations.cli/workflows.py– workflow dispatcher used byhmp runto pick the right launcher from[workflow].mode.
Verb inventory#
Twenty-six verbs ship today.
Verb |
Role |
|---|---|
|
Scaffold a workspace (catalog, |
|
Create a new project inside a workspace. |
|
Generate a TOML template, validate one, list modules, open the wizard. |
|
Export JSON Schema and the companion files for frontends. |
|
Execute a workflow ( |
|
Developer-only verbs ( |
|
Query the workspace-level catalog. |
|
Render registered figures for one persisted simulation. |
|
Render the HTML report for a calibration session. |
|
Browse projects or runs in a workspace. |
|
Export geographic data or simulation results to external formats. |
|
Run the unit, integration, regression, validation tiers. |
|
Inspect or manage custom data artefacts. |
|
Manage the reproducibility lockfile. |
|
Show metadata, metrics, parameters of a simulation. |
|
Compare two simulations by id, prefix, or name. |
|
Import a portable |
|
Import a portable |
|
Diagnose Python, dependencies, solver binaries, workspace. |
|
Inspect metadata, mesh, status, files of a simulation. |
|
Open the local browser UI for catalog tables and cleanup. |
|
Download the MODFLOW / MODPATH / MT3D-USGS binaries. |
|
Rank simulations for a project by one metric. |
|
Delete a simulation (catalog row plus Zarr / Parquet artefacts). |
|
Inspect or initialise workspace paths and storage conventions. |
|
Emit shell completion scripts (bash / zsh / fish). |
Verb contract#
Each module under cli/commands/ exposes:
The dispatcher iterates ALL_COMMANDS, calls register on
each, then forwards the parsed namespace to args._handler.
For V1, the CLI boundary is:
cli/commands/*.pyparse arguments, callhydromodpy._apior a named CLI worker, format output and map errors to exit codes.cli/_workers/*.pyis an application layer for CLI-only features such as catalog browsing, audit display and developer diagnostics.Reusable user-facing workflows should live in
hydromodpy._apior in their domain package, then be called by the command module.
Recommended reading path#
hydromodpy/cli/main.pyfor the dispatch loop.hydromodpy/cli/commands/__init__.pyto see the registered tupleALL_COMMANDS.hydromodpy/cli/commands/run.pyfor the canonical workflow verb.hydromodpy/cli/workflows.pyfor the[workflow].mode-> launcher dispatch.One small verb such as
cli/commands/show.pyto see the thin-handler convention.
Layer-matrix neighbours#
Allowed targets:
<root>, every stable production layer,catalog,projectandcli.validity_frameis not part of the stable CLI target set.Allowed sources: none;
cliis a leaf consumer.
See also#
CLI Reference – user-facing CLI inventory with every flag.
Add a CLI Command – step-by-step recipe.
CLI quickstart – first-run path.