Skip to main content

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: orcca CLI (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 interpolation
  • orcca/validator.py: LinkML validation + business rules
  • orcca/executor.py: task execution engine + runtime preflight
  • orcca/workflow_runner.py: end-to-end orchestration pipeline and run reports
  • orcca/runtime_launchers.py: built-in + custom launcher resolution
  • orcca/dagger.py: generated-artifact DAG utilities
  • orcca/cli.py: user-facing commands

Packaged schema/rules:

  • orcca/resources/schema/flow-linkml.yaml
  • orcca/resources/rules/business-rules.yaml

Manifest Resolution Semantics

Orcca resolves manifests in this order:

  1. Resolve includes recursively in depth-first, declaration order.
  2. Merge include payloads into a single root payload.
  3. Merge the root manifest payload on top.
  4. Resolve configs in declaration order.
  5. Interpolate ${config['output_dir']}-style placeholders after merging is complete.
  6. 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 by id
  • 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:

  • study
  • standards
  • artifacts
  • artifact_groups
  • runtimes
  • tasks
  • validations
  • deliveries
  • execution
  • blinding_mode

Important modeling rules:

  • tasks.outputs must reference declared artifacts.
  • tasks.inputs can reference declared artifacts or transient IDs used internally.
  • required_tasks provides explicit execution sequencing independent of artifact lineage.

Blinded/Unblinded Mode

Run mode:

blinding_mode: blinded # or unblinded

Artifact variants:

  • variant is 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-root controls execution root and run artifact root
  • runs are stored under <project-root>/.orcca/runs

Execution and Reports

run_workflow(...) pipeline:

  1. resolve manifest
  2. validate manifest
  3. execute tasks (optional)
  4. package deliveries (when configured)
  5. optionally execute selected validation tasks
  6. write run artifacts

Per-run artifacts:

  • resolved_manifest.yaml
  • run_report.html
  • task logs under logs/
  • task context payloads under task-context/

Runtime Model

Built-in launchers:

  • python
  • rscript
  • julia
  • container

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 targets for business ownership
  • use validation_task for executable provenance
  • keep validation outputs easy to inspect in reports and logs

Examples in Repo

Reference workflows:

  • testing/e2e_python_native/workflow.yaml
  • testing/e2e_r_native/workflow.yaml
  • testing/e2e_julia_native/workflow.yaml
  • testing/e2e_sdtm/workflow.yaml

Blinding handoff example:

  • testing/blinding_handoff/README.md

Development

Install:

pip install -e .[dev]

Run tests:

pytest -q

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orcca-0.1.1.tar.gz (80.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orcca-0.1.1-py3-none-any.whl (73.0 kB view details)

Uploaded Python 3

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

Hashes for orcca-0.1.1.tar.gz
Algorithm Hash digest
SHA256 55f4e729919204c869e7e1e0d0ebdb1f409b99647d1dee68156100ba15adf69e
MD5 e3623d6247a84344fce1521efac922a1
BLAKE2b-256 4f8e803d1e2afc67e418b9fd648ec95af3485852d4a68266dc54d3da76cfcb90

See more details on using hashes here.

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

Hashes for orcca-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdc2f981cb4316fc277a4a82d76507ad37e6f6d0519f6236d95d3be315e1c44d
MD5 39cf6ed63be92c4b43a2a63de783ba6d
BLAKE2b-256 76030a1e8373cb2f0dc968ad81877b37f3fe3acf655219e76631ba338b320fb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page