Five safes on upstream develop#126
Conversation
|
@EttoreM this PR is so big it makes the GitHub interface really slow! I have created #127 as an intermediate point (WIP while I merge it with our dev branch properly) - that brings in the updates from upstream, and then your updates to the profiles will sit in this PR and are easier to review in isolation. |
There was a problem hiding this comment.
Now that the profile is based on 1.2, we should be able to remove the 15_metadata_file checks altogether
| # required as disable_inherited_profiles_reporting does not disable Python checks from | ||
| # inherited profiles (https://github.com/crs4/rocrate-validator/issues/135) |
There was a problem hiding this comment.
this referenced issue has now been fixed, so this comment can be removed. I think we may as well keep the code the same though now we have it set up
| [], | ||
| [], | ||
| profile_identifier=( | ||
| # ro-crate-1.1 can't be used for Five Safes crates as they conform to 1.2 |
There was a problem hiding this comment.
please keep this comment as it's still relevant for now. FYI I've raised crs4#187 upstream to see if it's time for DEFAULT_PROFILE_IDENTIFIER to be updated to 1.2
| PREFIX shp: <https://w3id.org/shp#> | ||
| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
| PREFIX rocrate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> | ||
| PREFIX rocrate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate-1.2/> |
There was a problem hiding this comment.
I actually don't think we use this prefix in any of our tests, so suggest we remove it
| PREFIX rocrate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate-1.2/> |
|
Clarifying the plan here as I'm not sure I was clear enough in the meeting:
it's fine to go ahead with all of this while I'm away! |
Closes #112
Five Safes Crate on Upstream RO-Crate 1.2
Goal
The goal of the issue that this PR addresses is checking whether the Five Safes Crate profile, fixtures, and tests from this repository still work when placed on top of the upstream
crs4/rocrate-validatordevelopbranch, where the RO-Crate base profile has moved to RO-Crate 1.2.Steps Taken
1. Created a branch from upstream
developA new local branch was created from
crs4/rocrate-validator/develop:This made the upstream project the base of the work. This approach was deemed to be more suitable than backporting upstream RO-Crate 1.2 changes into the child repository.
2. Imported Five Safes Crate material
The Five Safes Crate material was copied from this repository's
developbranch into the new upstream-based branch:rocrate_validator/profiles/five-safes-crate/tests/integration/profiles/five-safes-crate/tests/data/crates/valid/five-safes-crate-request/tests/data/crates/valid/five-safes-crate-result/tests/data/crates/valid/five-safes-crate-multiple-context/tests/data/crates/valid/five-safes-profile-crate/tests/data/crates/invalid/five_safes_crate/3. Added Five Safes fixture helpers
tests/ro_crates.pywas updated with helpers for the imported Five Safes fixtures.It also adds
Invalid5sROCfor the invalid Five Safes context-version fixtures.4. Restored Five Safes SPARQL prefixes
tests/shared.pywas updated so SPARQL-based fixture mutation tests could use the necessary prefixes (shp:,rdf:,rocrate:, anddct:, in addition toschema:).The
rocrate:prefix was set to the upstream RO-Crate 1.2 internal namespace:5. Updated Five Safes to inherit RO-Crate 1.2
The Five Safes profile was updated from:
prof:isTransitiveProfileOf <https://w3id.org/ro/crate/1.1> ;to:
prof:isTransitiveProfileOf <https://w3id.org/ro/crate/1.2> ;This makes the Five Safes profile inherit the upstream RO-Crate 1.2 checks.
6. Updated internal RO-Crate shape namespace references
The imported Five Safes SHACL files referred to the old internal RO-Crate namespace:
Those references were updated to the upstream RO-Crate 1.2 namespace:
This was needed because upstream RO-Crate 1.2 marks internal inferred classes, such as
RootDataEntity, under thero-crate-1.2namespace.7. Updated one valid fixture for RO-Crate 1.2
The result fixture contains a
SoftwareApplicationentity:RO-Crate 1.2 requires
SoftwareApplicationentities to havename,url, andversion. The fixture already hadname, sourlandversionwere added.Tests Run
Positive tests:
Result:
Full Five Safes Crate profile suite (including negative tests based on graph modifications:
Result:
The test output includes many
rdflibandpyparsingdeprecation warnings. These warnings were already present during successful runs and did not indicate validation failures.