uwtools.api.ecflow
API access to uwtools ecFlow support.
- uwtools.api.ecflow.realize(config, output_path=None, scripts_path=None, stdin_ok=False)
Realize the ecFlow workflow defined in the given YAML as a Suite Definition and ecf scripts.
If no input file is specified,
stdinis read. AYAMLConfigobject may also be provided as input. If no output file is specified, the Suite Definition is written tostdout. The ecf scripts are not produced ifscripts_pathis not provided.- Parameters:
config (_YAMLConfig | Path | str | None) – YAML input file or
YAMLConfigobject (None=> readstdin).output_path (Path | str | None) – Suite Definition output path (
None=> write tostdout).scripts_path (Path | str | None) – ecf scripts top-level path (
None=> no scripts are generated).stdin_ok (bool) – OK to read from
stdin?
- Raises:
UWConfigErrorif validation fails.- Returns:
True.- Return type:
- uwtools.api.ecflow.server(config, port=None, insecure=False, report=False, stdin_ok=False)
Start an ecFlow server on an available TCP port, optionally with SSL security enabled.
If no port is specified, a random port in the registered range (
1024-49151) is chosen, retrying if the port is unavailable. SSL certificates are read from or written to$HOME/.ecflowrc/ssl. Useinsecureto skip SSL. Usereportto emit a JSON report of the server details (e.g. hostname, port) tostdout.- Parameters:
config (_YAMLConfig | dict | Path | str | None) – A
dict, aYAMLConfig, or a path to a YAML config file (None=> readstdin).port (int | None) – TCP port to use; overrides config value (
None=> pick a random available port from1024-49151).insecure (bool) – Start the server without SSL security.
report (bool) – Output server details (e.g. hostname, port) as JSON to
stdout.stdin_ok (bool) – OK to read from
stdin?
- Returns:
True.- Return type:
- uwtools.api.ecflow.validate(config=None, stdin_ok=False)
Validate an ecFlow config against its schema.