feat(ro-crate-1.2): introduce validation profile for RO-Crate 1.2#164
Open
kikkomep wants to merge 160 commits into
Open
feat(ro-crate-1.2): introduce validation profile for RO-Crate 1.2#164kikkomep wants to merge 160 commits into
kikkomep wants to merge 160 commits into
Conversation
…of contextual entities
…recommended requirement)
…pplication and ComputerLanguage entities
… and ComputerLanguage entities
… Root Data Entity)
…oftwareApplication and ComputerLanguage entities
…ation and ComputerLanguage entities
11 tasks
Member
|
I tried validating this crate: crate_0002_eiuuqb-ro-crate-metadata.json and got this result: Problems encountered:
|
Member
Author
The first and last points were actually already fixed in develop; they were caused by internal issues in the validation/reporting logic rather than by the rule itself. Regarding the first issue ( |
Member
|
I'm getting a weird behavior with the following crate: The validation passes with no errors: But I get the following on the console: These messages disappear if I add |
Member
Author
|
issue with crate_0004_bmfhbn.zip fixed by 9468652 and b37bc0e |
b282d0d to
b37bc0e
Compare
…lity-flag tests
b37bc0e to
28d71af
Compare
…e 1.2 checkers - Reorder imports consistently (stdlib → third-party → local) - Extract helper methods (_resolve_cite_as_url, _not_downloadable_message, _needs_sddatepublished_check, _check_entity_local_path, _check_distribution) - Replace try/except/pass with contextlib.suppress - Flatten nested conditionals with combined guards - Use e!s over str(e) in f-strings - Normalize quote style and multi-line formatting
…-Crate 1.2 test suite
28d71af to
ba83e51
Compare
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.
This PR introduces an initial implementation of the validation profile compliant with the RO-Crate 1.2 specification, adding support for validating crates that declare this version in their
conformsToproperty.The implementation covers the core requirements of the specification, in particular those listed in the quick reference. Any additional rules specific to derived profiles (e.g., Workflow RO-Crate) will be addressed in subsequent PRs, where needed.
How to test
The code is available on the
feat/ro-crate-1.2branch and can be installed as usual via Poetry:Development and testing were carried out using the few examples provided by the specification, together with additional ones defined ad hoc and derived from it. These ad hoc examples are located under
tests/data/crates/ro-crate-1.2: for each significant requirement (particularly the new ones) in every section of the quick reference, the folder contains a valid crate along with several invalid ones, each designed to exercise a specific violation of that requirement.CLI options
A few new CLI options have been introduced. In particular, validation now performs additional availability checks on the resources referenced by the RO-Crate. Since these checks require remote connections, they can be disabled via the
--skip-availability-checkflag:Any kind of feedback (bug reports, misinterpretations of the specs, edge cases we may have missed, etc.) is very welcome and much appreciated 🙂
[related to #107]