-
Notifications
You must be signed in to change notification settings - Fork 0
Add path for extra RO-Crate profiles #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
douglowe
wants to merge
15
commits into
develop
Choose a base branch
from
107-adapt-docker-container-entry-point-to-use-alternative-profiles-directory
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7c43c7f
profile path optional input for rocrate validation task
douglowe afa0354
clean config class, use for celery app, add profiles_path
douglowe e2a030a
provide route for passing profiles_path to rocrate validator call
douglowe 96955ff
update tests for profile_paths variable
douglowe 435199a
switch to extra_profiles_path option for validator additional profiles
douglowe ce29cde
docker compose profile loading example
douglowe 18b8884
integration test for providing extra profile for validation
douglowe 8f3fee0
full profile directory for crate validator, not extra profiles path
douglowe 6215b5f
profiles path (in develop) set for flask not celery worker
douglowe e1a1610
remove extraneous environment variables from dev celery worker
douglowe 3528684
remove extraneous environment variables from main celery worker
douglowe 7ec3824
add test profiles
douglowe 29887a2
add profile_name to API description in readme
douglowe 95ea1dc
API and docker updates in readme
douglowe 53cbe09
readme cleanup
douglowe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
46 changes: 46 additions & 0 deletions
46
tests/data/rocrate_validator_profiles/alpha-crate/1_root_data_entity.ttl
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Copyright (c) 2025 eScience Lab, The University of Manchester | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| @prefix ro: <./> . | ||
| @prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> . | ||
| @prefix alpha-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/alpha-crate/> . | ||
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
| @prefix schema: <http://schema.org/> . | ||
| @prefix sh: <http://www.w3.org/ns/shacl#> . | ||
| @prefix validator: <https://github.com/crs4/rocrate-validator/> . | ||
| @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
|
||
|
|
||
| alpha-crate:RootDataEntityRequiredProperties | ||
| a sh:NodeShape ; | ||
| sh:name "RootDataEntity" ; | ||
| sh:targetClass ro-crate:RootDataEntity ; | ||
|
|
||
| sh:property [ | ||
| a sh:PropertyShape ; | ||
| sh:name "sourceOrganization" ; | ||
| sh:path schema:sourceOrganization; | ||
| sh:minCount 1 ; | ||
| sh:severity sh:Violation ; | ||
| sh:message """The Root Data Entity MUST have a `sourceOrganization` property.""" ; | ||
| ] ; | ||
|
|
||
| sh:property [ | ||
| a sh:PropertyShape ; | ||
| sh:name "sourceOrganization" ; | ||
| sh:path schema:sourceOrganization ; | ||
| sh:class schema:Project ; | ||
| sh:severity sh:Violation ; | ||
| sh:message """The `sourceOrganization` property of the RootDataEntity MUST point to a Project entity.""" ; | ||
| ] . |
55 changes: 55 additions & 0 deletions
55
tests/data/rocrate_validator_profiles/alpha-crate/profile.ttl
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Copyright (c) 2024-2025 CRS4, University of Manchester | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| @prefix dct: <http://purl.org/dc/terms/> . | ||
| @prefix prof: <http://www.w3.org/ns/dx/prof/> . | ||
| @prefix role: <http://www.w3.org/ns/dx/prof/role/> . | ||
| @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
|
|
||
| <https://w3id.org/alpha-crate/0.1> | ||
| a prof:Profile ; | ||
|
|
||
| # the Profile's label | ||
| rdfs:label "Alpha RO-Crate 0.1" ; | ||
|
|
||
| # regular metadata, a basic description of the Profile | ||
| rdfs:comment """Alpha RO-Crate Metadata Specification 0.1"""@en ; | ||
|
|
||
| # URI of the publisher of the Metadata Specification | ||
| dct:publisher <https://w3id.org/alpha-crate> ; | ||
|
|
||
| # This profile is a transitive profile of the RO-Crate Metadata Specification | ||
| prof:isTransitiveProfileOf <https://w3id.org/ro/crate/1.1> ; | ||
|
|
||
| # this profile has a JSON-LD context resource | ||
| prof:hasResource [ | ||
| a prof:ResourceDescriptor ; | ||
|
|
||
| # it's in JSON-LD format | ||
| dct:format <https://w3id.org/mediatype/application/ld+json> ; | ||
|
|
||
| # it conforms to JSON-LD, here referred to by its namespace URI as a Profile | ||
| dct:conformsTo <https://www.w3.org/TR/json-ld11/> ; | ||
|
|
||
| # this profile resource plays the role of "Vocabulary" | ||
| # described in this ontology's accompanying Roles vocabulary | ||
| prof:hasRole role:Vocabulary ; | ||
|
|
||
| # this profile resource's actual file | ||
| prof:hasArtifact <https://w3id.org/ro/terms/workflow-run/context> ; | ||
| ] ; | ||
|
|
||
| # a short code to refer to the Profile with when a URI can't be used | ||
| prof:hasToken "alpha-crate" ; | ||
| . |
64 changes: 64 additions & 0 deletions
64
tests/data/rocrate_validator_profiles/five-safes-crate/may/11_workflow_execution_phase.ttl
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Copyright (c) 2025 eScience Lab, The University of Manchester | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| @prefix ro: <./> . | ||
| @prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> . | ||
| @prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> . | ||
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
| @prefix schema: <http://schema.org/> . | ||
| @prefix sh: <http://www.w3.org/ns/shacl#> . | ||
| @prefix validator: <https://github.com/crs4/rocrate-validator/> . | ||
| @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
|
||
|
|
||
| five-safes-crate:WorkflowexecutionObjectHasStartTimeIfBegun | ||
| a sh:NodeShape ; | ||
| sh:name "WorkflowExecution" ; | ||
| sh:description ( | ||
| "The workflow execution object MAY have a startTime if actionStatus is " | ||
| "either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." | ||
| ) ; | ||
|
|
||
| sh:target [ | ||
| a sh:SPARQLTarget ; | ||
| sh:select """ | ||
| PREFIX schema: <http://schema.org/> | ||
| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
|
|
||
| SELECT ?this | ||
| WHERE { | ||
| ?this rdf:type schema:CreateAction ; | ||
| schema:actionStatus ?status . | ||
| FILTER(?status IN ( | ||
| "http://schema.org/CompletedActionStatus", | ||
| "http://schema.org/FailedActionStatus", | ||
| "http://schema.org/ActiveActionStatus" | ||
| )) | ||
| } | ||
| """ ; | ||
| ] ; | ||
|
|
||
| sh:property [ | ||
| a sh:PropertyShape ; | ||
| sh:name "StartTime" ; | ||
| sh:path schema:startTime ; | ||
| sh:minCount 1 ; | ||
| sh:maxCount 1 ; | ||
| sh:severity sh:Info ; | ||
| sh:description ( | ||
| "The workflow execution object MAY have a startTime if actionStatus is " | ||
| "either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." | ||
| ) ; | ||
| sh:message "The workflow execution object MAY have a startTime if actionStatus is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ; | ||
| ] . |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the default is it not? so no need to set unless they don't obey step 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's in the testing dockerfile, but not in the default dockerfile (that deploys our pre-built docker container)