Skip to content

Validate generated crates against RO-Crate 1.2 - #25

Open
faizollah wants to merge 2 commits into
mainfrom
15-validate-ro-crate-1.2
Open

faizollah wants to merge 2 commits into
mainfrom
15-validate-ro-crate-1.2

Conversation

@faizollah

Copy link
Copy Markdown
Collaborator

Adds rocrate-validator to the test setup and CI, and validates generated crates against RO-Crate 1.2 and Process Run Crate.

Changes

  • roc-validator>=0.13 added to the dev extra and installed in tests.yml.
  • New tests/test_validation.py: builds a crate and checks it against ro-crate-1.2 and process-run-crate-0.5 at REQUIRED level, plus a test that a missing licence is reported.
  • The real-app e2e (realapps.yml / tests/e2e/validate_crate.py) now runs the same validation on a crate from an actual Flower run.
  • README: minimum rocrate version, the Validation section and the development setup updated; a duplicated comment in test_integration.py removed.

Validation runs with offline=True, which since 0.13 reads only the validator's HTTP cache, so CI fills the cache first with rocrate-validator cache warm. The profile is named explicitly, because recent versions default to RO-Crate 1.3. Process Run Crate is checked against the 0.5 profile with disable_inherited_profiles_issue_reporting=True, as suggested, since the validator has no 0.6 profile yet.

The opt-in checks added in 0.13 are enabled as well (extra_checks=True). Their findings don't affect passed(), so the tests assert separately that there are none. Our crates currently have none.

RO-Crate version is now pinned

ro-crate-py 0.16.0 (released 6 Oct) changed its default output to RO-Crate 1.3. flwrCrate never set the version, so what it wrote depended on the installed ro-crate-py: 1.1 with 0.13/0.14, 1.2 with 0.15, 1.3 with 0.16. The e2e crate from 8 October was already RO-Crate 1.3, and the new 1.2 test failed under ro-crate-py 0.16. build_crate now uses ROCrate(version="1.2"), and the minimum is raised to rocrate>=0.15 (older versions don't accept version=). This also affects users of the released 0.4.0.

Dependency conflict to be aware of

rocrate-validator requires rich<14, while Flower 1.32+ (including the latest, 1.41) requires rich>=14, so they can't be installed in the same environment:

All 54 tests pass locally and in CI (Python 3.11–3.14, rocrate 0.16, roc-validator 0.13.0), and so does the real-app e2e.

Closes #15

Add rocrate-validator to the dev dependencies and CI, with tests that
build a crate and check it against the ro-crate-1.2 and
process-run-crate-0.5 profiles (offline, REQUIRED level), plus a check
that a missing licence is caught. The real-app e2e workflow now runs the
same validation, in its own virtual environment because
rocrate-validator requires rich<14 while current Flower requires rich>=14.

Pin the RO-Crate version written by build_crate to 1.2 and require
rocrate>=0.15: ro-crate-py 0.16 changed its default to RO-Crate 1.3, so
the version flwrCrate wrote depended on which ro-crate-py was installed.
@faizollah
faizollah requested a review from elichad October 22, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update validation tests to check against RO-Crate 1.2

1 participant