Skip to content

Commit 7b866ff

Browse files
committed
rq4 adding buildInstructions for environment file
1 parent 78101e2 commit 7b866ff

File tree

1 file changed

+53
-0
lines changed
  • docs/profiles/0.5-DRAFT/provenance_run_crate

1 file changed

+53
-0
lines changed

docs/profiles/0.5-DRAFT/provenance_run_crate/index.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,59 @@ In some workflow systems (e.g., CWL, Galaxy), tools are typically wrappers for a
466466
}
467467
```
468468

469+
## Tool runtime environment
470+
471+
While the `softwareRequirements` of a tool can [specify software dependencies](process_run_crate#specifying-software-dependencies) (as above) in terms of naming software, a more reproducible definition of a tool's runtime environment may need to include a particular set of binaries that are compiled and/or distributed to work together.
472+
473+
Some workflow engines support such package systems as a way to distribute tool dependencies, typically by referring to an _environment file_ which can be programmatically instansiated to retrieve and install a given set of binaries. In a Provenance Crate, environment files are indicated as `buildInstructions` for either the `HowToStep` (for a given step) or the `HowTo` (for the whole workflow).
474+
475+
For instance, to indicate a [Conda environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) for a Nextflow workflow:
476+
477+
```json
478+
{
479+
"@id": "main.nf",
480+
"@type": ["File", "SoftwareSourceCode", "ComputationalWorkflow", "HowTo"],
481+
"name": "Hello world in Nexflow",
482+
"programmingLanguage": {
483+
"@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow"
484+
},
485+
"buildInstructions": {
486+
"@id": "environment.yml"
487+
}
488+
},
489+
{
490+
"@id": "environment.yml",
491+
"@type": "File",
492+
"name": "Conda environment",
493+
"encodingFormat": "application/yaml",
494+
"conformsTo": {
495+
"@id": "https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually",
496+
}
497+
},
498+
{
499+
"@id": "https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually",
500+
"@type": "WebPageElement",
501+
"name": "Conda environment file"
502+
}
503+
```
504+
505+
506+
The `encodingFormat` and/or contextual identifier for `conformsTo` SHOULD be provided for machine-readable build/dependency environment fileds, but it is currently out of scope for this profile to list all possible package environment systems.
507+
508+
The term `buildInstructions` is taken from [CodeMeta terms](https://codemeta.github.io/terms/), which are [scheduled to be included](https://github.com/ResearchObject/ro-crate/pull/276) in the RO-Crate 1.2 JSON-LD context. For RO-Crate 1.1, the term must be added to the `@context` as:
509+
510+
```json
511+
{
512+
"@context": [
513+
"https://w3id.org/ro/crate/1.1/context",
514+
"https://w3id.org/ro/terms/workflow-run",
515+
{ "buildInstructions": "https://codemeta.github.io/terms/buildInstructions" }
516+
],
517+
"@graph": [...]
518+
}
519+
```
520+
521+
469522

470523
## Conditional step execution
471524

0 commit comments

Comments
 (0)