hmp config#
$ hmp config [-h] {template,figures,resolve,schema,targets,wizard,validate-field,check} ...Generate a TOML template, validate a config, or export the JSON Schema
| Command | What it does |
|---|---|
hmp config template | Generate a TOML configuration template |
hmp config figures | List the variables, presets, special figures and frames a figure is drawn from |
hmp config resolve | Print the TOML a base_config graph resolves to, before validation |
hmp config schema | Export the JSON Schema |
hmp config targets | List what this project exposes to a calibration |
hmp config wizard | Interactive stdin-based TOML wizard |
hmp config template#
$ hmp config template [-h] [-w WORKSPACE] [--to FILE] [--profile {user,dev,expert}] [--modules MODULES [MODULES ...]] [--list-modules]Generate a TOML configuration template
| Argument | What it does |
|---|---|
--to FILE | Output file (or directory); prints to stdout if omitted |
--profile PROFILE | Parameter visibility level (default: user) one of user | dev | expert |
--modules MODULES [MODULES ...] | Module sections to include (default: all but sites, a campaign section) |
--list-modules | List available module names and exit |
Also takes the shared options --workspace.
Examples
$ hmp config template --list-modules $ hmp config template --to run.toml --profile user --modules flow solver
Exit codes it sets itself: 14. All exit codes.
hmp config figures#
$ hmp config figures [-h] [-w WORKSPACE] [--format {table,json,csv}] [--verbosity {quiet,normal,verbose,debug} | -q | -v | --debug] [--kind {variable,preset,special,frame}] [--run SIM_REF]List the variables, presets, special figures and frames a figure is drawn from
| Argument | What it does |
|---|---|
--kind KIND | Only list rows of this kind one of variable | preset | special | frame |
--run SIM_REF | Say what this run holds of each variable and preset (sim_id, unique prefix, name or @-selector) |
Also takes the shared options --workspace --format --verbosity --quiet --verbose --debug.
Examples
$ hmp config figures $ hmp config figures --kind preset $ hmp config figures --run RUN --kind variable
Exit codes it sets itself: 14. All exit codes.
hmp config resolve#
$ hmp config resolve [-h] [-w WORKSPACE] [--origin] filePrint the TOML a base_config graph resolves to, before validation
| Argument | What it does |
|---|---|
file | Path to the TOML configuration |
--origin | Write one line per value, with the file that set it and the files that added to it |
Also takes the shared options --workspace.
Examples
$ hmp config resolve run.toml $ hmp config resolve run.toml --origin
Exit codes it sets itself: 14. All exit codes.
hmp config schema#
$ hmp config schema [-h] [-w WORKSPACE] [--editor] [--section SECTION] [--bundle] [--to FILE] [--profile {user,dev,expert}] [--list-sections]Export the JSON Schema
| Argument | What it does |
|---|---|
--editor | Export the editor schema, the one published with the documentation: it checks one TOML file as written (base_config, __append, __delete, quantities with a unit) and requires no key |
--section SECTION | Export a single root TOML section (e.g. 'flow') |
--bundle | Write three files into the folder --to names: config.json (the JSON Schema of HydroModPyConfig), config_meta.json (the root sections in order, their titles and UI groups) and field_validators.json (the validator type of each field path) |
--to FILE | Write the JSON Schema to this file |
--profile PROFILE | Filter the exported schema by profile (drops fields above the level) one of user | dev | expert |
--list-sections | List available section names |
Also takes the shared options --workspace.
Examples
$ hmp config schema --list-sections $ hmp config schema --section flow --to flow.schema.json $ hmp config schema --editor --to hydromodpy-schema.json $ hmp config schema --bundle --to schema_dir
Exit codes it sets itself: 14. All exit codes.
hmp config targets#
$ hmp config targets [-h] [-w WORKSPACE] [--format {table,json,csv}] fileList what this project exposes to a calibration
| Argument | What it does |
|---|---|
file | Path to the TOML configuration |
Also takes the shared options --workspace --format.
Example
$ hmp config targets calibration.toml --format jsonExit codes it sets itself: 14. All exit codes.
hmp config wizard#
$ hmp config wizard [-h] [-w WORKSPACE] [--to FILE] [--profile {user,dev,expert}]Interactive stdin-based TOML wizard
| Argument | What it does |
|---|---|
--to FILE | Output TOML file (default: <project label>.toml) |
--profile PROFILE | Parameter visibility level (default: user) one of user | dev | expert |
Also takes the shared options --workspace.
Example
$ hmp config wizard --to run.toml --profile userExit codes it sets itself: 14. All exit codes.