Skip to content
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

Workflow Testing RO-Crate #9

Merged
merged 11 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 workflow-testing-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-testing-ro-crate/> .
@prefix schema: <http://schema.org/> .
@prefix bioschemas: <https://bioschemas.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix wftest: <https://w3id.org/ro/terms/test#> .

workflow-testing-ro-crate:WTROCTestSuiteRequired a sh:NodeShape ;
sh:name "Workflow Testing RO-Crate TestSuite MUST" ;
sh:description "Required properties of the Workflow Testing RO-Crate TestSuite" ;
sh:targetClass wftest:TestSuite ;
sh:property [
a sh:PropertyShape ;
sh:name "TestSuite MUST be referenced via mentions from root" ;
sh:description "The TestSuite MUST be referenced from the Root Data Entity via mentions" ;
sh:path [ sh:inversePath schema:mentions ] ;
sh:node ro-crate:RootDataEntity ;
sh:minCount 1 ;
sh:message "The TestSuite MUST be referenced from the Root Data Entity via mentions" ;
] .


workflow-testing-ro-crate:WTROCTestSuiteInstanceOrDefinition a sh:NodeShape ;
sh:name "TestSuite instance or definition" ;
sh:description "The TestSuite MUST refer to a TestInstance or TestDefinition" ;
sh:message "The TestSuite MUST refer to a TestInstance or TestDefinition" ;
sh:targetClass wftest:TestSuite ;
sh:or (
[ sh:property [
a sh:PropertyShape ;
sh:path wftest:instance ;
sh:class wftest:TestInstance ;
sh:minCount 1 ;
]]
[ sh:property [
a sh:PropertyShape ;
sh:path wftest:definition ;
sh:class wftest:TestDefinition ;
sh:minCount 1 ;
]]
) .
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix wftest: <https://w3id.org/ro/terms/test#> .
@prefix workflow-testing-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-testing-ro-crate/> .

