httk.workflow.languages.httk_v1¶
Realize legacy httk v1 task packages through the ordinary runner path.
Attributes¶
Classes¶
The named input and output ports of one language document. |
|
The data supplied when preparing one language workflow. |
|
The files, runner, and hooks prepared for one language workflow. |
|
The operations a workflow language exposes to the common layer. |
Functions¶
|
Return the |
|
Validate and return one protocol label. |
|
Return false: bare v1 directories require an explicit format. |
|
Return the port shape of a v1 task, which has no document ports. |
|
Validate v1 taskset and retry options. |
|
Prepare one v1 package realization. |
|
Reject use as a default collector for v1 packages. |
Package Contents¶
- class httk.workflow.languages.httk_v1.LanguagePorts[source]¶
The named input and output ports of one language document.
- Parameters:
inputs – Names of the document’s input ports.
outputs – Names of the document’s output ports.
- class httk.workflow.languages.httk_v1.LanguageRequest[source]¶
The data supplied when preparing one language workflow.
- Parameters:
workflow_id – Identify the workflow being prepared.
directory – Locate the workflow package, when it has one.
document – Locate the source workflow document, when it has one.
runner_options – Supply options for the language runner.
inputs – Describe the workflow inputs.
outputs – Describe the requested workflow outputs.
parameters – Describe the declared workflow parameters.
environment – Describe the declared workflow environment.
excluded_members – Package members the realization must not stage.
- directory: pathlib.Path | None¶
- document: pathlib.Path | None¶
- runner_options: collections.abc.Mapping[str, object]¶
- inputs: collections.abc.Mapping[str, collections.abc.Mapping[str, object]]¶
- outputs: collections.abc.Mapping[str, collections.abc.Mapping[str, object]]¶
- parameters: collections.abc.Mapping[str, collections.abc.Mapping[str, object]]¶
- environment: collections.abc.Mapping[str, collections.abc.Mapping[str, object]]¶
- class httk.workflow.languages.httk_v1.LanguageScaffold[source]¶
The files, runner, and hooks prepared for one language workflow.
- Parameters:
documents – Text or byte documents to write into the payload.
files – Files to stage into the payload.
parameters – Job parameters produced by preparation.
runner – Runner description for the job, when one is supplied.
runner_executor – Select the runner executor.
payload_runner – Name a runner staged in the payload.
workdir_path – Name the workdir below the job payload.
required_capabilities – Require these manager capabilities.
reserved_parameters – Names reserved for per-job realization output.
warnings – Preserve preparation warnings.
instantiate – Supply the per-job hook called after input staging.
finalize – Transform the per-job
JobSpecimmediately before its payload is prepared.
- documents: collections.abc.Mapping[str, str | bytes]¶
- files: collections.abc.Mapping[str, pathlib.Path]¶
- parameters: collections.abc.Mapping[str, object]¶
- runner: collections.abc.Mapping[str, object] | None¶
- instantiate: collections.abc.Callable[[httk.workflow.scaffold.InstantiateContext], object] | None = None¶
- finalize: collections.abc.Callable[[httk.workflow.runtime_builders.JobSpec], httk.workflow.runtime_builders.JobSpec] | None = None¶
- class httk.workflow.languages.httk_v1.WorkflowLanguage[source]¶
The operations a workflow language exposes to the common layer.
- Parameters:
name – Name the language.
steps – Declare the runner’s steps.
initial_step – Select the runner’s initial step.
matches – Identify documents belonging to the language.
ports – Read the input and output ports of a document.
validate_runner – Validate runner options for a document.
prepare – Prepare a language request for execution.
collect – Convert a completed job record into language outputs.
document_policy – State whether package manifests require, allow, or forbid a source document.
open_ports – Skip manifest port validation when document ports cannot be enumerated statically.
has_default_collector – Provide a default collector path.
allows_modes – Permit manifest data and workdir mode overrides.
environment – Declare language-provided environment metadata.
required_modules – Name the importable modules a job of this language needs at run time.
- matches: collections.abc.Callable[[pathlib.Path], bool]¶
- ports: collections.abc.Callable[[pathlib.Path], LanguagePorts]¶
- validate_runner: collections.abc.Callable[[collections.abc.Mapping[str, object], pathlib.Path], None]¶
- prepare: collections.abc.Callable[[LanguageRequest], LanguageScaffold]¶
- collect: collections.abc.Callable[[httk.workflow.collecting.JobRecord], collections.abc.Mapping[str, object]]¶
- document_policy: DocumentPolicy = 'required'¶
- environment: collections.abc.Mapping[str, collections.abc.Mapping[str, object]]¶
- httk.workflow.languages.httk_v1.runner_reference(package, name)[source]¶
Return the
runnermember of ajob.jsonrunning one packaged runner.The reserved
pkg:form names the runner inside its own consumer package, and the digest is taken from the installed bytes, which is exactly what the manager verifies before it stages and executes them.
- httk.workflow.languages.httk_v1.validate_label(value, name)[source]¶
Validate and return one protocol label.
- Parameters:
- Returns:
The validated label.
- Raises:
httk.workflow.errors.FormatError – If the value is not valid label text.
- Return type:
- httk.workflow.languages.httk_v1.matches(path)[source]¶
Return false: bare v1 directories require an explicit format.
- httk.workflow.languages.httk_v1.ports(path)[source]¶
Return the port shape of a v1 task, which has no document ports.
- httk.workflow.languages.httk_v1.validate_runner(options, root)[source]¶
Validate v1 taskset and retry options.