Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion reproschema/models/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
15 changes: 7 additions & 8 deletions reproschema/tests/contexts/generic
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"imageUrl": {
"@id": "schema:image",
"@type": "xsd:anyURI"
"@type": "@id"
},
"audio": {
"@id": "schema:audio"
Expand All @@ -29,7 +29,7 @@
},
"contentUrl": {
"@id": "schema:contentUrl",
"@type": "xsd:anyURI"
"@type": "@id"
},
"VideoObject": "schema:VideoObject",
"AudioObject": "schema:AudioObject",
Expand All @@ -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",
Expand All @@ -71,6 +69,7 @@
},
"landingPage": {
"@id": "reproschema:landingPage",
"@type": "@id",
"@container": "@set"
},
"question": {
Expand Down Expand Up @@ -152,11 +151,11 @@
},
"compute": {
"@id": "reproschema:compute",
"@container": "@index"
"@container": "@set"
},
"messages": {
"@id": "reproschema:messages",
"@container": "@index"
"@container": "@set"
},
"jsExpression": {
"@id": "reproschema:jsExpression"
Expand Down
21 changes: 13 additions & 8 deletions reproschema/tests/data/activities/activity1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
],
"messages": [
{
"message": "Test message: Triggered when item1 value is greater than 1",
"jsExpression": "item1 > 1"
}
],
"ui": {
"addProperties": [
{ "isAbout": "items/item1.jsonld",
Expand All @@ -42,6 +42,11 @@
"requiredValue": true,
"isVis": true,
"allow": ["reproschema:Skipped"]
},
{ "isAbout": "items/activity1_total_score",
"variableName": "activity1_total_score",
"requiredValue": true,
"isVis": false
}
],
"order": [
Expand All @@ -51,4 +56,4 @@
],
"shuffle": false
}
}
}
4 changes: 2 additions & 2 deletions reproschema/tests/data/activities/activity1_embed.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion reproschema/tests/data/activities/items/item1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 1 addition & 4 deletions reproschema/tests/data/activities/items/item2.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -38,6 +38,3 @@
]
}
}



4 changes: 3 additions & 1 deletion reproschema/tests/data/protocols/protocol1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions reproschema/tests/data/protocols/protocol1_embed.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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": {
Expand All @@ -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",
Expand Down
Loading