workflow-testing-ro-crate:WTROCRootDataEntityMetadata a sh:NodeShape ;
sh:name "Root Data Entity Metadata" ;
sh:description "Properties of the Root Data Entity" ;
sh:targetClass ro-crate:RootDataEntity ;
sh:property [
a sh:PropertyShape ;
sh:name "Root Data Entity mentions" ;
sh:description "The Root Data Entity MUST refer to one or more test suites via mentions" ;
sh:path schema:mentions ;
sh:class wftest:TestSuite;
sh:minCount 1 ;
sh:message "The Root Data Entity MUST refer to one or more test suites via mentions" ;
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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 xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix workflow-testing-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-testing-ro-crate/> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix wroc: <https://w3id.org/workflowhub/workflow-ro-crate#> .
@prefix wftest: <https://w3id.org/ro/terms/test#> .

workflow-testing-ro-crate:WTROCTestInstanceRequired a sh:NodeShape ;
sh:name "Workflow Testing RO-Crate TestInstance MUST" ;
sh:description "Required properties of the Workflow Testing RO-Crate TestInstance" ;
sh:targetClass wftest:TestInstance ;
sh:property [
a sh:PropertyShape ;
sh:name "TestInstance runsOn" ;
sh:description "The TestInstance MUST refer to a TestService via runsOn" ;
sh:path wftest:runsOn ;
sh:class wftest:TestService ;
sh:or (
[ sh:hasValue wftest:GithubService ; ]
[ sh:hasValue wftest:TravisService ; ]
[ sh:hasValue wftest:JenkinsService ; ]
) ;
sh:minCount 1 ;
sh:message "The TestInstance MUST refer to a TestService via runsOn" ;
] ;
sh:property [
a sh:PropertyShape ;
sh:name "TestInstance url" ;
sh:description "The TestInstance MUST refer to the test service base URL via url" ;
sh:path schema:url ;
sh:datatype xsd:string ;
sh:pattern "^http.*" ;
sh:minCount 1 ;
sh:message "The TestInstance MUST refer to the test service base URL via url" ;
] ; sh:property [
a sh:PropertyShape ;
sh:name "TestInstance resource" ;
sh:description "The TestInstance MUST refer to the relative URL of the test project via resource" ;
sh:path wftest:resource ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:message "The TestInstance MUST refer to the relative URL of the test project via resource" ;
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix workflow-testing-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-testing-ro-crate/> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix wroc: <https://w3id.org/workflowhub/workflow-ro-crate#> .
@prefix wftest: <https://w3id.org/ro/terms/test#> .

workflow-testing-ro-crate:WTROCTestDefinitionRequired a sh:NodeShape ;
sh:name "Workflow Testing RO-Crate TestDefinition MUST" ;
sh:description "Required properties of the Workflow Testing RO-Crate TestDefinition" ;
sh:targetClass wftest:TestDefinition ;
sh:property [
a sh:PropertyShape ;
sh:name "TestDefinition type" ;
sh:description "The TestDefinition MUST have types TestDefinition and File" ;
sh:path rdf:type ;
sh:hasValue schema:MediaObject, wftest:TestDefinition ;
sh:minCount 1 ;
sh:message "The TestDefinition MUST have types TestDefinition and File" ;
] ;
sh:property [
a sh:PropertyShape ;
sh:name "TestDefinition conformsTo" ;
sh:description "The TestDefinition MUST refer to the test engine it is written for via conformsTo" ;
sh:path dct:conformsTo ;
sh:class schema:SoftwareApplication ;
sh:minCount 1 ;
sh:message "The TestDefinition MUST refer to the test engine it is written for via conformsTo" ;
] ;
sh:property [
a sh:PropertyShape ;
sh:name "TestDefinition engineVersion" ;
sh:description "The TestDefinition MUST refer to the test engine version via engineVersion" ;
sh:path wftest:engineVersion ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:message "The TestDefinition MUST refer to the test engine version via engineVersion" ;
] .
80 changes: 80 additions & 0 deletions rocrate_validator/profiles/workflow-testing-ro-crate/profile.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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 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/ro/wftest/0.1>
a prof:Profile ;

# the Profile's label
rdfs:label "Workflow Testing RO-Crate 0.1" ;

# regular metadata, a basic description of the Profile
rdfs:comment """Workflow Testing RO-Crate Metadata Specification 0.1"""@en ;

# URI of the publisher of the Specification
dct:publisher <https://w3id.org/ro/wftest> ;

# This profile is an extension of Workflow RO-Crate
prof:isProfileOf <https://w3id.org/workflowhub/workflow-ro-crate/1.0> ;

# This profile is a transitive profile of Workflow RO-Crate and the RO-Crate Metadata Specification
prof:isTransitiveProfileOf <https://w3id.org/ro/crate/1.1> ,
<https://w3id.org/workflowhub/workflow-ro-crate/1.0> ;

# 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 refered 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/crate/1.1/context> ;
] ;

# this profile has a human-readable documentation resource
prof:hasResource [
a prof:ResourceDescriptor ;

# it's in HTML format
dct:format <https://w3id.org/mediatype/text/html> ;

# it conforms to HTML, here refered to by its namespace URI as a Profile
dct:conformsTo <https://www.w3.org/TR/html/> ;

# this profile resource plays the role of "Specification"
# described in this ontology's accompanying Roles vocabulary
prof:hasRole role:Specification ;

# this profile resource's actual file
prof:hasArtifact <https://crs4.github.io/workflow-testing-ro-crate/0.1/> ;

# this profile is inherited from Workflow RO-Crate
prof:isInheritedFrom <https://w3id.org/workflowhub/workflow-ro-crate/1.0> ;
] ;

# a short code to refer to the Profile with when a URI can't be used
prof:hasToken "workflow-testing-ro-crate" ;
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 workflow-testing-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/workflow-testing-ro-crate/> .
@prefix schema: <http://schema.org/> .
@prefix bioschemas: <https://bioschemas.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix wroc: <https://w3id.org/workflowhub/workflow-ro-crate#> .
@prefix wftest: <https://w3id.org/ro/terms/test#> .

workflow-testing-ro-crate:WTROCTestSuiteRecommended a sh:NodeShape ;
sh:name "Workflow Testing RO-Crate TestSuite SHOULD" ;
sh:description "Recommended properties of the Workflow Testing RO-Crate TestSuite" ;
sh:targetClass wftest:TestSuite ;
sh:property [
a sh:PropertyShape ;
sh:name "TestSuite mainEntity" ;
sh:description "The TestSuite SHOULD refer to the tested workflow via mainEntity" ;
sh:path schema:mainEntity ;
sh:class schema:MediaObject ,
schema:SoftwareSourceCode ,
bioschemas:ComputationalWorkflow ;
sh:minCount 1 ;
sh:message "The TestSuite SHOULD refer to the tested workflow via mainEntity" ;
] .
Loading