httk.workflow.languages¶
The registry of workflow-language runner realizations.
Language modules live beside this module and self-describe via a module-level
LANGUAGE.
Submodules¶
Attributes¶
Exceptions¶
A language job has no readable published outputs document. |
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 names of valid language modules available in this package. |
|
|
Return the registered language named name. |
|
Return the first registered language matching path, if any. |
|
Return the installed file of one packaged compat runner. |
|
Return the |
Package Contents¶
- exception httk.workflow.languages.LanguageOutputsMissingError[source]¶
Bases:
ValueErrorA language job has no readable published outputs document.
- class httk.workflow.languages.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.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[source]¶
- document: pathlib.Path | None[source]¶
- runner_options: collections.abc.Mapping[str, object][source]¶
- outputs: collections.abc.Mapping[str, collections.abc.Mapping[str, object]][source]¶
- parameters: collections.abc.Mapping[str, collections.abc.Mapping[str, object]][source]¶
- environment: collections.abc.Mapping[str, collections.abc.Mapping[str, object]][source]¶
- class httk.workflow.languages.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.
- parameters: collections.abc.Mapping[str, object][source]¶
- instantiate: collections.abc.Callable[[httk.workflow.scaffold.InstantiateContext], object] | None = None[source]¶
- finalize: collections.abc.Callable[[httk.workflow.runtime_builders.JobSpec], httk.workflow.runtime_builders.JobSpec] | None = None[source]¶
- class httk.workflow.languages.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][source]¶
- validate_runner: collections.abc.Callable[[collections.abc.Mapping[str, object], pathlib.Path], None][source]¶
- collect: collections.abc.Callable[[httk.workflow.collecting.JobRecord], collections.abc.Mapping[str, object]][source]¶
- document_policy: DocumentPolicy = 'required'[source]¶
- environment: collections.abc.Mapping[str, collections.abc.Mapping[str, object]][source]¶
- httk.workflow.languages.available_languages()[source]¶
Return the names of valid language modules available in this package.
- httk.workflow.languages.language(name)[source]¶
Return the registered language named name.
- Parameters:
name (str) – Name the language, using hyphens or underscores.
- Returns:
The language registration.
- Raises:
ValueError – If the module or its
LANGUAGEis invalid.- Return type:
- httk.workflow.languages.match_document(path)[source]¶
Return the first registered language matching path, if any.
- httk.workflow.languages.runner_path(package, name)[source]¶
Return the installed file of one packaged compat runner.
package is the importable package the runner file lives beside — its own consumer package, e.g.
httk.workflow.languages.cwl— so a compat engine resolves and digest-pins the exact bytes it ships rather than a runner owned by some shared module.
- httk.workflow.languages.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.