Skip to content

Commit a1b7b67

Browse files
committed
Merge branch 'develop' into upstream-develop
2 parents 3fcaf92 + cd58c3c commit a1b7b67

71 files changed

Lines changed: 8891 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ extend-ignore-re = ["[0-9a-f]{7,40}"] # Ignore long hexadecimal strings, which a
133133
[tool.typos.files]
134134
extend-exclude = ["tests/data", "docs/diagrams", "*.json", "*.html", "*__init__.py"]
135135

136+
[tool.typos.default.extend-words]
137+
TRE = "TRE"
138+
136139
# Pylint configuration.
137140
# Ruff (see ruff.toml) is the primary linter/formatter; this section keeps
138141
# pylint consistent with it so the two tools do not disagree on style or on
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright (c) 2025 eScience Lab, The University of Manchester
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 ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
17+
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
18+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
19+
@prefix schema: <http://schema.org/> .
20+
@prefix sh: <http://www.w3.org/ns/shacl#> .
21+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
22+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
23+
24+
25+
five-safes-crate:WorkflowexecutionObjectHasStartTimeIfBegun
26+
a sh:NodeShape ;
27+
sh:name "WorkflowExecution" ;
28+
sh:description (
29+
"The workflow execution object MAY have a startTime if actionStatus is "
30+
"either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
31+
) ;
32+
33+
sh:target [
34+
a sh:SPARQLTarget ;
35+
sh:select """
36+
PREFIX schema: <http://schema.org/>
37+
PREFIX rocrate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/>
38+
39+
SELECT ?this
40+
WHERE {
41+
?this a rocrate:WorkflowRunAction ;
42+
schema:actionStatus ?status .
43+
FILTER(?status IN (
44+
"http://schema.org/CompletedActionStatus",
45+
"http://schema.org/FailedActionStatus",
46+
"http://schema.org/ActiveActionStatus"
47+
))
48+
}
49+
""" ;
50+
] ;
51+
52+
sh:property [
53+
a sh:PropertyShape ;
54+
sh:name "StartTime" ;
55+
sh:path schema:startTime ;
56+
sh:minCount 1 ;
57+
sh:maxCount 1 ;
58+
sh:severity sh:Info ;
59+
sh:description (
60+
"The workflow execution object MAY have a startTime if actionStatus is "
61+
"either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
62+
) ;
63+
sh:message "The workflow execution object MAY have a startTime if actionStatus is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
64+
] .
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright (c) 2025 eScience Lab, The University of Manchester
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 ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
17+
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
18+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
19+
@prefix schema: <http://schema.org/> .
20+
@prefix purl: <http://purl.org/dc/terms/> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
23+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
24+
25+
26+
five-safes-crate:CheckValueMayHaveStartTime
27+
a sh:NodeShape ;
28+
sh:name "CheckValue" ;
29+
sh:description "" ;
30+
sh:target [
31+
a sh:SPARQLTarget ;
32+
sh:select """
33+
PREFIX schema: <http://schema.org/>
34+
PREFIX shp: <https://w3id.org/shp#>
35+
SELECT ?this
36+
WHERE {
37+
?this schema:additionalType shp:CheckValue ;
38+
schema:actionStatus ?status .
39+
FILTER(?status IN (
40+
"http://schema.org/CompletedActionStatus",
41+
"http://schema.org/FailedActionStatus",
42+
"http://schema.org/ActiveActionStatus"
43+
))
44+
}
45+
""" ;
46+
] ;
47+
48+
sh:property [
49+
a sh:PropertyShape ;
50+
sh:name "StartTime" ;
51+
sh:path schema:startTime ;
52+
sh:minCount 1 ;
53+
sh:maxCount 1 ;
54+
sh:severity sh:Info ;
55+
sh:message "`CheckValue` MAY have the `startTime` property." ;
56+
] .
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (c) 2025 eScience Lab, The University of Manchester
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 ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
17+
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
18+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
19+
@prefix schema: <http://schema.org/> .
20+
@prefix purl: <http://purl.org/dc/terms/> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
23+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
24+
25+
26+
five-safes-crate:DownloadActionMayHaveStartTimeIfBegun
27+
a sh:NodeShape ;
28+
sh:name "ValidationCheck" ;
29+
sh:description "" ;
30+
sh:target [
31+
a sh:SPARQLTarget ;
32+
sh:select """
33+
PREFIX schema: <http://schema.org/>
34+
PREFIX shp: <https://w3id.org/shp#>
35+
SELECT ?this
36+
WHERE {
37+
?this schema:additionalType shp:ValidationCheck ;
38+
schema:actionStatus ?status .
39+
FILTER(?status IN (
40+
"http://schema.org/CompletedActionStatus",
41+
"http://schema.org/FailedActionStatus",
42+
"http://schema.org/ActiveActionStatus"
43+
))
44+
}
45+
""" ;
46+
] ;
47+
48+
sh:property [
49+
a sh:PropertyShape ;
50+
sh:name "StartTime" ;
51+
sh:path schema:startTime ;
52+
sh:minCount 1 ;
53+
sh:maxCount 1 ;
54+
sh:severity sh:Info ;
55+
sh:description "ValidationCheck MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
56+
sh:message "ValidationCheck MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
57+
] .
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Copyright (c) 2025 eScience Lab, The University of Manchester
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+
16+
@prefix ro: <./> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
19+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
20+
@prefix schema: <http://schema.org/> .
21+
@prefix purl: <http://purl.org/dc/terms/> .
22+
@prefix sh: <http://www.w3.org/ns/shacl#> .
23+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
24+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
25+
26+
27+
five-safes-crate:DownloadedWorkflowSHOULDExistAndBeReferencedByDownloadActionResult
28+
a sh:NodeShape ;
29+
sh:name "DownloadAction" ;
30+
sh:description "Validates that DownloadAction result references an existing entity" ;
31+
sh:targetClass schema:DownloadAction ;
32+
33+
sh:property [
34+
a sh:PropertyShape ;
35+
sh:name "Result" ;
36+
sh:description "The result property must reference an existing entity in the RO-Crate" ;
37+
sh:path schema:result ;
38+
sh:minCount 1 ;
39+
sh:nodeKind sh:IRI ;
40+
sh:sparql [
41+
a sh:SPARQLConstraint ;
42+
sh:select """
43+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
44+
PREFIX schema: <http://schema.org/>
45+
46+
SELECT $this $value
47+
WHERE {
48+
$this schema:result $value .
49+
50+
# Entity must have BOTH type AND name (proper definition)
51+
FILTER NOT EXISTS {
52+
$value rdf:type schema:Dataset .
53+
}
54+
}
55+
""" ;
56+
] ;
57+
sh:severity sh:Info ;
58+
sh:message "The entity representing the downloaded workflow is not defined, OR is not referenced by `DownloadAction` --> `result`, OR is not of type `Dataset`." ;
59+
] .
60+
61+
62+
five-safes-crate:DownloadActionMayHaveStartTimeIfBegun
63+
a sh:NodeShape ;
64+
sh:name "DownloadAction" ;
65+
sh:description (
66+
"`DownloadAction` MAY have the `startTime` property if `actionStatus` "
67+
"is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
68+
);
69+
70+
sh:target [
71+
a sh:SPARQLTarget ;
72+
sh:select """
73+
PREFIX schema: <http://schema.org/>
74+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
75+
76+
SELECT ?this
77+
WHERE {
78+
?this rdf:type schema:DownloadAction ;
79+
schema:actionStatus ?status .
80+
FILTER(?status IN (
81+
"http://schema.org/CompletedActionStatus",
82+
"http://schema.org/FailedActionStatus",
83+
"http://schema.org/ActiveActionStatus"
84+
))
85+
}
86+
""" ;
87+
] ;
88+
89+
sh:property [
90+
a sh:PropertyShape ;
91+
sh:name "StartTime" ;
92+
sh:path schema:startTime ;
93+
sh:minCount 1 ;
94+
sh:maxCount 1 ;
95+
sh:description (
96+
"`DownloadAction` MAY have the `startTime` property if `actionStatus` "
97+
"is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
98+
);
99+
sh:severity sh:Info ;
100+
sh:message "`DownloadAction` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
101+
] .
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright (c) 2025 eScience Lab, The University of Manchester
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 ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
17+
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
18+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
19+
@prefix schema: <http://schema.org/> .
20+
@prefix sh: <http://www.w3.org/ns/shacl#> .
21+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
22+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
23+
24+
25+
five-safes-crate:ResponsibleProject
26+
a sh:NodeShape ;
27+
sh:name "Responsible Project" ;
28+
sh:target [
29+
a sh:SPARQLTarget ;
30+
sh:prefixes ro-crate:sparqlPrefixes ;
31+
sh:select """
32+
SELECT DISTINCT ?this WHERE {
33+
?action a ro-crate:WorkflowRunAction ;
34+
schema:agent ?agent .
35+
?agent schema:memberOf ?this .
36+
}
37+
"""
38+
] ;
39+
40+
sh:property [
41+
a sh:PropertyShape ;
42+
sh:name "funding" ;
43+
sh:path schema:funding;
44+
sh:minCount 1 ;
45+
sh:severity sh:Info ;
46+
sh:message """The Responsible Project does not have the property `funding`.""" ;
47+
] ;
48+
49+
sh:property [
50+
a sh:PropertyShape ;
51+
sh:name "member" ;
52+
sh:path schema:member;
53+
sh:minCount 1 ;
54+
sh:severity sh:Info ;
55+
sh:message """The Responsible Project does not have the property `member`.""" ;
56+
] .

0 commit comments

Comments
 (0)