Skip to content

Commit

Permalink
release: 🔖 version 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kikkomep committed Oct 24, 2024
2 parents 6512923 + 61cf551 commit 8d1809a
Show file tree
Hide file tree
Showing 109 changed files with 42,841 additions and 47 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
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]>",
Expand Down
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 rocrate_validator/profiles/provenance-run-crate/may/0_tool.ttl
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 ;
] .
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" ;
] .
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" ;
] .
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" ;
] .
Loading

0 comments on commit 8d1809a

Please sign in to comment.