hmp.report#

Render the HTML report for a calibration session.

Signature#

hmp.report(session_id_or_prefix=None, *, workspace=None) -> Any

Reference#

hydromodpy.report(session_id_or_prefix=None, *, workspace=None)[source]

Render the HTML report for a calibration session.

session_id_or_prefix accepts a full UUID or a unique hex prefix of either a calibration session or one of its runs (an iteration or the promoted best run, as printed by hmp catalog ls); the run reference is mapped to its parent session. None falls back to the most recently started session. workspace defaults to the nearest ancestor of the current working directory holding a project index database.

When workspace is a workspace root, the lookup federates across every projects/<name> catalog, matching how hmp catalog ls lists runs.

Return type:

Any

Parameters:
  • session_id_or_prefix (Any)

  • workspace (Any)

Parameters#

session_id_or_prefix

Full UUID or unique hex prefix of a session or one of its runs, or None for the latest session.

workspace

Optional workspace root or project directory.

Returns#

Any

Report rendering result.

Raises#

hydromodpy.results.errors.RunNotFoundError

If no calibration session matches session_id_or_prefix.

hydromodpy.core.exceptions.DisplayError

If the report template or one of its figures fails to render.

Examples#

>>> import hydromodpy as hmp
>>> hmp.report()  # latest session in the current workspace  
>>> hmp.report("ab12cd34", workspace="~/hmp_workspace")  
param session_id_or_prefix:

type session_id_or_prefix:

Any

param workspace:

type workspace:

Any

Example#

import hydromodpy as hmp

# Latest session in the nearest workspace
hmp.report()

# Explicit session and workspace
hmp.report("ab12cd34", workspace="~/hmp_workspace")

See Also#