hmp.status()#

status(ref=None, *, workspace=None, plan=False, stale_after_s=None)[source]#

Say where runs and sessions stand, read from the disk and never from the index.

Without a reference, one RunOutcome per directory of runs/ and sessions/ of the project, sorted by name. With a reference, the outcome of that one, with its deliveries. With plan=True, where each case of the plan of a [sites] project stands, the StatusReport of project_status, whose to_dict() is what hmp ls --plan --format json prints.

Parameters:
  • ref (Ref | None) – A run or a session (a directory, a name in workspace, the object), or a project (its directory, "." in workspace, the object).

  • workspace (PathLike | None) – The project directory, or a folder inside it.

  • plan (bool) – Read the plan of the project instead of its directories.

  • stale_after_s (float | None) – Seconds after which a live run that stopped writing is called stale. None keeps the default.

Returns:

RunOutcome or list of RunOutcome or StatusReport – See above.

Raises:
  • hydromodpy.core.exceptions.CommandUsageError – If neither a reference nor workspace names the project.

  • hydromodpy.results.catalog.discovery.SimulationNotFoundError – If the reference names nothing.

Return type:

RunOutcome | list[RunOutcome] | StatusReport