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

CommandWhat it does
hmp config templateGenerate a TOML configuration template
hmp config figuresList the variables, presets, special figures and frames a figure is drawn from
hmp config resolvePrint the TOML a base_config graph resolves to, before validation
hmp config schemaExport the JSON Schema
hmp config targetsList what this project exposes to a calibration
hmp config wizardInteractive 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

ArgumentWhat it does
--to FILEOutput file (or directory); prints to stdout if omitted
--profile PROFILEParameter visibility level (default: user) one of user | dev | expert
--modules MODULES [MODULES ...]Module sections to include (default: all but sites, a campaign section)
--list-modulesList 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

ArgumentWhat it does
--kind KINDOnly list rows of this kind one of variable | preset | special | frame
--run SIM_REFSay 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] file

Print the TOML a base_config graph resolves to, before validation

ArgumentWhat it does
filePath to the TOML configuration
--originWrite 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

ArgumentWhat it does
--editorExport 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 SECTIONExport a single root TOML section (e.g. 'flow')
--bundleWrite 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 FILEWrite the JSON Schema to this file
--profile PROFILEFilter the exported schema by profile (drops fields above the level) one of user | dev | expert
--list-sectionsList 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}] file

List what this project exposes to a calibration

ArgumentWhat it does
filePath to the TOML configuration

Also takes the shared options --workspace --format.

Example

$ hmp config targets calibration.toml --format json

Exit 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

ArgumentWhat it does
--to FILEOutput TOML file (default: <project label>.toml)
--profile PROFILEParameter visibility level (default: user) one of user | dev | expert

Also takes the shared options --workspace.

Example

$ hmp config wizard --to run.toml --profile user

Exit codes it sets itself: 14. All exit codes.