Skip to content

Commit 07d2b24

Browse files
authored
Merge pull request crs4#13 from crs4/feat/workflow-run-crate
Workflow Run Crate
2 parents b101cd9 + 856a78c commit 07d2b24

File tree

37 files changed

+6822
-4
lines changed

37 files changed

+6822
-4
lines changed

rocrate_validator/profiles/ro-crate/prefixes.ttl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ ro-crate:sparqlPrefixes
3131
sh:prefix "rocrate" ;
3232
sh:namespace "https://w3id.org/ro/crate/1.1/"^^xsd:anyURI ;
3333
] ;
34+
sh:declare [
35+
sh:prefix "wfrun" ;
36+
sh:namespace "https://w3id.org/ro/terms/workflow-run#"^^xsd:anyURI ;
37+
] ;
3438
sh:declare [
3539
sh:prefix "ro" ;
3640
sh:namespace "./"^^xsd:anyURI ;
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix dct: <http://purl.org/dc/terms/> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix schema: <http://schema.org/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix workflow-run-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-run-crate/> .
23+
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> .
24+
25+
workflow-run-crate:WfRCComputationalWorkflowOptional a sh:NodeShape ;
26+
sh:name "Workflow Run Crate ComputationalWorkflow MAY" ;
27+
sh:description "Optional properties of the Workflow Run Crate ComputationalWorkflow" ;
28+
sh:targetClass bioschemas:ComputationalWorkflow ;
29+
sh:property [
30+
a sh:PropertyShape ;
31+
sh:name "ComputationalWorkflow input" ;
32+
sh:description "A ComputationalWorkflow MAY have an input" ;
33+
sh:path bioschemas-cw:input ;
34+
sh:minCount 1 ;
35+
sh:message "A ComputationalWorkflow MAY have an input" ;
36+
] ;
37+
sh:property [
38+
a sh:PropertyShape ;
39+
sh:name "ComputationalWorkflow output" ;
40+
sh:description "A ComputationalWorkflow MAY have an output" ;
41+
sh:path bioschemas-cw:output ;
42+
sh:minCount 1 ;
43+
sh:message "A ComputationalWorkflow MAY have an output" ;
44+
] ;
45+
sh:property [
46+
a sh:PropertyShape ;
47+
sh:name "Workflow environment" ;
48+
sh:description "The Workflow MAY have an environment" ;
49+
sh:path wfrun:environment ;
50+
sh:minCount 1 ;
51+
sh:message "The Workflow MAY have an environment" ;
52+
] .
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix dct: <http://purl.org/dc/terms/> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix schema: <http://schema.org/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix workflow-run-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-run-crate/> .
23+
24+
workflow-run-crate:WfRCFormalParameterOptional a sh:NodeShape ;
25+
sh:name "Workflow Run Crate FormalParameter MAY" ;
26+
sh:description "Optional properties of the Workflow Run Crate FormalParameter" ;
27+
sh:targetClass bioschemas:FormalParameter ;
28+
sh:property [
29+
a sh:PropertyShape ;
30+
sh:name "FormalParameter workExample" ;
31+
sh:description "FormalParameter MAY refer to a data entity or PropertyValue via workExample" ;
32+
sh:path schema:workExample ;
33+
sh:or (
34+
[ sh:class schema:MediaObject ; ]
35+
[ sh:class schema:Dataset ; ]
36+
[ sh:class schema:Collection ; ]
37+
[ sh:class schema:PropertyValue ; ]
38+
) ;
39+
sh:minCount 1 ;
40+
sh:message "FormalParameter MAY refer to a data entity or PropertyValue via workExample" ;
41+
] ;
42+
sh:property [
43+
a sh:PropertyShape ;
44+
sh:name "FormalParameter description" ;
45+
sh:description "FormalParameter MAY have a description" ;
46+
sh:path schema:description ;
47+
sh:minCount 1 ;
48+
sh:message "FormalParameter MAY have a description" ;
49+
] .
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix dct: <http://purl.org/dc/terms/> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix schema: <http://schema.org/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix workflow-run-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-run-crate/> .
23+
24+
workflow-run-crate:WfRCComputationalWorkflowRequired a sh:NodeShape ;
25+
sh:name "Workflow Run Crate ComputationalWorkflow MUST" ;
26+
sh:description "Required properties of the Workflow Run Crate ComputationalWorkflow" ;
27+
sh:targetClass bioschemas:ComputationalWorkflow ;
28+
sh:property [
29+
a sh:PropertyShape ;
30+
sh:name "ComputationalWorkflow input and output" ;
31+
sh:description "ComputationalWorkflow input and output MUST point to FormalParameter entities" ;
32+
sh:path [
33+
sh:alternativePath (bioschemas-cw:input bioschemas-cw:output) ;
34+
] ;
35+
sh:class bioschemas:FormalParameter ;
36+
sh:message "ComputationalWorkflow input and output MUST point to FormalParameter entities" ;
37+
] .
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix dct: <http://purl.org/dc/terms/> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix schema: <http://schema.org/> .
19+
@prefix sh: <http://www.w3.org/ns/shacl#> .
20+
@prefix workflow-run-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-run-crate/> .
21+
22+
workflow-run-crate:WfRCRootDataEntityMetadata a sh:NodeShape ;
23+
sh:name "Root Data Entity Metadata" ;
24+
sh:description "Properties of the Root Data Entity" ;
25+
sh:targetClass ro-crate:RootDataEntity ;
26+
sh:property [
27+
a sh:PropertyShape ;
28+
sh:name "Root Data Entity conformsTo" ;
29+
sh:description "The Root Data Entity MUST reference a CreativeWork entity with an @id URI that is consistent with the versioned permalink of the Workflow Run Crate profile" ;
30+
sh:path dct:conformsTo ;
31+
sh:class schema:CreativeWork;
32+
# At least one value of conformsTo must match the pattern
33+
sh:qualifiedValueShape [
34+
sh:pattern "^https://w3id.org/ro/wfrun/workflow/.*" ;
35+
] ;
36+
sh:qualifiedMinCount 1 ;
37+
sh:minCount 1 ;
38+
sh:message "The Root Data Entity MUST reference a CreativeWork entity with an @id URI that is consistent with the versioned permalink of the Workflow Run Crate profile" ;
39+
] .
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix dct: <http://purl.org/dc/terms/> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix schema: <http://schema.org/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix workflow-run-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-run-crate/> .
23+
24+
workflow-run-crate:WfRCFormalParameterRequired a sh:NodeShape ;
25+
sh:name "Workflow Run Crate FormalParameter MUST" ;
26+
sh:description "Required properties of the Workflow Run Crate FormalParameter" ;
27+
sh:targetClass bioschemas:FormalParameter ;
28+
sh:property [
29+
a sh:PropertyShape ;
30+
sh:name "FormalParameter additionalType" ;
31+
sh:description "FormalParameter MUST have an additionalType" ;
32+
sh:path schema:additionalType ;
33+
sh:minCount 1 ;
34+
sh:message "FormalParameter MUST have an additionalType" ;
35+
] .
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix dct: <http://purl.org/dc/terms/> .
16+
@prefix prof: <http://www.w3.org/ns/dx/prof/> .
17+
@prefix role: <http://www.w3.org/ns/dx/prof/role/> .
18+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
19+
20+
<https://w3id.org/ro/wfrun/workflow/0.5>
21+
a prof:Profile ;
22+
23+
# the Profile's label
24+
rdfs:label "Workflow Run Crate 0.5" ;
25+
26+
# regular metadata, a basic description of the Profile
27+
rdfs:comment """Workflow Run Crate Metadata Specification 0.5"""@en ;
28+
29+
# URI of the publisher of the Metadata Specification
30+
dct:publisher <https://w3id.org/ro/wfrun> ;
31+
32+
# This profile is an extension of Process Run Crate and Workflow RO-Crate
33+
prof:isProfileOf <https://w3id.org/ro/wfrun/process/0.5> ,
34+
<https://w3id.org/workflowhub/workflow-ro-crate/1.0> ;
35+
36+
# This profile is a transitive profile of Process Run Crate, Workflow RO-Crate and the RO-Crate Metadata Specification
37+
prof:isTransitiveProfileOf <https://w3id.org/ro/crate/1.1> ,
38+
<https://w3id.org/ro/wfrun/process/0.5> ,
39+
<https://w3id.org/workflowhub/workflow-ro-crate/1.0>;
40+
41+
# this profile has a JSON-LD context resource
42+
prof:hasResource [
43+
a prof:ResourceDescriptor ;
44+
45+
# it's in JSON-LD format
46+
dct:format <https://w3id.org/mediatype/application/ld+json> ;
47+
48+
# it conforms to JSON-LD, here refered to by its namespace URI as a Profile
49+
dct:conformsTo <https://www.w3.org/TR/json-ld11/> ;
50+
51+
# this profile resource plays the role of "Vocabulary"
52+
# described in this ontology's accompanying Roles vocabulary
53+
prof:hasRole role:Vocabulary ;
54+
55+
# this profile resource's actual file
56+
prof:hasArtifact <https://w3id.org/ro/terms/workflow-run/context> ;
57+
] ;
58+
59+
# this profile has a human-readable documentation resource
60+
prof:hasResource [
61+
a prof:ResourceDescriptor ;
62+
63+
# it's in HTML format
64+
dct:format <https://w3id.org/mediatype/text/html> ;
65+
66+
# it conforms to HTML, here refered to by its namespace URI as a Profile
67+
dct:conformsTo <https://www.w3.org/TR/html/> ;
68+
69+
# this profile resource plays the role of "Specification"
70+
# described in this ontology's accompanying Roles vocabulary
71+
prof:hasRole role:Specification ;
72+
73+
# this profile resource's actual file
74+
prof:hasArtifact <https://www.researchobject.org/workflow-run-crate/profiles/0.5/workflow_run_crate/> ;
75+
76+
# this profile is inherited from Process Run Crate and Workflow RO-Crate
77+
prof:isInheritedFrom <https://w3id.org/ro/wfrun/process/0.5> ,
78+
<https://w3id.org/workflowhub/workflow-ro-crate/1.0> ;
79+
] ;
80+
81+
# a short code to refer to the Profile with when a URI can't be used
82+
prof:hasToken "workflow-run-crate" ;
83+
.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix dct: <http://purl.org/dc/terms/> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix schema: <http://schema.org/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix bioschemas-cw: <https://bioschemas.org/ComputationalWorkflow#> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix workflow-run-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-run-crate/> .
23+
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> .
24+
25+
workflow-run-crate:WfRCComputationalWorkflowRecommended a sh:NodeShape ;
26+
sh:name "Workflow Run Crate ComputationalWorkflow SHOULD" ;
27+
sh:description "Recommended properties of the Workflow Run Crate ComputationalWorkflow" ;
28+
sh:targetClass bioschemas:ComputationalWorkflow ;
29+
sh:property [
30+
a sh:PropertyShape ;
31+
sh:name "Workflow environment" ;
32+
sh:description "If the Workflow has an environment, it SHOULD point to entities of type FormalParameter" ;
33+
sh:path wfrun:environment ;
34+
sh:class bioschemas:FormalParameter ;
35+
sh:message "If the Workflow has an environment, it SHOULD point to entities of type FormalParameter" ;
36+
] .
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) 2024 CRS4
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix dct: <http://purl.org/dc/terms/> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix schema: <http://schema.org/> .
19+
@prefix sh: <http://www.w3.org/ns/shacl#> .
20+
@prefix workflow-run-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-run-crate/> .
21+
22+
workflow-run-crate:WfRCRootDataEntityMetadataRecommended a sh:NodeShape ;
23+
sh:name "Root Data Entity Metadata SHOULD" ;
24+
sh:description "Recommended Properties of the Root Data Entity" ;
25+
sh:targetClass ro-crate:RootDataEntity ;
26+
sh:property [
27+
a sh:PropertyShape ;
28+
sh:name "Root Data Entity conformsTo" ;
29+
sh:description "The Root Data Entity SHOULD reference CreativeWork entities corresponding to the Process Run Crate and Workflow RO-Crate profiles" ;
30+
sh:path dct:conformsTo ;
31+
sh:class schema:CreativeWork;
32+
sh:qualifiedValueShape [
33+
sh:pattern "^https://w3id.org/(ro/wfrun/process|workflowhub/workflow-ro-crate)/.*" ;
34+
] ;
35+
# At least two values of conformsTo must match the pattern
36+
sh:qualifiedMinCount 2 ;
37+
sh:minCount 1 ;
38+
sh:message "The Root Data Entity SHOULD reference CreativeWork entities corresponding to the Process Run Crate and Workflow RO-Crate profiles" ;
39+
] .

0 commit comments

Comments
 (0)