Small SHACL fixes; test RECOMMENDED checks on valid crates#58
Merged
Small SHACL fixes; test RECOMMENDED checks on valid crates#58
Conversation
elichad
commented
Jan 5, 2026
| sh:name "object" ; | ||
| sh:path schema:object ; | ||
| sh:minCount 1 ; | ||
| sh:hasValue ro-crate:RootDataEntity ; |
Author
There was a problem hiding this comment.
This snuck through the tests as it only fails the valid crate at RECOMMENDED level - which we don't test for (same for the Validation Phase check below). It turns out to be hard to test - see crs4#135, I'm trying to put together another PR to get those tests in never mind, it's included here now
elichad
commented
Jan 5, 2026
| # There SHOULD be a Sign-Off Phase | ||
| five-safes-crate:SignOffPhase | ||
| a sh:NodeShape ; | ||
| sh:targetNode <./> ; |
Author
There was a problem hiding this comment.
This is just a style change really as in 5SROC the RDE should always be <./> - but the change makes it a bit more robust and aligned with the rest of our checks
elichad
commented
Jan 5, 2026
Comment on lines
+55
to
+61
| @pytest.mark.xfail( | ||
| reason=""" | ||
| Checks that ensure certain Five Safes actions are present currently fail for this crate, | ||
| as this crate represents an early stage of a process before those actions have happened. | ||
| """ | ||
| ) | ||
| def test_valid_five_safes_crate_request_recommended(): |
Author
There was a problem hiding this comment.
we don't strictly need to include this test since it fails right now. But if/when we manage to implement dynamic enabling of phase-specific checks, this will eventually pass
elichad
commented
Jan 15, 2026
Comment on lines
+28
to
+41
| # Dynamically fetch the SKIP_WEB_RESOURCE_AVAILABILITY_IDENTIFIER | ||
| # required as disable_inherited_profiles_reporting does not disable Python checks from | ||
| # inherited profiles (https://github.com/crs4/rocrate-validator/issues/135) | ||
| rocrate_profile = services.get_profile("ro-crate") | ||
| if not rocrate_profile: | ||
| raise RuntimeError("Unable to load the RO-Crate profile") | ||
| check_local_data_entity_existence = rocrate_profile.get_requirement_check( | ||
| "Web-based Data Entity: resource availability" | ||
| ) | ||
| assert ( | ||
| check_local_data_entity_existence | ||
| ), "Unable to find the requirement 'Web-based Data Entity: resource availability'" | ||
| SKIP_WEB_RESOURCE_AVAILABILITY_IDENTIFIER = check_local_data_entity_existence.identifier | ||
|
|
Author
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.
objectpointing to the RDEdo_entity_testto accept arbitrary validation settings so the tests above can work (will also PR this upstream)