hmp.publish()#
- Command line
hmp publish - Returns
PublishedProject - Defined in
hydromodpy/project/api.py
-
publish(
)[source]#ref,*,to,format='dir',with_=None,public=False,dry_run=False,workspace=None,
Copy a sealed run, the summary or every sealed run of a project out of the tree.
A copy carries what a reader needs to read it, and with
"inputs"to run it again. A project gives one folder per run and one for the summary, and the runs it left out with the reason;PublishedProject.to_dict()says it.- Parameters:
ref (Ref) – A run (its directory, its name in
workspace, the run),"summary"inworkspace, or the project (its directory,"."inworkspace, the object).to (PathLike) – Where the copy goes: a folder absent or empty, or the archive file.
format (Literal['dir', 'tar']) –
"dir"or"tar".with – What the copy carries beyond the run record:
"results"and"inputs", both by default.public (bool) – Warn when the project declares no licence; the copy is written either way.
dry_run (bool) – Run every check, say where the copy would land and write nothing.
workspace (PathLike | None) – The project directory, or a folder inside it.
- Returns:
pathlib.Path or PublishedProject – The copy, or for a project every copy and what was left out.
- Raises:
hydromodpy.core.exceptions.ExportError – An unsealed run, a destination that holds something, an input that cannot be carried.
FileNotFoundError – If
"summary"is asked before the summary was written.
- Return type:
Path | PublishedProject
Keyword arguments and command-line flags#
The twin command is hmp publish.
| Keyword | Default | Command-line flag | Accepted by |
|---|---|---|---|
to | --to | every form | |
format | 'dir' | --format | every form |
with_ | None | --with | every form |
public | False | --public | every form |
dry_run | False | --dry-run | every form |
workspace | None | -w --workspace | every form |
Flags of hmp publish with no keyword: --container, --package, --without, --verify. To get their effect from Python, build the configuration object with the values you want, or write them in the TOML file.