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, harvest, and named submodules for transfers, remotes, and
compatibility). Installations register the canonical httk workflow command
tree, plus the httk-taskmanager and httk-v1-taskmanager executables, which
are aliases of it.
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, stepsNative Bash runner API — the same surface in Bash
Python and Bash authoring parity — the normative table both of the above must agree with
Packaged VASP runners — the packaged runners, for campaigns that write none
Workflow declarations — saying what a workflow is, for a data layer
Importing workflows written elsewhere — running PWD and CWL documents as ordinary jobs
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, remotesCampaigns — partitioning a very large campaign across many workspaces
Scale benchmarks — measured local scale snapshot and benchmark methodology
Harvesting results — reading finished jobs back out as records
Writing a remote adapter — reaching a machine the packaged adapters do not cover
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 workflow workspace init workflow-workspace --remote local --path workflow-workspace --extension transactional-data-v1
httk workflow job new workflow-workspace --template vasp-relax --from POSCAR --tag silicon
httk workflow manager run workflow-workspace --until-idle
httk workflow harvest workflow-workspace
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 workflow job submit workflow-workspace prepared-job --placement project/00
Documentation
- Quickstart
- The filesystem protocol API
- Native runner helpers
- Native Bash runner API
- Python and Bash authoring parity
- Packaged VASP runners
- Workflow declarations
- Importing workflows written elsewhere
- Task-manager usage
- Project and workflow command line
- Three executables, one tree
- The complete tree
- Creating jobs
- Importing workflows written elsewhere
- Inspecting and debugging jobs
- Configuration and projects
- Signed manifests
- Application settings
- Workspace policy and integrity
- Freeing disk
- Remote adapters
- Detached transfers
- Running on a remote and fetching the results
- Campaigns
- Scale benchmarks
- Harvesting results
- Writing a remote adapter
- Reference
- Examples
- Workflow filesystem API
- Status and scope
- Normative language
- Design summary
- Concepts
- Required filesystem semantics
- Conformance profiles
- Workspace layout and arbitrary placement
- Managing and combining workspaces
- Job UUIDs, names, and path tags
- The authoritative state tree
- Packed transition journal
- Job definition and submission
- State machine
- Claiming, leases, and fencing
- Attempt control, workdirs, and runner contract
- Publishing an outcome
- Optional transactional contributions to
data/ - Relocating and transferring jobs
- Dynamic branching and joins
- Failures and tracking broken jobs
- Manual continuation and control requests
- Required outcome-processing order
- Task-manager startup and recovery
- Workspace check and marker repair
- Garbage collection and compaction
- Manual filesystem inspection
- Security and hostile input
- Persistent VASP restart example
- Worked example
- Relationship to httk v1
- Migrating an httk v1 workflow to httk₂
- 1. Choose a migration route
- 2. Inventory the httk v1 workflow
- 3. Run the workflow unchanged in an httk₂ workspace
- 4. Migrate project, configuration, and remotes separately
- 5. Run compatibility and native jobs side by side
- 6. Replace the httk v1 control flow with native Bash
- 7. Translate the commonly used task helpers
- 8. Replace controlled-run checkers
- 9. Replace VASP helpers
- 10. Migrate dynamic subtasks
- 11. Migrate to a Python runner
- 12. Validate before switching production work
- 13. Cut over and retire compatibility deliberately
- Migration checklist
- httk v1 task compatibility