Manifest-driven clinical workflow orchestration framework
Project description
Orcca
Orcca is a manifest-driven orchestration framework for clinical programming workflows. It is designed for teams that need reproducible execution, explicit dependency modeling, and clear run reporting.
Current State
- Package version:
0.1.0(alpha) - Python:
>=3.11 - Core dependencies:
PyYAML,jsonschema,linkml - Entry point:
orccaCLI (orcca.cli:main)
This project is currently optimized for practical workflow execution and validation with a strong traceability model, not for broad general-purpose scheduling.
What Orcca Does
Orcca provides:
- declarative workflow modeling in YAML
- manifest include/config resolution
- LinkML + business-rule validation
- executable task orchestration with dependency-aware scheduling
- runtime preflight for package-manager and container environments
- run reporting (
run_report.html) and task logs - validation task execution for independent double programming (IDP)
blinding_mode-based blinded/unblinded workflow control
Core Architecture
Main modules:
orcca/resolver.py: include/config merge and placeholder interpolationorcca/validator.py: LinkML validation + business rulesorcca/executor.py: task execution engine + runtime preflightorcca/workflow_runner.py: end-to-end orchestration pipeline and run reportsorcca/runtime_launchers.py: built-in + custom launcher resolutionorcca/dagger.py: generated-artifact DAG utilitiesorcca/cli.py: user-facing commands
Packaged schema/rules:
orcca/resources/schema/flow-linkml.yamlorcca/resources/rules/business-rules.yaml
Manifest Resolution Semantics
Orcca resolves manifests in this order:
- Resolve
includesrecursively in depth-first, declaration order. - Merge include payloads into a single root payload.
- Merge the root manifest payload on top.
- Resolve
configsin declaration order. - Interpolate
${config['output_dir']}-style placeholders after merging is complete. - Placeholder substitutions must resolve to scalar values, not lists or dictionaries.
Merge behavior:
- dict values replace completely
- list-valued keys inside dicts: merged with the same list rules
- lists of scalars: append + dedupe while preserving first-seen order
- lists of
{id: ...}entities: overwrite byid - scalars/type mismatch: latest wins
Config files use the same merge rules as manifest root slots, so later files can override earlier ones without changing the merge model.
Declarative slots such as id, name, description, notes, envvar_name, and
param_name must be written as explicit literals and may not use
${config['output_dir']}-style interpolation.
Placeholder substitutions must resolve to scalar values, not lists or dictionaries.
This matters for override design: unblinded manifests should include base first, then override files that only change allowed slots.
Workflow Model
Primary slots:
studystandardsartifactsartifact_groupsruntimestasksvalidationsdeliveriesexecutionblinding_mode
Important modeling rules:
tasks.outputsmust reference declared artifacts.tasks.inputscan reference declared artifacts or transient IDs used internally.required_tasksprovides explicit execution sequencing independent of artifact lineage.
Blinded/Unblinded Mode
Run mode:
blinding_mode: blinded # or unblinded
Artifact variants:
variantis optional and only needed for paired blinded/unblinded artifacts.
artifacts:
- id: rand_map
variant: blinded
name: Randomization Map
type: lookup_dataset
origin: external
path: outputs/rand_map_blinded.csv
Unblinded pattern:
includes:
- workflow_blinded.yaml
- manifests/artifacts_unblinded.yaml
blinding_mode: unblinded
Declarative slots must remain literal and may not use quoted config interpolation placeholders.
CLI
Top-level commands:
orcca validate <manifest.yaml>orcca plan <manifest.yaml>orcca run <manifest.yaml> [--project-root <path>]orcca env-cache list|prune [--all]orcca init [path]
Useful run flags:
--task <id>(repeatable)--artifact <id>(repeatable)--run-validations--validation-id <id>(repeatable; requires--run-validations)--no-execute--no-env-cache--refresh-env
Run root behavior:
--project-rootcontrols execution root and run artifact root- runs are stored under
<project-root>/.orcca/runs
Execution and Reports
run_workflow(...) pipeline:
- resolve manifest
- validate manifest
- execute tasks (optional)
- package deliveries (when configured)
- optionally execute selected validation tasks
- write run artifacts
Per-run artifacts:
resolved_manifest.yamlrun_report.html- task logs under
logs/ - task context payloads under
task-context/
Runtime Model
Built-in launchers:
pythonrscriptjuliacontainer
Custom launchers:
- auto-loaded from
launchers/*.py - optional
launchers/register.py - launcher file rule: filename stem must match exported function name
Package-manager environments:
- cached under
.orcca/cache/environments/ - managers:
pip,venv,renv,julia_pkg(+ explicit restore command for others)
Container environments:
- source types:
registry,archive,build - archive load and local build workflows supported
Validation and IDP
Validation uses:
- LinkML schema validation
- business-rule validation
- cross-reference checks and dependency checks
IDP (check_type: independent_double_programming) supports:
- artifact/group targets
- explicit
validation_task - validation targets and validation task references
- tool metadata via
tool
Recommended IDP pattern:
- keep
targetsfor business ownership - use
validation_taskfor executable provenance - keep validation outputs easy to inspect in reports and logs
Examples in Repo
Reference workflows:
testing/e2e_python_native/workflow.yamltesting/e2e_r_native/workflow.yamltesting/e2e_julia_native/workflow.yamltesting/e2e_sdtm/workflow.yaml
Blinding handoff example:
testing/blinding_handoff/README.md
Development
Install:
pip install -e .[dev]
Run tests:
pytest -q
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orcca-0.1.1.tar.gz.
File metadata
- Download URL: orcca-0.1.1.tar.gz
- Upload date:
- Size: 80.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55f4e729919204c869e7e1e0d0ebdb1f409b99647d1dee68156100ba15adf69e
|
|
| MD5 |
e3623d6247a84344fce1521efac922a1
|
|
| BLAKE2b-256 |
4f8e803d1e2afc67e418b9fd648ec95af3485852d4a68266dc54d3da76cfcb90
|
File details
Details for the file orcca-0.1.1-py3-none-any.whl.
File metadata
- Download URL: orcca-0.1.1-py3-none-any.whl
- Upload date:
- Size: 73.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdc2f981cb4316fc277a4a82d76507ad37e6f6d0519f6236d95d3be315e1c44d
|
|
| MD5 |
39cf6ed63be92c4b43a2a63de783ba6d
|
|
| BLAKE2b-256 |
76030a1e8373cb2f0dc968ad81877b37f3fe3acf655219e76631ba338b320fb0
|