How to build a FAIRSCAPE Release¶
The process is a little complicated I hope to explain its current state and come up with a better future solution without just adding more commands.
Overview¶
The build release command can operate in two modes:
- Full pre-processing (default): Processes all subcrates, then creates the release crate.
- Skip pre-processing (
--skip-subcrate-processing): Creates the release crate without processing subcrates. The sub-crates would need to be later linked to the release crate and processed.
What does processing sub-crates mean?¶
Processing function is located in src/fairscape_cli/utils/build_utils.py, this function performs four steps on each subcrate found in the release directory:
| Step | Function | Description |
|---|---|---|
| 1 | process_link_inverses() |
Adds OWL inverse properties using the EVI |
| 2 | process_add_io() |
Calculates and adds EVI:inputs and EVI:outputs to the root ro-crate |
| 3 | process_evidence_graph() |
Generates provenance graph JSON and HTML |
| 4 | process_croissant() |
Converts RO-Crate metadata to Croissant |
| 5* | buld_preivew() |
Builds html preview for the RO-Crate |
Mapping to CLI Commands¶
Each processing step can be executed using CLI commands:
| Processing Step | Equivalent CLI Command |
|---|---|
process_link_inverses() |
fairscape augment link-inverses <rocrate-path> |
process_add_io() |
fairscape augment add-io <rocrate-path> |
process_evidence_graph() |
fairscape build evidence-graph <rocrate-path> <ark-id> |
process_croissant() |
fairscape build croissant <rocrate-path> |
build_preview() |
fairscape build preview <rocrate-path> |
Why do Subcrates need to be processed¶
The CLI doesn't know while creating and adding things when the subcrate is completed. So once the user is finished with the subcrate some post-processing occurs to make it "release ready". This post-processing adds missing terms IE fills in generated or generatedBy to make sure all terms are pointing in both directions. Fills in I/O information important for crates saying they were generated by other crates. Creates useful supporting documents and formats HTML Preview, Croissant, and evidence graphs. A sub-crate is valid without all this, but these are an important part of our release processing.
How to make release first sub-crates later better?¶
- Add build preview (needed regardless).
- Add augment sub-crate that does all 4 steps so you don't need to do them individually.
- Somehow link and rebuild release? Aggregated metrics rebuilt datasheet with pointers to sub-crate