Conversation
Replace hand-built JSON-LD references with the library's own APIs: - add people via rocrate.model.Person instead of a ContextEntity with a manual @type - link root and entity properties with append_to, which preserves existing values instead of overwriting them - build the CreateAction with crate.add_action, which sets the @type and takes instrument/object/result directly Root author, conformsTo and license are now arrays rather than single values, which is valid JSON-LD and is what append_to produces; three test assertions and the committed example crate are updated to match.
Root conformsTo now lists the Process Run Crate profile alongside the FL profile, with a Profile contextual entity for each as RO-Crate 1.2 requires. Validating with rocrate-validator surfaced several defects, all fixed: timestamps carried sub-second precision that failed ISO 8601 checks, the model file had no encodingFormat, File entities had no contentSize, and SoftwareApplication entities for the strategy and for dependencies outside the known-frameworks map had no url. Version is now recorded as version rather than softwareVersion, which the RO-Crate 1.2 profile requires. The crate validates against ro-crate-1.2 at REQUIRED severity with no issues. The example crate is regenerated to match.
Declare conformance to Process Run Crate and fix validation issues
| ], | ||
| "conformsTo": [ | ||
| { | ||
| "@id": "https://esciencelab.org.uk/federated-learning-ro-crate-profile/federated-learning-profile.html" |
There was a problem hiding this comment.
We need a permalink for this, it is not good to use an unversioned HTML page as a Profile, for instance we would then need to use <link> signposting in the HTML to upgrade it to a Profile Crate.
There was a problem hiding this comment.
what would you recommend for the permalink? presumably something under w3id/ro -
https://w3id.org/ro/fl-crate ?
I anticipated that the original version of the profile would need changes during flwrCrate implementation but it's been okay! so we probably can freeze the version now as 0.1
| }, | ||
| "license": [ | ||
| { | ||
| "@id": "https://spdx.org/licenses/MIT.html" |
There was a problem hiding this comment.
SPDX identifiers should not have .html but should match the identifiers in their RDF serialisations https://github.com/spdx/license-list-data e.g. https://github.com/spdx/license-list-data/blob/main/jsonld/MIT.jsonld defines http://spdx.org/licenses/MIT (note http and no .html)
| "https://esciencelab.org.uk/federated-learning-ro-crate-profile/" | ||
| "federated-learning-profile.html" | ||
| ) | ||
| PROCESS_RUN_CRATE = "https://w3id.org/ro/wfrun/process/0.5" |
There was a problem hiding this comment.
https://w3id.org/ro/wfrun/process/0.6 has now been released, based on RO-Crate 1.3 but otherwise not changed.
Addresses all three suggestions in the issue.
Personhelper —_person()now buildsrocrate.model.Personinstead of aContextEntitywith a hand-written"@type": "Person".append_to— root and entity properties (conformsTo,license,author,mentions,additionalProperty) are linked withappend_torather than direct assignment, so existing values are preserved. The instrument/object/result/metric lists now collect entities directly instead of hand-built{"@id": ...}dicts — the library converts them to references.add_action— the#fl-runCreateAction is built withcrate.add_action(...), which sets the@typeand takesinstrument/object/resultas arguments (its own empty-value guards replace the manualifchecks).Closes #13