Orcca 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orcca-0.1.0/Orcca.egg-info/PKG-INFO +269 -0
- orcca-0.1.0/Orcca.egg-info/SOURCES.txt +38 -0
- orcca-0.1.0/Orcca.egg-info/dependency_links.txt +1 -0
- orcca-0.1.0/Orcca.egg-info/entry_points.txt +2 -0
- orcca-0.1.0/Orcca.egg-info/requires.txt +6 -0
- orcca-0.1.0/Orcca.egg-info/top_level.txt +1 -0
- orcca-0.1.0/PKG-INFO +269 -0
- orcca-0.1.0/README.md +246 -0
- orcca-0.1.0/orcca/__init__.py +7 -0
- orcca-0.1.0/orcca/cli.py +617 -0
- orcca-0.1.0/orcca/click_cli.py +154 -0
- orcca-0.1.0/orcca/dagger.py +492 -0
- orcca-0.1.0/orcca/executor.py +1432 -0
- orcca-0.1.0/orcca/io_utils.py +153 -0
- orcca-0.1.0/orcca/launchers.py +39 -0
- orcca-0.1.0/orcca/resolver.py +597 -0
- orcca-0.1.0/orcca/resources/__init__.py +1 -0
- orcca-0.1.0/orcca/resources/rules/business-rules.yaml +187 -0
- orcca-0.1.0/orcca/resources/schema/business-rules-linkml.yaml +127 -0
- orcca-0.1.0/orcca/resources/schema/flow-linkml.yaml +620 -0
- orcca-0.1.0/orcca/runtime_launchers.py +430 -0
- orcca-0.1.0/orcca/validator.py +1234 -0
- orcca-0.1.0/orcca/workflow.py +518 -0
- orcca-0.1.0/orcca/workflow_runner.py +590 -0
- orcca-0.1.0/pyproject.toml +49 -0
- orcca-0.1.0/setup.cfg +4 -0
- orcca-0.1.0/tests/test_cli_cache_init.py +29 -0
- orcca-0.1.0/tests/test_cli_launcher_autoload.py +56 -0
- orcca-0.1.0/tests/test_container_image_source_types_integration.py +133 -0
- orcca-0.1.0/tests/test_container_image_source_types_podman_integration.py +129 -0
- orcca-0.1.0/tests/test_dagger.py +50 -0
- orcca-0.1.0/tests/test_executor.py +648 -0
- orcca-0.1.0/tests/test_io_utils.py +23 -0
- orcca-0.1.0/tests/test_native_language_templates.py +24 -0
- orcca-0.1.0/tests/test_package_manager_integration.py +183 -0
- orcca-0.1.0/tests/test_resolver.py +365 -0
- orcca-0.1.0/tests/test_runtime_adapters.py +188 -0
- orcca-0.1.0/tests/test_sdtm_fixture.py +17 -0
- orcca-0.1.0/tests/test_validator.py +346 -0
- orcca-0.1.0/tests/test_workflow_runner.py +386 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Orcca
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Manifest-driven clinical workflow orchestration framework
|
|
5
|
+
Author: Athenkosi Nkonyeni
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: clinical-trials,workflow,orchestration,manifest,data-pipeline
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: PyYAML>=6.0
|
|
19
|
+
Requires-Dist: jsonschema>=4.0
|
|
20
|
+
Requires-Dist: linkml>=1.8
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
23
|
+
|
|
24
|
+
# Orcca
|
|
25
|
+
|
|
26
|
+
Orcca is a manifest-driven orchestration framework for clinical programming workflows.
|
|
27
|
+
It is designed for teams that need reproducible execution, explicit dependency modeling,
|
|
28
|
+
and clear run reporting.
|
|
29
|
+
|
|
30
|
+
## Current State
|
|
31
|
+
|
|
32
|
+
- Package version: `0.1.0` (alpha)
|
|
33
|
+
- Python: `>=3.11`
|
|
34
|
+
- Core dependencies: `PyYAML`, `jsonschema`, `linkml`
|
|
35
|
+
- Entry point: `orcca` CLI (`orcca.cli:main`)
|
|
36
|
+
|
|
37
|
+
This project is currently optimized for practical workflow execution and validation with a
|
|
38
|
+
strong traceability model, not for broad general-purpose scheduling.
|
|
39
|
+
|
|
40
|
+
## What Orcca Does
|
|
41
|
+
|
|
42
|
+
Orcca provides:
|
|
43
|
+
|
|
44
|
+
- declarative workflow modeling in YAML
|
|
45
|
+
- manifest include/config resolution
|
|
46
|
+
- LinkML + business-rule validation
|
|
47
|
+
- executable task orchestration with dependency-aware scheduling
|
|
48
|
+
- runtime preflight for package-manager and container environments
|
|
49
|
+
- run reporting (`run_report.html`) and task logs
|
|
50
|
+
- validation task execution for independent double programming (IDP)
|
|
51
|
+
- `blinding_mode`-based blinded/unblinded workflow control
|
|
52
|
+
|
|
53
|
+
## Core Architecture
|
|
54
|
+
|
|
55
|
+
Main modules:
|
|
56
|
+
|
|
57
|
+
- `orcca/resolver.py`: include/config merge and placeholder interpolation
|
|
58
|
+
- `orcca/validator.py`: LinkML validation + business rules
|
|
59
|
+
- `orcca/executor.py`: task execution engine + runtime preflight
|
|
60
|
+
- `orcca/workflow_runner.py`: end-to-end orchestration pipeline and run reports
|
|
61
|
+
- `orcca/runtime_launchers.py`: built-in + custom launcher resolution
|
|
62
|
+
- `orcca/dagger.py`: generated-artifact DAG utilities
|
|
63
|
+
- `orcca/cli.py`: user-facing commands
|
|
64
|
+
|
|
65
|
+
Packaged schema/rules:
|
|
66
|
+
|
|
67
|
+
- `orcca/resources/schema/flow-linkml.yaml`
|
|
68
|
+
- `orcca/resources/rules/business-rules.yaml`
|
|
69
|
+
|
|
70
|
+
## Manifest Resolution Semantics
|
|
71
|
+
|
|
72
|
+
Orcca resolves manifests in this order:
|
|
73
|
+
|
|
74
|
+
1. Resolve `includes` recursively in depth-first, declaration order.
|
|
75
|
+
2. Merge include payloads into a single root payload.
|
|
76
|
+
3. Merge the root manifest payload on top.
|
|
77
|
+
4. Resolve `configs` in declaration order.
|
|
78
|
+
5. Interpolate `${config['output_dir']}`-style placeholders after merging is complete.
|
|
79
|
+
6. Placeholder substitutions must resolve to scalar values, not lists or dictionaries.
|
|
80
|
+
|
|
81
|
+
Merge behavior:
|
|
82
|
+
|
|
83
|
+
- dict values replace completely
|
|
84
|
+
- list-valued keys inside dicts: merged with the same list rules
|
|
85
|
+
- lists of scalars: append + dedupe while preserving first-seen order
|
|
86
|
+
- lists of `{id: ...}` entities: overwrite by `id`
|
|
87
|
+
- scalars/type mismatch: latest wins
|
|
88
|
+
|
|
89
|
+
Config files use the same merge rules as manifest root slots, so later files can override
|
|
90
|
+
earlier ones without changing the merge model.
|
|
91
|
+
|
|
92
|
+
Declarative slots such as `id`, `name`, `description`, `notes`, `envvar_name`, and
|
|
93
|
+
`param_name` must be written as explicit literals and may not use
|
|
94
|
+
`${config['output_dir']}`-style interpolation.
|
|
95
|
+
Placeholder substitutions must resolve to scalar values, not lists or dictionaries.
|
|
96
|
+
|
|
97
|
+
This matters for override design: unblinded manifests should include base first, then
|
|
98
|
+
override files that only change allowed slots.
|
|
99
|
+
|
|
100
|
+
## Workflow Model
|
|
101
|
+
|
|
102
|
+
Primary slots:
|
|
103
|
+
|
|
104
|
+
- `study`
|
|
105
|
+
- `standards`
|
|
106
|
+
- `artifacts`
|
|
107
|
+
- `artifact_groups`
|
|
108
|
+
- `runtimes`
|
|
109
|
+
- `tasks`
|
|
110
|
+
- `validations`
|
|
111
|
+
- `deliveries`
|
|
112
|
+
- `execution`
|
|
113
|
+
- `blinding_mode`
|
|
114
|
+
|
|
115
|
+
Important modeling rules:
|
|
116
|
+
|
|
117
|
+
- `tasks.outputs` must reference declared artifacts.
|
|
118
|
+
- `tasks.inputs` can reference declared artifacts or transient IDs used internally.
|
|
119
|
+
- `required_tasks` provides explicit execution sequencing independent of artifact lineage.
|
|
120
|
+
|
|
121
|
+
## Blinded/Unblinded Mode
|
|
122
|
+
|
|
123
|
+
Run mode:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
blinding_mode: blinded # or unblinded
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Artifact variants:
|
|
130
|
+
|
|
131
|
+
- `variant` is optional and only needed for paired blinded/unblinded artifacts.
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
artifacts:
|
|
135
|
+
- id: rand_map
|
|
136
|
+
variant: blinded
|
|
137
|
+
name: Randomization Map
|
|
138
|
+
type: lookup_dataset
|
|
139
|
+
origin: external
|
|
140
|
+
path: outputs/rand_map_blinded.csv
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Unblinded pattern:
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
includes:
|
|
147
|
+
- workflow_blinded.yaml
|
|
148
|
+
- manifests/artifacts_unblinded.yaml
|
|
149
|
+
|
|
150
|
+
blinding_mode: unblinded
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Declarative slots must remain literal and may not use quoted config interpolation placeholders.
|
|
154
|
+
|
|
155
|
+
## CLI
|
|
156
|
+
|
|
157
|
+
Top-level commands:
|
|
158
|
+
|
|
159
|
+
- `orcca validate <manifest.yaml>`
|
|
160
|
+
- `orcca plan <manifest.yaml>`
|
|
161
|
+
- `orcca run <manifest.yaml> [--project-root <path>]`
|
|
162
|
+
- `orcca env-cache list|prune [--all]`
|
|
163
|
+
- `orcca init [path]`
|
|
164
|
+
|
|
165
|
+
Useful run flags:
|
|
166
|
+
|
|
167
|
+
- `--task <id>` (repeatable)
|
|
168
|
+
- `--artifact <id>` (repeatable)
|
|
169
|
+
- `--run-validations`
|
|
170
|
+
- `--validation-id <id>` (repeatable; requires `--run-validations`)
|
|
171
|
+
- `--no-execute`
|
|
172
|
+
- `--no-env-cache`
|
|
173
|
+
- `--refresh-env`
|
|
174
|
+
|
|
175
|
+
Run root behavior:
|
|
176
|
+
|
|
177
|
+
- `--project-root` controls execution root and run artifact root
|
|
178
|
+
- runs are stored under `<project-root>/.orcca/runs`
|
|
179
|
+
|
|
180
|
+
## Execution and Reports
|
|
181
|
+
|
|
182
|
+
`run_workflow(...)` pipeline:
|
|
183
|
+
|
|
184
|
+
1. resolve manifest
|
|
185
|
+
2. validate manifest
|
|
186
|
+
3. execute tasks (optional)
|
|
187
|
+
4. package deliveries (when configured)
|
|
188
|
+
5. optionally execute selected validation tasks
|
|
189
|
+
6. write run artifacts
|
|
190
|
+
|
|
191
|
+
Per-run artifacts:
|
|
192
|
+
|
|
193
|
+
- `resolved_manifest.yaml`
|
|
194
|
+
- `run_report.html`
|
|
195
|
+
- task logs under `logs/`
|
|
196
|
+
- task context payloads under `task-context/`
|
|
197
|
+
|
|
198
|
+
## Runtime Model
|
|
199
|
+
|
|
200
|
+
Built-in launchers:
|
|
201
|
+
|
|
202
|
+
- `python`
|
|
203
|
+
- `rscript`
|
|
204
|
+
- `julia`
|
|
205
|
+
- `container`
|
|
206
|
+
|
|
207
|
+
Custom launchers:
|
|
208
|
+
|
|
209
|
+
- auto-loaded from `launchers/*.py`
|
|
210
|
+
- optional `launchers/register.py`
|
|
211
|
+
- launcher file rule: filename stem must match exported function name
|
|
212
|
+
|
|
213
|
+
Package-manager environments:
|
|
214
|
+
|
|
215
|
+
- cached under `.orcca/cache/environments/`
|
|
216
|
+
- managers: `pip`, `venv`, `renv`, `julia_pkg` (+ explicit restore command for others)
|
|
217
|
+
|
|
218
|
+
Container environments:
|
|
219
|
+
|
|
220
|
+
- source types: `registry`, `archive`, `build`
|
|
221
|
+
- archive load and local build workflows supported
|
|
222
|
+
|
|
223
|
+
## Validation and IDP
|
|
224
|
+
|
|
225
|
+
Validation uses:
|
|
226
|
+
|
|
227
|
+
- LinkML schema validation
|
|
228
|
+
- business-rule validation
|
|
229
|
+
- cross-reference checks and dependency checks
|
|
230
|
+
|
|
231
|
+
IDP (`check_type: independent_double_programming`) supports:
|
|
232
|
+
|
|
233
|
+
- artifact/group targets
|
|
234
|
+
- explicit `validation_task`
|
|
235
|
+
- validation targets and validation task references
|
|
236
|
+
- tool metadata via `tool`
|
|
237
|
+
|
|
238
|
+
Recommended IDP pattern:
|
|
239
|
+
|
|
240
|
+
- keep `targets` for business ownership
|
|
241
|
+
- use `validation_task` for executable provenance
|
|
242
|
+
- keep validation outputs easy to inspect in reports and logs
|
|
243
|
+
|
|
244
|
+
## Examples in Repo
|
|
245
|
+
|
|
246
|
+
Reference workflows:
|
|
247
|
+
|
|
248
|
+
- `testing/e2e_python_native/workflow.yaml`
|
|
249
|
+
- `testing/e2e_r_native/workflow.yaml`
|
|
250
|
+
- `testing/e2e_julia_native/workflow.yaml`
|
|
251
|
+
- `testing/e2e_sdtm/workflow.yaml`
|
|
252
|
+
|
|
253
|
+
Blinding handoff example:
|
|
254
|
+
|
|
255
|
+
- `testing/blinding_handoff/README.md`
|
|
256
|
+
|
|
257
|
+
## Development
|
|
258
|
+
|
|
259
|
+
Install:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
pip install -e .[dev]
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Run tests:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
pytest -q
|
|
269
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
Orcca.egg-info/PKG-INFO
|
|
4
|
+
Orcca.egg-info/SOURCES.txt
|
|
5
|
+
Orcca.egg-info/dependency_links.txt
|
|
6
|
+
Orcca.egg-info/entry_points.txt
|
|
7
|
+
Orcca.egg-info/requires.txt
|
|
8
|
+
Orcca.egg-info/top_level.txt
|
|
9
|
+
orcca/__init__.py
|
|
10
|
+
orcca/cli.py
|
|
11
|
+
orcca/click_cli.py
|
|
12
|
+
orcca/dagger.py
|
|
13
|
+
orcca/executor.py
|
|
14
|
+
orcca/io_utils.py
|
|
15
|
+
orcca/launchers.py
|
|
16
|
+
orcca/resolver.py
|
|
17
|
+
orcca/runtime_launchers.py
|
|
18
|
+
orcca/validator.py
|
|
19
|
+
orcca/workflow.py
|
|
20
|
+
orcca/workflow_runner.py
|
|
21
|
+
orcca/resources/__init__.py
|
|
22
|
+
orcca/resources/rules/business-rules.yaml
|
|
23
|
+
orcca/resources/schema/business-rules-linkml.yaml
|
|
24
|
+
orcca/resources/schema/flow-linkml.yaml
|
|
25
|
+
tests/test_cli_cache_init.py
|
|
26
|
+
tests/test_cli_launcher_autoload.py
|
|
27
|
+
tests/test_container_image_source_types_integration.py
|
|
28
|
+
tests/test_container_image_source_types_podman_integration.py
|
|
29
|
+
tests/test_dagger.py
|
|
30
|
+
tests/test_executor.py
|
|
31
|
+
tests/test_io_utils.py
|
|
32
|
+
tests/test_native_language_templates.py
|
|
33
|
+
tests/test_package_manager_integration.py
|
|
34
|
+
tests/test_resolver.py
|
|
35
|
+
tests/test_runtime_adapters.py
|
|
36
|
+
tests/test_sdtm_fixture.py
|
|
37
|
+
tests/test_validator.py
|
|
38
|
+
tests/test_workflow_runner.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
orcca
|
orcca-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Orcca
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Manifest-driven clinical workflow orchestration framework
|
|
5
|
+
Author: Athenkosi Nkonyeni
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: clinical-trials,workflow,orchestration,manifest,data-pipeline
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: PyYAML>=6.0
|
|
19
|
+
Requires-Dist: jsonschema>=4.0
|
|
20
|
+
Requires-Dist: linkml>=1.8
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
23
|
+
|
|
24
|
+
# Orcca
|
|
25
|
+
|
|
26
|
+
Orcca is a manifest-driven orchestration framework for clinical programming workflows.
|
|
27
|
+
It is designed for teams that need reproducible execution, explicit dependency modeling,
|
|
28
|
+
and clear run reporting.
|
|
29
|
+
|
|
30
|
+
## Current State
|
|
31
|
+
|
|
32
|
+
- Package version: `0.1.0` (alpha)
|
|
33
|
+
- Python: `>=3.11`
|
|
34
|
+
- Core dependencies: `PyYAML`, `jsonschema`, `linkml`
|
|
35
|
+
- Entry point: `orcca` CLI (`orcca.cli:main`)
|
|
36
|
+
|
|
37
|
+
This project is currently optimized for practical workflow execution and validation with a
|
|
38
|
+
strong traceability model, not for broad general-purpose scheduling.
|
|
39
|
+
|
|
40
|
+
## What Orcca Does
|
|
41
|
+
|
|
42
|
+
Orcca provides:
|
|
43
|
+
|
|
44
|
+
- declarative workflow modeling in YAML
|
|
45
|
+
- manifest include/config resolution
|
|
46
|
+
- LinkML + business-rule validation
|
|
47
|
+
- executable task orchestration with dependency-aware scheduling
|
|
48
|
+
- runtime preflight for package-manager and container environments
|
|
49
|
+
- run reporting (`run_report.html`) and task logs
|
|
50
|
+
- validation task execution for independent double programming (IDP)
|
|
51
|
+
- `blinding_mode`-based blinded/unblinded workflow control
|
|
52
|
+
|
|
53
|
+
## Core Architecture
|
|
54
|
+
|
|
55
|
+
Main modules:
|
|
56
|
+
|
|
57
|
+
- `orcca/resolver.py`: include/config merge and placeholder interpolation
|
|
58
|
+
- `orcca/validator.py`: LinkML validation + business rules
|
|
59
|
+
- `orcca/executor.py`: task execution engine + runtime preflight
|
|
60
|
+
- `orcca/workflow_runner.py`: end-to-end orchestration pipeline and run reports
|
|
61
|
+
- `orcca/runtime_launchers.py`: built-in + custom launcher resolution
|
|
62
|
+
- `orcca/dagger.py`: generated-artifact DAG utilities
|
|
63
|
+
- `orcca/cli.py`: user-facing commands
|
|
64
|
+
|
|
65
|
+
Packaged schema/rules:
|
|
66
|
+
|
|
67
|
+
- `orcca/resources/schema/flow-linkml.yaml`
|
|
68
|
+
- `orcca/resources/rules/business-rules.yaml`
|
|
69
|
+
|
|
70
|
+
## Manifest Resolution Semantics
|
|
71
|
+
|
|
72
|
+
Orcca resolves manifests in this order:
|
|
73
|
+
|
|
74
|
+
1. Resolve `includes` recursively in depth-first, declaration order.
|
|
75
|
+
2. Merge include payloads into a single root payload.
|
|
76
|
+
3. Merge the root manifest payload on top.
|
|
77
|
+
4. Resolve `configs` in declaration order.
|
|
78
|
+
5. Interpolate `${config['output_dir']}`-style placeholders after merging is complete.
|
|
79
|
+
6. Placeholder substitutions must resolve to scalar values, not lists or dictionaries.
|
|
80
|
+
|
|
81
|
+
Merge behavior:
|
|
82
|
+
|
|
83
|
+
- dict values replace completely
|
|
84
|
+
- list-valued keys inside dicts: merged with the same list rules
|
|
85
|
+
- lists of scalars: append + dedupe while preserving first-seen order
|
|
86
|
+
- lists of `{id: ...}` entities: overwrite by `id`
|
|
87
|
+
- scalars/type mismatch: latest wins
|
|
88
|
+
|
|
89
|
+
Config files use the same merge rules as manifest root slots, so later files can override
|
|
90
|
+
earlier ones without changing the merge model.
|
|
91
|
+
|
|
92
|
+
Declarative slots such as `id`, `name`, `description`, `notes`, `envvar_name`, and
|
|
93
|
+
`param_name` must be written as explicit literals and may not use
|
|
94
|
+
`${config['output_dir']}`-style interpolation.
|
|
95
|
+
Placeholder substitutions must resolve to scalar values, not lists or dictionaries.
|
|
96
|
+
|
|
97
|
+
This matters for override design: unblinded manifests should include base first, then
|
|
98
|
+
override files that only change allowed slots.
|
|
99
|
+
|
|
100
|
+
## Workflow Model
|
|
101
|
+
|
|
102
|
+
Primary slots:
|
|
103
|
+
|
|
104
|
+
- `study`
|
|
105
|
+
- `standards`
|
|
106
|
+
- `artifacts`
|
|
107
|
+
- `artifact_groups`
|
|
108
|
+
- `runtimes`
|
|
109
|
+
- `tasks`
|
|
110
|
+
- `validations`
|
|
111
|
+
- `deliveries`
|
|
112
|
+
- `execution`
|
|
113
|
+
- `blinding_mode`
|
|
114
|
+
|
|
115
|
+
Important modeling rules:
|
|
116
|
+
|
|
117
|
+
- `tasks.outputs` must reference declared artifacts.
|
|
118
|
+
- `tasks.inputs` can reference declared artifacts or transient IDs used internally.
|
|
119
|
+
- `required_tasks` provides explicit execution sequencing independent of artifact lineage.
|
|
120
|
+
|
|
121
|
+
## Blinded/Unblinded Mode
|
|
122
|
+
|
|
123
|
+
Run mode:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
blinding_mode: blinded # or unblinded
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Artifact variants:
|
|
130
|
+
|
|
131
|
+
- `variant` is optional and only needed for paired blinded/unblinded artifacts.
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
artifacts:
|
|
135
|
+
- id: rand_map
|
|
136
|
+
variant: blinded
|
|
137
|
+
name: Randomization Map
|
|
138
|
+
type: lookup_dataset
|
|
139
|
+
origin: external
|
|
140
|
+
path: outputs/rand_map_blinded.csv
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Unblinded pattern:
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
includes:
|
|
147
|
+
- workflow_blinded.yaml
|
|
148
|
+
- manifests/artifacts_unblinded.yaml
|
|
149
|
+
|
|
150
|
+
blinding_mode: unblinded
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Declarative slots must remain literal and may not use quoted config interpolation placeholders.
|
|
154
|
+
|
|
155
|
+
## CLI
|
|
156
|
+
|
|
157
|
+
Top-level commands:
|
|
158
|
+
|
|
159
|
+
- `orcca validate <manifest.yaml>`
|
|
160
|
+
- `orcca plan <manifest.yaml>`
|
|
161
|
+
- `orcca run <manifest.yaml> [--project-root <path>]`
|
|
162
|
+
- `orcca env-cache list|prune [--all]`
|
|
163
|
+
- `orcca init [path]`
|
|
164
|
+
|
|
165
|
+
Useful run flags:
|
|
166
|
+
|
|
167
|
+
- `--task <id>` (repeatable)
|
|
168
|
+
- `--artifact <id>` (repeatable)
|
|
169
|
+
- `--run-validations`
|
|
170
|
+
- `--validation-id <id>` (repeatable; requires `--run-validations`)
|
|
171
|
+
- `--no-execute`
|
|
172
|
+
- `--no-env-cache`
|
|
173
|
+
- `--refresh-env`
|
|
174
|
+
|
|
175
|
+
Run root behavior:
|
|
176
|
+
|
|
177
|
+
- `--project-root` controls execution root and run artifact root
|
|
178
|
+
- runs are stored under `<project-root>/.orcca/runs`
|
|
179
|
+
|
|
180
|
+
## Execution and Reports
|
|
181
|
+
|
|
182
|
+
`run_workflow(...)` pipeline:
|
|
183
|
+
|
|
184
|
+
1. resolve manifest
|
|
185
|
+
2. validate manifest
|
|
186
|
+
3. execute tasks (optional)
|
|
187
|
+
4. package deliveries (when configured)
|
|
188
|
+
5. optionally execute selected validation tasks
|
|
189
|
+
6. write run artifacts
|
|
190
|
+
|
|
191
|
+
Per-run artifacts:
|
|
192
|
+
|
|
193
|
+
- `resolved_manifest.yaml`
|
|
194
|
+
- `run_report.html`
|
|
195
|
+
- task logs under `logs/`
|
|
196
|
+
- task context payloads under `task-context/`
|
|
197
|
+
|
|
198
|
+
## Runtime Model
|
|
199
|
+
|
|
200
|
+
Built-in launchers:
|
|
201
|
+
|
|
202
|
+
- `python`
|
|
203
|
+
- `rscript`
|
|
204
|
+
- `julia`
|
|
205
|
+
- `container`
|
|
206
|
+
|
|
207
|
+
Custom launchers:
|
|
208
|
+
|
|
209
|
+
- auto-loaded from `launchers/*.py`
|
|
210
|
+
- optional `launchers/register.py`
|
|
211
|
+
- launcher file rule: filename stem must match exported function name
|
|
212
|
+
|
|
213
|
+
Package-manager environments:
|
|
214
|
+
|
|
215
|
+
- cached under `.orcca/cache/environments/`
|
|
216
|
+
- managers: `pip`, `venv`, `renv`, `julia_pkg` (+ explicit restore command for others)
|
|
217
|
+
|
|
218
|
+
Container environments:
|
|
219
|
+
|
|
220
|
+
- source types: `registry`, `archive`, `build`
|
|
221
|
+
- archive load and local build workflows supported
|
|
222
|
+
|
|
223
|
+
## Validation and IDP
|
|
224
|
+
|
|
225
|
+
Validation uses:
|
|
226
|
+
|
|
227
|
+
- LinkML schema validation
|
|
228
|
+
- business-rule validation
|
|
229
|
+
- cross-reference checks and dependency checks
|
|
230
|
+
|
|
231
|
+
IDP (`check_type: independent_double_programming`) supports:
|
|
232
|
+
|
|
233
|
+
- artifact/group targets
|
|
234
|
+
- explicit `validation_task`
|
|
235
|
+
- validation targets and validation task references
|
|
236
|
+
- tool metadata via `tool`
|
|
237
|
+
|
|
238
|
+
Recommended IDP pattern:
|
|
239
|
+
|
|
240
|
+
- keep `targets` for business ownership
|
|
241
|
+
- use `validation_task` for executable provenance
|
|
242
|
+
- keep validation outputs easy to inspect in reports and logs
|
|
243
|
+
|
|
244
|
+
## Examples in Repo
|
|
245
|
+
|
|
246
|
+
Reference workflows:
|
|
247
|
+
|
|
248
|
+
- `testing/e2e_python_native/workflow.yaml`
|
|
249
|
+
- `testing/e2e_r_native/workflow.yaml`
|
|
250
|
+
- `testing/e2e_julia_native/workflow.yaml`
|
|
251
|
+
- `testing/e2e_sdtm/workflow.yaml`
|
|
252
|
+
|
|
253
|
+
Blinding handoff example:
|
|
254
|
+
|
|
255
|
+
- `testing/blinding_handoff/README.md`
|
|
256
|
+
|
|
257
|
+
## Development
|
|
258
|
+
|
|
259
|
+
Install:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
pip install -e .[dev]
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Run tests:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
pytest -q
|
|
269
|
+
```
|