From 8bb53304187c84bc2dab3f375b78964bad418bda Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sat, 20 Mar 2021 12:31:28 -0400 Subject: [PATCH 1/3] match with schema 1.0.0-rc4 examples --- reproschema/models/protocol.py | 2 +- reproschema/tests/contexts/generic | 15 +- .../tests/data/activities/activity1.jsonld | 25 +- .../data/activities/activity1_embed.jsonld | 4 +- .../activities/items/activity1_total_score | 2 +- .../tests/data/activities/items/item1.jsonld | 2 +- .../tests/data/activities/items/item2.jsonld | 5 +- .../tests/data/protocols/protocol1.jsonld | 4 +- .../data/protocols/protocol1_embed.jsonld | 6 +- reproschema/tests/reproschema-shacl.ttl | 408 +++++++----------- 10 files changed, 189 insertions(+), 284 deletions(-) diff --git a/reproschema/models/protocol.py b/reproschema/models/protocol.py index c630914..284f2c8 100644 --- a/reproschema/models/protocol.py +++ b/reproschema/models/protocol.py @@ -18,7 +18,7 @@ def __init__(self, version=None): } def set_landing_page(self, landing_page_url, lang="en"): - self.schema["landingPage"] = {"@id": landing_page_url, "@language": lang} + self.schema["landingPage"] = {"@id": landing_page_url, "inLanguage": lang} # TODO # def add_landing_page(self, landing_page_url, lang="en"): diff --git a/reproschema/tests/contexts/generic b/reproschema/tests/contexts/generic index 492bca1..8a9ba1b 100644 --- a/reproschema/tests/contexts/generic +++ b/reproschema/tests/contexts/generic @@ -19,7 +19,7 @@ }, "imageUrl": { "@id": "schema:image", - "@type": "xsd:anyURI" + "@type": "@id" }, "audio": { "@id": "schema:audio" @@ -29,7 +29,7 @@ }, "contentUrl": { "@id": "schema:contentUrl", - "@type": "xsd:anyURI" + "@type": "@id" }, "VideoObject": "schema:VideoObject", "AudioObject": "schema:AudioObject", @@ -45,12 +45,10 @@ "@container": "@language" }, "version": { - "@id": "schema:version", - "@container": "@language" + "@id": "schema:version" }, "schemaVersion": { - "@id": "schema:schemaVersion", - "@container": "@language" + "@id": "schema:schemaVersion" }, "prefLabel": { "@id": "skos:prefLabel", @@ -71,6 +69,7 @@ }, "landingPage": { "@id": "reproschema:landingPage", + "@type": "@id", "@container": "@set" }, "question": { @@ -152,11 +151,11 @@ }, "compute": { "@id": "reproschema:compute", - "@container": "@index" + "@container": "@set" }, "messages": { "@id": "reproschema:messages", - "@container": "@index" + "@container": "@set" }, "jsExpression": { "@id": "reproschema:jsExpression" diff --git a/reproschema/tests/data/activities/activity1.jsonld b/reproschema/tests/data/activities/activity1.jsonld index b64fb5d..78f69ad 100644 --- a/reproschema/tests/data/activities/activity1.jsonld +++ b/reproschema/tests/data/activities/activity1.jsonld @@ -4,7 +4,7 @@ "@id": "activity1.jsonld", "prefLabel": "Example 1", "description": "Activity example 1", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", "image": { @@ -15,18 +15,18 @@ "en": "Over the last 2 weeks, how often have you been bothered by any of the following problems?", "es": "Durante las últimas 2 semanas, ¿con qué frecuencia le han molestado los siguintes problemas?" }, - "messages": [ - { - "message": "Test message: Triggered when item1 value is greater than 1", - "jsExpression": "item1 > 1" - } - ], "compute": [ { - "variableName": "activity1_total_score", - "jsExpression": "item1 + item2" + "variableName": "phq9_total_score", + "jsExpression": "phq9_1 + phq9_2 + phq9_3 + phq9_4 + phq9_5 + phq9_6 + phq9_7 + phq9_8 + phq9_9" } ], + "messages": [ + { + "message": "Test message: Triggered when item1 value is greater than 1", + "jsExpression": "item1 > 1" + } + ], "ui": { "addProperties": [ { "isAbout": "items/item1.jsonld", @@ -42,6 +42,11 @@ "requiredValue": true, "isVis": true, "allow": ["reproschema:Skipped"] + }, + { "isAbout": "items/activity1_total_score", + "variableName": "phq9_total_score", + "requiredValue": true, + "isVis": false } ], "order": [ @@ -51,4 +56,4 @@ ], "shuffle": false } -} \ No newline at end of file +} diff --git a/reproschema/tests/data/activities/activity1_embed.jsonld b/reproschema/tests/data/activities/activity1_embed.jsonld index 1a08595..f732505 100644 --- a/reproschema/tests/data/activities/activity1_embed.jsonld +++ b/reproschema/tests/data/activities/activity1_embed.jsonld @@ -4,7 +4,7 @@ "@id": "activity1.jsonld", "prefLabel": "Example 1", "description": "Activity example 1", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", "preamble": { @@ -24,7 +24,7 @@ "@id": "items/item1.jsonld", "prefLabel": "item1", "description": "Q1 of example 1", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "question": { "en": "Little interest or pleasure in doing things", diff --git a/reproschema/tests/data/activities/items/activity1_total_score b/reproschema/tests/data/activities/items/activity1_total_score index b67faf0..5ed7f84 100644 --- a/reproschema/tests/data/activities/items/activity1_total_score +++ b/reproschema/tests/data/activities/items/activity1_total_score @@ -4,7 +4,7 @@ "@id": "activity1_total_score", "prefLabel": "activity1_total_score", "description": "Score item for Activity 1", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "ui": { "inputType": "number", diff --git a/reproschema/tests/data/activities/items/item1.jsonld b/reproschema/tests/data/activities/items/item1.jsonld index 7f171e4..50f73cc 100644 --- a/reproschema/tests/data/activities/items/item1.jsonld +++ b/reproschema/tests/data/activities/items/item1.jsonld @@ -4,7 +4,7 @@ "@id": "item1.jsonld", "prefLabel": "item1", "description": "Q1 of example 1", - "schemaVersion": "1.0.0-rc1.post", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "audio": { "@type": "AudioObject", diff --git a/reproschema/tests/data/activities/items/item2.jsonld b/reproschema/tests/data/activities/items/item2.jsonld index 0b1d4cc..cf1b37a 100644 --- a/reproschema/tests/data/activities/items/item2.jsonld +++ b/reproschema/tests/data/activities/items/item2.jsonld @@ -4,7 +4,7 @@ "@id": "item2.jsonld", "prefLabel": "item2", "description": "Q2 of example 1", - "schemaVersion": "0.0.1", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "question": { "en": "Current temperature.", @@ -38,6 +38,3 @@ ] } } - - - diff --git a/reproschema/tests/data/protocols/protocol1.jsonld b/reproschema/tests/data/protocols/protocol1.jsonld index c9fc432..dc79103 100644 --- a/reproschema/tests/data/protocols/protocol1.jsonld +++ b/reproschema/tests/data/protocols/protocol1.jsonld @@ -7,8 +7,10 @@ "es": "Protocol1_es" }, "description": "example Protocol", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", + "landingPage": {"@id": "http://example.com/sample-readme.md", + "inLanguage": "en"}, "messages": [ { "message": "Test message: Triggered when item1 value is greater than 0", diff --git a/reproschema/tests/data/protocols/protocol1_embed.jsonld b/reproschema/tests/data/protocols/protocol1_embed.jsonld index 3681040..69ac9cb 100644 --- a/reproschema/tests/data/protocols/protocol1_embed.jsonld +++ b/reproschema/tests/data/protocols/protocol1_embed.jsonld @@ -7,7 +7,7 @@ "es": "Protocol1_es" }, "description": "example Protocol", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "ui": { "addProperties": [ @@ -27,7 +27,7 @@ "@id": "../activities/activity1.jsonld", "prefLabel": "Example 1", "description": "Activity example 1", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", "preamble": { @@ -49,7 +49,7 @@ "@id": "../activities/items/item1.jsonld", "prefLabel": "item1", "description": "Q1 of example 1", - "schemaVersion": "1.0.0-rc2", + "schemaVersion": "1.0.0-rc4", "version": "0.0.1", "question": { "en": "Little interest or pleasure in doing things", diff --git a/reproschema/tests/reproschema-shacl.ttl b/reproschema/tests/reproschema-shacl.ttl index a62498f..c504503 100644 --- a/reproschema/tests/reproschema-shacl.ttl +++ b/reproschema/tests/reproschema-shacl.ttl @@ -1,77 +1,58 @@ @prefix dash: . +@prefix nidm: . +@prefix prov: . @prefix rdf: . @prefix reproschema: . @prefix schema: . @prefix sh: . @prefix skos: . @prefix xsd: . -@prefix nidm: . -@prefix uuid: . -@prefix prov: . reproschema:ActivityShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; sh:path schema:description ], - [ sh:datatype rdf:langString ; sh:path schema:schemaVersion ], - [ sh:datatype rdf:langString ; sh:path schema:version ], - [ sh:datatype rdf:langString ; sh:path schema:citation ], - - [ sh:or ( [ sh:datatype xsd:anyURI ; sh:pattern "((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)" ] [sh:node reproschema:MediaObjectShape] ) ; + [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:MediaObjectShape ] ) ; sh:path schema:image ], - [ sh:node reproschema:MediaObjectShape ; sh:path schema:audio ], - [ sh:node reproschema:MediaObjectShape ; sh:path schema:video ], - [ sh:nodeKind sh:IRI ; sh:path schema:about ], - [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path skos:prefLabel ], - [ sh:datatype rdf:langString ; sh:path skos:altLabel ], - [ sh:datatype rdf:langString ; sh:path reproschema:preamble ], - [ sh:node reproschema:ComputeSpecificationShape ; sh:path reproschema:compute ], - [ sh:node reproschema:MessageSpecificationShape ; sh:path reproschema:messages ], - [ sh:maxCount 1 ; sh:node dash:ListShape ; sh:path reproschema:order ; sh:property [ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ], - [ sh:node reproschema:AddPropertiesShape ; sh:path reproschema:addProperties ], - [ sh:node reproschema:OverridePropertiesShape ; sh:path reproschema:overrideProperties ], - [ sh:datatype schema:Boolean ; sh:path reproschema:shuffle ], - - [ sh:nodeKind sh:IRI ; - sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + [ sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + sh:nodeKind sh:IRI ; sh:path reproschema:allow ], - [ sh:node reproschema:CronTableShape ; sh:path reproschema:cronTable ] ; sh:targetClass reproschema:Activity . @@ -80,57 +61,42 @@ reproschema:FieldShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; - sh:minCount 1 ; - sh:path skos:prefLabel ], - - [ sh:datatype rdf:langString ; - sh:path skos:altLabel ], - - [ sh:datatype rdf:langString ; - sh:path schema:description ], - - [ sh:datatype rdf:langString ; - sh:path schema:schemaVersion ], - - [ sh:datatype rdf:langString ; - sh:path schema:version ], - - [ sh:datatype rdf:langString ; - sh:path schema:question ], - - [ sh:datatype rdf:langString ; sh:path reproschema:preamble ], - - [ sh:or ( [ sh:datatype xsd:anyURI ; sh:pattern "((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)" ] [sh:node reproschema:MediaObjectShape] ) ; + [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:MediaObjectShape ] ) ; sh:path schema:image ], - [ sh:node reproschema:MediaObjectShape ; sh:path schema:audio ], - [ sh:node reproschema:MediaObjectShape ; sh:path schema:video ], - [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:minCount 1 ; sh:path reproschema:inputType ], - [ sh:datatype xsd:boolean ; sh:maxCount 1 ; sh:path schema:readonlyValue ], - - [ sh:nodeKind sh:IRI ; - sh:maxCount 1 ; + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; sh:path schema:about ], - [ sh:nodeKind sh:IRI ; sh:path schema:isPartOf ], - [ sh:node reproschema:AdditionalNoteObjShape ; sh:path reproschema:additionalNotesObj ], - [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:ResponseOptionsShape ] ) ; - sh:path reproschema:responseOptions ] ; + sh:path reproschema:responseOptions ], + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path skos:prefLabel ], + [ sh:datatype rdf:langString ; + sh:path skos:altLabel ], + [ sh:datatype rdf:langString ; + sh:path schema:description ], + [ sh:datatype rdf:langString ; + sh:path schema:schemaVersion ], + [ sh:datatype rdf:langString ; + sh:path schema:version ], + [ sh:datatype rdf:langString ; + sh:path schema:question ] ; sh:targetClass reproschema:Field . reproschema:ProtocolShape a sh:NodeShape ; @@ -138,213 +104,200 @@ reproschema:ProtocolShape a sh:NodeShape ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; sh:path schema:description ], - [ sh:datatype rdf:langString ; sh:path schema:schemaVersion ], - [ sh:datatype rdf:langString ; sh:path schema:version ], - - [ sh:nodeKind sh:IRI ; - sh:maxCount 1 ; + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; sh:path schema:about ], - - [ sh:or ( [ sh:datatype xsd:anyURI ; sh:pattern "((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)" ] [sh:node reproschema:MediaObjectShape] ) ; + [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:MediaObjectShape ] ) ; sh:path schema:image ], - [ sh:node reproschema:MediaObjectShape ; sh:path schema:audio ], - [ sh:node reproschema:MediaObjectShape ; sh:path schema:video ], - - [ sh:nodeKind sh:IRI ; + [ sh:node reproschema:LandingPageShape ; sh:path reproschema:landingPage ], - [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path skos:prefLabel ], - [ sh:datatype rdf:langString ; sh:path skos:altLabel ], - [ sh:datatype rdf:langString ; sh:path reproschema:preamble ], - [ sh:node reproschema:ComputeSpecificationShape ; sh:path reproschema:compute ], - [ sh:node reproschema:MessageSpecificationShape ; sh:path reproschema:messages ], - [ sh:minCount 1 ; sh:node dash:ListShape ; sh:path reproschema:order ; sh:property [ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ], - [ sh:node reproschema:AddPropertiesShape ; sh:path reproschema:addProperties ], - [ sh:node reproschema:OverridePropertiesShape ; sh:path reproschema:overrideProperties ], - [ sh:datatype schema:Boolean ; sh:path reproschema:shuffle ], - - [ sh:nodeKind sh:IRI ; - sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + [ sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + sh:nodeKind sh:IRI ; sh:path reproschema:allow ] ; sh:targetClass reproschema:Protocol . +reproschema:ResponseActivityShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:nodeKind sh:IRI ; + sh:path prov:used ], + [ sh:datatype rdf:langString ; + sh:path schema:inLanguage ], + [ sh:datatype xsd:dateTime ; + sh:path prov:startedAtTime ], + [ sh:datatype xsd:dateTime ; + sh:path prov:endedAtTime ], + [ sh:node prov:SoftwareAgentShape ; + sh:path prov:wasAssociatedWith ], + [ sh:datatype rdf:langString ; + sh:path prov:generated ] ; + sh:targetClass reproschema:ResponseActivity . + +reproschema:ResponseShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:node prov:ParticipantShape ; + sh:path prov:wasAttributedTo ], + [ sh:nodeKind sh:IRI ; + sh:path reproschema:isAbout ], + [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype schema:Text ] ) ; + sh:path reproschema:value ] ; + sh:targetClass reproschema:Response . + +reproschema:AdditionalNoteObjShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:string ; + sh:minCount 1 ; + sh:path reproschema:source ], + [ sh:datatype xsd:string ; + sh:minCount 1 ; + sh:path reproschema:column ], + [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype rdf:langString ] ) ; + sh:path reproschema:value ] ; + sh:targetClass reproschema:AdditionalNoteObj . + +reproschema:ChoicesShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:MediaObjectShape ] ) ; + sh:path schema:image ], + [ sh:datatype rdf:langString ; + sh:path schema:name ], + [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype rdf:langString ] ) ; + sh:path reproschema:value ] ; + sh:targetClass reproschema:Choice . + +reproschema:LandingPageShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:path schema:inLanguage ] . + reproschema:ResponseOptionsShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype schema:Boolean ; sh:maxCount 1 ; sh:path reproschema:multipleChoice ], - [ sh:nodeKind sh:IRI ; sh:path reproschema:valueType ], - [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:path schema:minValue ], - [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:path schema:maxValue ], - [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:path reproschema:datumType ], - [ sh:or ( [ sh:datatype schema:URL ] [ sh:datatype rdf:langString ] ) ; sh:path schema:unitCode ], - [ sh:node reproschema:UnitOptionsShape ; - sh:path reproschema:unitOptions ] , - + sh:path reproschema:unitOptions ], [ sh:node reproschema:ChoicesShape ; sh:path reproschema:choices ] ; sh:targetClass reproschema:ResponseOption . -reproschema:AddPropertiesShape a sh:NodeShape ; +reproschema:UnitOptionsShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; - sh:minCount 1 ; - sh:path reproschema:variableName ], - - [ sh:minCount 1 ; - sh:nodeKind sh:IRI ; - sh:path reproschema:isAbout ], - - [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ; - sh:path reproschema:isVis ], - - [ sh:datatype rdf:langString ; sh:path skos:prefLabel ], + [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:datatype rdf:langString ] ) ; + sh:path reproschema:value ] ; + sh:targetClass reproschema:UnitOption . - [ sh:datatype xsd:boolean ; - sh:path schema:valueRequired ], +prov:ParticipantShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:path nidm:subject_id ] ; + sh:targetClass reproschema:Participant . +prov:SoftwareAgentShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:path schema:version ], [ sh:nodeKind sh:IRI ; - sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; - sh:path reproschema:allow ], - - [ sh:datatype rdf:langString ; - sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ; - sh:path reproschema:randomMaxDelay ], - - # Patterns extracted from: https://gist.githubusercontent.com/philipashlock/8830168/raw/e65bee7b2c1c9908fd62d064b2451e2cf29aa43c/index.html - [ sh:datatype rdf:langString ; - sh:or ( [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] - [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - [sh:pattern "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] - [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - ) ; - sh:path reproschema:schedule ], - - [ sh:datatype rdf:langString ; - sh:or ( [sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$"] - [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - ) ; - sh:path reproschema:limit ], - - [ sh:datatype xsd:integer ; - sh:path reproschema:maxRetakes ] ; - - sh:targetClass reproschema:AdditionalProperty . + sh:path schema:url ] ; + sh:targetClass reproschema:SoftwareAgent . -reproschema:OverridePropertiesShape a sh:NodeShape ; +reproschema:AddPropertiesShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path reproschema:variableName ], - [ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:path reproschema:isAbout ], - [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ; sh:path reproschema:isVis ], - [ sh:datatype rdf:langString ; sh:path skos:prefLabel ], - [ sh:datatype xsd:boolean ; sh:path schema:valueRequired ], - + [ sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + sh:nodeKind sh:IRI ; + sh:path reproschema:allow ], [ sh:datatype rdf:langString ; - sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ; - sh:path reproschema:randomMaxDelay ], - - # Patterns extracted from: https://gist.githubusercontent.com/philipashlock/8830168/raw/e65bee7b2c1c9908fd62d064b2451e2cf29aa43c/index.html + sh:path reproschema:randomMaxDelay ; + sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ], [ sh:datatype rdf:langString ; - sh:or ( [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] - [sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - [sh:pattern "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] - [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - ) ; + sh:or ( [ sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] [ sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] [ sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] [ sh:pattern "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] [ sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] ) ; sh:path reproschema:schedule ], - [ sh:datatype rdf:langString ; - sh:or ( [sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$"] - [sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] - ) ; + sh:or ( [ sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ] [ sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] ) ; sh:path reproschema:limit ], - [ sh:datatype xsd:integer ; sh:path reproschema:maxRetakes ] ; - sh:targetClass reproschema:OverrideProperty . - -reproschema:ChoicesShape a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:or ( [ sh:datatype xsd:anyURI ; sh:pattern "((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)" ] [sh:node reproschema:MediaObjectShape] ) ; - sh:path schema:image ], - - [ sh:datatype rdf:langString ; - sh:path schema:name ], - - [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype rdf:langString ]) ; - sh:path reproschema:value ] ; - sh:targetClass reproschema:Choice . + sh:targetClass reproschema:AdditionalProperty . -reproschema:UnitOptionsShape a sh:NodeShape ; +reproschema:ComputeSpecificationShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; - sh:path skos:prefLabel ], - - [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:datatype rdf:langString ]) ; - sh:path reproschema:value ] ; - sh:targetClass reproschema:UnitOption . + sh:minCount 1 ; + sh:path reproschema:variableName ], + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:jsExpression ] ; + sh:targetClass reproschema:ComputeSpecification . reproschema:IsVisShape a sh:NodeShape ; sh:closed true ; @@ -352,109 +305,58 @@ reproschema:IsVisShape a sh:NodeShape ; sh:property [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path schema:method ], - - [ sh:datatype rdf:langString ; - sh:minCount 1 ; + [ sh:minCount 1 ; + sh:nodeKind sh:IRI ; sh:path schema:url ], - [ sh:datatype rdf:langString ; sh:minCount 1 ; sh:path reproschema:payload ] . -reproschema:ComputeSpecificationShape a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype rdf:langString ; - sh:minCount 1 ; - sh:path reproschema:variableName ], - [ sh:datatype rdf:langString ; - sh:minCount 1 ; - sh:path reproschema:jsExpression ] ; - sh:targetClass reproschema:ComputeSpecification . - reproschema:MessageSpecificationShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype rdf:langString ; sh:minCount 1 ; - sh:path reproschema:message ] , - - [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] ) ; - sh:minCount 1 ; + sh:path reproschema:message ], + [ sh:minCount 1 ; + sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] ) ; sh:path reproschema:jsExpression ] ; sh:targetClass reproschema:MessageSpecification . -reproschema:AdditionalNoteObjShape a sh:NodeShape ; +reproschema:OverridePropertiesShape a sh:NodeShape ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:minCount 1 ; - sh:path reproschema:source ], - - [ sh:datatype xsd:string ; + sh:property [ sh:datatype rdf:langString ; sh:minCount 1 ; - sh:path reproschema:column ], - - [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype rdf:langString ]) ; - sh:path reproschema:value ] ; - sh:targetClass reproschema:AdditionalNoteObj . - -reproschema:ResponseShape a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:node prov:ParticipantShape ; - sh:path prov:wasAttributedTo ], - - [ sh:nodeKind sh:IRI ; + sh:path reproschema:variableName ], + [ sh:minCount 1 ; + sh:nodeKind sh:IRI ; sh:path reproschema:isAbout ], - - [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype schema:Text ]) ; - sh:path reproschema:value ] ; - sh:targetClass reproschema:Response . - -prov:ParticipantShape a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype rdf:langString ; - sh:path nidm:subject_id ] ; - sh:targetClass reproschema:Participant . - -reproschema:ResponseActivityShape a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:nodeKind sh:IRI ; - sh:path prov:used ], - + [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ; + sh:path reproschema:isVis ], [ sh:datatype rdf:langString ; - sh:path schema:inLanguage ], - - [ sh:datatype xsd:dateTime ; - sh:path prov:startedAtTime ], - - [ sh:datatype xsd:dateTime ; - sh:path prov:endedAtTime ], - - [ sh:node prov:SoftwareAgentShape ; - sh:path prov:wasAssociatedWith ], - + sh:path skos:prefLabel ], + [ sh:datatype xsd:boolean ; + sh:path schema:valueRequired ], [ sh:datatype rdf:langString ; - sh:path prov:generated ] ; - sh:targetClass reproschema:ResponseActivity . - -prov:SoftwareAgentShape a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype rdf:langString ; - sh:path schema:version ], - - [ sh:nodeKind sh:IRI ; - sh:path schema:url ] ; - sh:targetClass reproschema:SoftwareAgent . + sh:path reproschema:randomMaxDelay ; + sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ], + [ sh:datatype rdf:langString ; + sh:or ( [ sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] [ sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] [ sh:pattern "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] [ sh:pattern "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" ] [ sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] ) ; + sh:path reproschema:schedule ], + [ sh:datatype rdf:langString ; + sh:or ( [ sh:pattern "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$" ] [ sh:pattern "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" ] ) ; + sh:path reproschema:limit ], + [ sh:datatype xsd:integer ; + sh:path reproschema:maxRetakes ] ; + sh:targetClass reproschema:OverrideProperty . reproschema:MediaObjectShape a sh:NodeShape ; - sh:closed true; + sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:anyURI ; - sh:minCount 1 ; - sh:pattern "((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)" ; - sh:path schema:contentUrl ] . + sh:property [ sh:minCount 1 ; + sh:nodeKind sh:IRI ; + sh:path schema:contentUrl ], + [ sh:datatype rdf:langString ; + sh:maxCount 1 ; + sh:path schema:inLanguage ] . From 506ab422648393a549d35c579eac5acc825c4488 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sat, 20 Mar 2021 12:33:52 -0400 Subject: [PATCH 2/3] add test for 3.9 --- .github/workflows/pythonpackage.yml | 2 +- setup.cfg | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index dc9cc3f..85e661b 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-18.04] - python-version: [3.7, 3.8] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 diff --git a/setup.cfg b/setup.cfg index e58354d..ef22d32 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,6 +18,8 @@ classifiers = Operating System :: MacOS :: MacOS X Operating System :: POSIX :: Linux Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Topic :: Scientific/Engineering [options] From 30f212af6a2651510320405c07ae5df179669437 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sun, 21 Mar 2021 15:58:26 -0400 Subject: [PATCH 3/3] fix: activity compute logic exmaple --- reproschema/tests/data/activities/activity1.jsonld | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reproschema/tests/data/activities/activity1.jsonld b/reproschema/tests/data/activities/activity1.jsonld index 78f69ad..6a533ee 100644 --- a/reproschema/tests/data/activities/activity1.jsonld +++ b/reproschema/tests/data/activities/activity1.jsonld @@ -17,8 +17,8 @@ }, "compute": [ { - "variableName": "phq9_total_score", - "jsExpression": "phq9_1 + phq9_2 + phq9_3 + phq9_4 + phq9_5 + phq9_6 + phq9_7 + phq9_8 + phq9_9" + "variableName": "activity1_total_score", + "jsExpression": "item1 + item2" } ], "messages": [ @@ -44,7 +44,7 @@ "allow": ["reproschema:Skipped"] }, { "isAbout": "items/activity1_total_score", - "variableName": "phq9_total_score", + "variableName": "activity1_total_score", "requiredValue": true, "isVis": false }