Ro crate validator - #2686
Open
AbbyGavin wants to merge 28 commits into
Open
Conversation
modified: test/functional/workflows_controller_test.rb
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces RO-Crate validation during workflow RO-Crate uploads by invoking a Python-based validator before attempting to parse/extract the crate, and updates tests to reflect the new validation/error behavior.
Changes:
- Add a Python script (
script/validate-ro-crate.py) to run RO-Crate validation and print validation issues. - Invoke the validator from
WorkflowCrateExtractoronly when the crate includesro-crate-metadata.json(i.e., not RO-Crate 1.0.jsonldcrates). - Update test expectations (including normalized
source_link_urlwith a trailing slash and new validation error messaging).
Reviewed changes
Copilot reviewed 4 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/forms/workflow_crate_extractor.rb | Adds conditional pre-parse RO-Crate validation via an external Python validator. |
| script/validate-ro-crate.py | New validator runner script that prints validation issues for the Ruby layer to surface. |
| requirements.txt | Adds the validator dependency and updates cwltool version. |
| test/functional/workflows_controller_test.rb | Updates expectations for the new validation error output. |
| test/integration/api/git_workflow_ro_crate_api_test.rb | Updates expectations for source_link_url normalization (trailing slash). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fbacall
reviewed
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding validation to uploaded RO crates. This uses a python based validator: https://github.com/crs4/rocrate-validator. Currently this doesn't have version 1.3 validation, though they have an issue for it crs4/rocrate-validator#179. It doesn't support version 1.0 crates, so we first check if the crate contains an
ro-crate-metadata.jsonfile. If it doesn't, we pass through to the existing validation since version 1.0 crates use anro-crate-metadata.jsonldfile instead.Fixes #1191.