httk.workflow.provenance¶
The provenance declaration vocabulary and its pure httk.core.Run builder.
The declaration name is provenance. Its document is an object whose members
are all optional:
{
"workflow_declaration_uri": "https://schemas.httk.org/defs/v0.1/workflows/vasp-relax",
"inputs": {"initial_structure": {"type": "structures", "id": "<served id>"}},
"artifacts": {"relaxed_structure": {"type": "structures", "id": "..."}},
"outputs": {"total_energy": {"type": "_httk_records", "id": "..."}}
}
The object keys are edge labels, so labels are unique per side. Targets are
loose served-entry references. A document may be written as declared in
JobSpec.declarations at scaffold time, which suits externally known inputs,
and/or as observed with Attempt.declare("provenance", ...) at collect
time, when produced-entry ids exist. Consumers choose one complete document;
they never merge the two.
Attributes¶
Functions¶
|
Build the one |
Module Contents¶
- httk.workflow.provenance.run_record(record)[source]¶
Build the one
httk.core.Runrepresented by record.The observed
provenancedocument is selected wholesale when present; otherwise the declared document is selected. Missing orNonemeans no edges. Its URI is used when that member is present, including explicitnull; otherwise the observed-then-declaredworkflowdeclaration’s$idis used. Each edge member must map labels to exactlytypeandidstring members, and insertion order is preserved.immutable_idis"<workspace_id>:<job_id>".last_modifiedis the latest parseable awarefinished_attimestamp in the attempt timeline; absent or unparseable timestamps produceNone. Children are not folded in: each child collects to its ownRun, while a parent can name child products explicitly in its observed declaration. Runner identity, timeline, and failure are deliberately not folded intoRun; the caller’sJobRecordremains the extra-information channel.- Parameters:
record (httk.workflow.collecting.JobRecord) – Supply the mechanical readout of one collected job.
- Returns:
The framework-owned run assembled from the selected declaration.
- Raises:
ValueError – If a selected URI or edge violates the provenance contract.
- Return type: