-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
109 changed files
with
42,841 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "roc-validator" | ||
version = "0.3.0" | ||
version = "0.4.0" | ||
description = "A Python package to validate RO-Crates" | ||
authors = [ | ||
"Marco Enrico Piras <[email protected]>", | ||
|
63 changes: 63 additions & 0 deletions
63
rocrate_validator/profiles/provenance-run-crate/may/0_computational_workflow.ttl
This file contains 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,63 @@ | ||
# Copyright (c) 2024 CRS4 | ||
# | ||
# 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 dct: <http://purl.org/dc/terms/> . | ||
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix bioschemas: <https://bioschemas.org/> . | ||
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> . | ||
@prefix codemeta: <https://codemeta.github.io/terms/> . | ||
@prefix provenance-run-crate: <https://github.com/crs4/rocrate-validator/profiles/provenance-run-crate/> . | ||
|
||
provenance-run-crate:ProvRCComputationalWorkflowOptional a sh:NodeShape ; | ||
sh:name "Provenance Run Crate ComputationalWorkflow MAY" ; | ||
sh:description "Optional properties of the Provenance Run Crate ComputationalWorkflow" ; | ||
sh:targetClass bioschemas:ComputationalWorkflow ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "ComputationalWorkflow connection" ; | ||
sh:description "ComputationalWorkflow may have a connection property" ; | ||
sh:path wfrun:connection ; | ||
sh:minCount 1 ; | ||
sh:message "ComputationalWorkflow may have a connection property" ; | ||
] . | ||
|
||
|
||
provenance-run-crate:ProvRCComputationalWorkflowHowToOptional a sh:NodeShape ; | ||
sh:name "Provenance Run Crate ComputationalWorkflow / HowTo MAY" ; | ||
sh:description "Optional properties of a Provenance Run Crate ComputationalWorkflow that is also a HowTo" ; | ||
sh:target [ | ||
a sh:SPARQLTarget ; | ||
sh:prefixes ro-crate:sparqlPrefixes ; | ||
sh:select """ | ||
SELECT ?this | ||
WHERE { | ||
?this a bioschemas:ComputationalWorkflow . | ||
?this a schema:HowTo . | ||
} | ||
""" | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "ComputationalWorkflow buildInstructions" ; | ||
sh:description "A ComputationalWorkflow / HowTo MAY have a buildInstructions pointing to a File" ; | ||
sh:path codemeta:buildInstructions ; | ||
sh:class schema:MediaObject ; | ||
sh:minCount 1 ; | ||
sh:message "A ComputationalWorkflow / HowTo MAY have a buildInstructions pointing to a File" ; | ||
] . |
83 changes: 83 additions & 0 deletions
83
rocrate_validator/profiles/provenance-run-crate/may/0_tool.ttl
This file contains 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,83 @@ | ||
# Copyright (c) 2024 CRS4 | ||
# | ||
# 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 provenance-run-crate: <https://github.com/crs4/rocrate-validator/profiles/provenance-run-crate/> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix bioschemas: <https://bioschemas.org/> . | ||
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> . | ||
|
||
provenance-run-crate:ProvRCToolOptional a sh:NodeShape ; | ||
sh:name "ProvRC tool MAY" ; | ||
sh:description "Optional properties of a Provenance Run Crate tool" ; | ||
sh:target [ | ||
a sh:SPARQLTarget ; | ||
sh:prefixes ro-crate:sparqlPrefixes ; | ||
sh:select """ | ||
SELECT ?this | ||
WHERE { | ||
{ ?this a schema:SoftwareApplication } UNION | ||
{ ?this a schema:SoftwareSourceCode } UNION | ||
{ ?this a bioschemas:ComputationalWorkflow } . | ||
?workflow schema:hasPart ?this . | ||
?workflow a bioschemas:ComputationalWorkflow . | ||
} | ||
""" | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "tool input" ; | ||
sh:description "A tool MAY have an input" ; | ||
sh:path bioschemas-cw:input ; | ||
sh:minCount 1 ; | ||
sh:message "A tool MAY have an input" ; | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "tool output" ; | ||
sh:description "A tool MAY have an output" ; | ||
sh:path bioschemas-cw:output ; | ||
sh:minCount 1 ; | ||
sh:message "A tool MAY have an output" ; | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "tool environment" ; | ||
sh:description "A tool MAY have an environment" ; | ||
sh:path wfrun:environment ; | ||
sh:minCount 1 ; | ||
sh:message "A tool MAY have an environment" ; | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "tool softwareRequirements" ; | ||
sh:description "The tool MAY have a softwareRequirements that points to a SoftwareApplication" ; | ||
sh:message "The tool MAY have a softwareRequirements that points to a SoftwareApplication" ; | ||
sh:path schema:softwareRequirements ; | ||
sh:class schema:SoftwareApplication ; | ||
sh:minCount 1 ; | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "tool mainEntity" ; | ||
sh:description "The tool MAY have a mainEntity that points to a SoftwareApplication" ; | ||
sh:message "The tool MAY have a mainEntity that points to a SoftwareApplication" ; | ||
sh:path schema:mainEntity ; | ||
sh:class schema:SoftwareApplication ; | ||
sh:minCount 1 ; | ||
] . |
54 changes: 54 additions & 0 deletions
54
rocrate_validator/profiles/provenance-run-crate/may/1_howtostep.ttl
This file contains 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,54 @@ | ||
# Copyright (c) 2024 CRS4 | ||
# | ||
# 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 provenance-run-crate: <https://github.com/crs4/rocrate-validator/profiles/provenance-run-crate/> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix bioschemas: <https://bioschemas.org/> . | ||
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> . | ||
@prefix codemeta: <https://codemeta.github.io/terms/> . | ||
|
||
provenance-run-crate:ProvRCHowToStepOptional a sh:NodeShape ; | ||
sh:name "ProvRC HowToStep MAY" ; | ||
sh:description "Optional properties of a Provenance Run Crate HowToStep" ; | ||
sh:targetClass schema:HowToStep ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "HowToStep position" ; | ||
sh:description "A HowToStep may indicate its position in the execution order via position" ; | ||
sh:path schema:position ; | ||
sh:minCount 1 ; | ||
sh:message "A HowToStep may indicate its position in the execution order via position" ; | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "HowToStep connection" ; | ||
sh:description "HowToStep may have a connection property" ; | ||
sh:path wfrun:connection ; | ||
sh:minCount 1 ; | ||
sh:message "HowToStep may have a connection property" ; | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "HowToStep buildInstructions" ; | ||
sh:description "A HowToStep MAY have a buildInstructions pointing to a File" ; | ||
sh:path codemeta:buildInstructions ; | ||
sh:class schema:MediaObject ; | ||
sh:minCount 1 ; | ||
sh:message "A HowToStep MAY have a buildInstructions pointing to a File" ; | ||
] . |
51 changes: 51 additions & 0 deletions
51
rocrate_validator/profiles/provenance-run-crate/may/1_tool_action.ttl
This file contains 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,51 @@ | ||
# Copyright (c) 2024 CRS4 | ||
# | ||
# 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 provenance-run-crate: <https://github.com/crs4/rocrate-validator/profiles/provenance-run-crate/> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix bioschemas: <https://bioschemas.org/> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> . | ||
|
||
provenance-run-crate:ProvRCToolActionOptional a sh:NodeShape ; | ||
sh:name "Provenance Run Crate tool action MAY" ; | ||
sh:description "Optional properties of a Provenance Run Crate action that represents a tool execution" ; | ||
sh:target [ | ||
a sh:SPARQLTarget ; | ||
sh:prefixes ro-crate:sparqlPrefixes ; | ||
sh:select """ | ||
SELECT ?this | ||
WHERE { | ||
{ ?this a schema:CreateAction } UNION | ||
{ ?this a schema:ActivateAction } UNION | ||
{ ?this a schema:UpdateAction } . | ||
?this schema:instrument ?tool . | ||
{ ?tool a schema:SoftwareApplication } UNION | ||
{ ?tool a schema:SoftwareSourceCode } UNION | ||
{ ?tool a bioschemas:ComputationalWorkflow } . | ||
?workflow schema:hasPart ?tool . | ||
?workflow a bioschemas:ComputationalWorkflow . | ||
} | ||
""" | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "Tool action resourceUsage" ; | ||
sh:description "A tool action MAY have a resourceUsage" ; | ||
sh:path wfrun:resourceUsage ; | ||
sh:minCount 1 ; | ||
sh:message "A tool action MAY have a resourceUsage" ; | ||
] . |
60 changes: 60 additions & 0 deletions
60
rocrate_validator/profiles/provenance-run-crate/may/3_controlaction_organizeaction.ttl
This file contains 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,60 @@ | ||
# Copyright (c) 2024 CRS4 | ||
# | ||
# 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 provenance-run-crate: <https://github.com/crs4/rocrate-validator/profiles/provenance-run-crate/> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix bioschemas: <https://bioschemas.org/> . | ||
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> . | ||
|
||
provenance-run-crate:ProvRCControlOrganizeActionOptional a sh:NodeShape ; | ||
sh:name "ProvRC ControlAction and OrganizeAction MAY" ; | ||
sh:description "Optional properties of a Provenance Run Crate ControlAction and OrganizeAction" ; | ||
sh:targetClass schema:ControlAction , | ||
schema:OrganizeAction ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "ControlAction and OrganizeAction actionStatus" ; | ||
sh:description "The action MAY have an actionStatus" ; | ||
sh:path schema:actionStatus ; | ||
sh:minCount 1 ; | ||
sh:message "The Action MAY have an actionStatus" ; | ||
] . | ||
|
||
provenance-run-crate:ProvRCControlOrganizeActionErrorOptional a sh:NodeShape ; | ||
sh:name "ProvRC ControlAction and OrganizeAction error" ; | ||
sh:description "error MAY be specified if actionStatus is set to FailedActionStatus" ; | ||
sh:target [ | ||
a sh:SPARQLTarget ; | ||
sh:prefixes ro-crate:sparqlPrefixes ; | ||
sh:select """ | ||
SELECT ?this | ||
WHERE { | ||
{ ?this a schema:ControlAction } UNION | ||
{ ?this a schema:OrganizeAction } . | ||
?this schema:actionStatus ?status . | ||
FILTER(?status = "http://schema.org/FailedActionStatus") . | ||
} | ||
""" | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:path schema:error ; | ||
sh:minCount 1 ; | ||
sh:message "error MAY be specified if actionStatus is set to FailedActionStatus" ; | ||
] . |
Oops, something went wrong.