httk-workflow¶
This site documents the httk-workflow module. For the full documentation of httk₂, see docs.httk.org.
The module implements a recoverable, language-neutral workflow protocol whose
source of truth is a single atomically renamed state marker per job. It presents
three layers, each with its own import home: the filesystem protocol
(httk.workflow.protocol), the execution and authoring surface
(httk.workflow — Runner, Attempt — with lower-level helpers in
httk.workflow.runtime), and orchestration and management (Workspace,
TaskManager, collect, and named submodules for transfers, remotes, and
compatibility). Installations register the httk workflow command tree.
Managers are started by the workspace’s manager.launch setting, using the
built-in process launcher or a launcher bundle such as slurm. A remote is
only the transport for files and commands on another machine.
httk₂ workflows are language-independent: runners, hooks, and postprocess
scripts can be written in any language; a workflow is a manifest plus the
members it references. Python hooks remain first-class, with an in-process fast
path. Successful hook outputs use the same assembly semantics as executable
hooks; collector failures differ deliberately: registered .py exceptions
abort iteration, while executable-hook errors degrade per job and continue the
sweep.
Quick links
New here — start with Quickstart: five commands from an empty directory to a finished relaxation, no runner written and no VASP required.
The filesystem protocol — the language-neutral on-disk contract
The filesystem protocol API — the
httk.workflow.protocolnamespaceWorkflow filesystem API — the normative on-disk specification
The execution API — writing and running workflow steps
Native runner helpers — the Python authoring SDK:
Runner,Attempt, stepsRunner SDKs — the same authoring surface in eight more languages
Packaged VASP runners — the packaged runners and relaxation report, for campaigns that write none
Workflow packages — authoring directory packages and their manifest
Workflow declarations — saying what a workflow is, for a data layer
Run provenance — turning one
JobRecordinto onehttk.core.RunCollecting results — collecting provider-produced outputs and products
Workflow-language runner realizations — CWL, PWD, jobflow, and httk-v1 runner realizations
Examples — worked examples as a notebook
Orchestration and management — driving and inspecting a workspace
Task-manager usage — workspaces, submission, managers, inspection, repair
Project and workflow command line — the whole
httk workflowtree: projects, config, remotes, and launchersSealing jobs, workspaces, and projects — signing finished jobs, workspaces, and projects so tampering is detectable
Stable ids — keeping entry ids stable across store rebuilds with a sealed id ledger
Campaigns — partitioning a very large campaign across many workspaces
Composing workflows — a workflow that calls other workflows as child jobs
Scale benchmarks — measured local scale snapshot and benchmark methodology
Collecting results — reading finished jobs back out as records and collected outputs
Remotes — reaching a machine with a packaged or custom remote adapter
Launchers — starting managers with a packaged or custom launcher
Reference — the generated API reference
Migration
Install¶
Preferably work in a Python virtual environment:
git clone https://github.com/httk/httk-workflow
cd httk-workflow
python -m pip install -e .
Minimal setup¶
One workspace, one job of a packaged runner, and one manager that runs it:
httk init --name "Your Name" --email you@example.org
httk project init --name quickstart .
httk workspace init --name default .
httk job new --workflow vasp-relax --input structure=POSCAR --tag silicon
httk workspace settings set --key vasp.command --value "$PWD/examples/mock_vasp.py" default
httk workflow run
httk workflow collect
Quickstart walks through exactly those commands, including how to run them without VASP installed. A complete payload prepared some other way is still submitted directly:
httk job submit --workspace workflow-workspace --placement project/00 prepared-job
Documentation
- Quickstart
- The filesystem protocol API
- Native runner helpers
- Runner SDKs
- Packaged VASP runners
- Workflow packages
- Workflow declarations
- Run provenance
- Collecting results
- Workflow-language runner realizations
- Task-manager usage
- Project and workflow command line
- Sealing jobs, workspaces, and projects
- Stable ids
- Campaigns
- Composing workflows
- Scale benchmarks
- Remotes
- Launchers
- Reference
- Examples
- Workflow filesystem API
- Migrating an httk v1 workflow to httk₂
Details
- Native runner helpers in detail
- Task-manager usage in detail
- Workflow packages in detail
- Project and workflow command line in detail
- Workflow monitor
- Writing a remote adapter in detail
- Writing a manager launcher in detail
- Workflow filesystem API in detail
- Migrating an httk v1 workflow to httk₂ in detail
- httk v1 task compatibility