Skip to content

Commit caaf5be

Browse files
authored
Merge pull request #15 from satra/fix/rc4
match with schema 1.0.0-rc4 examples
2 parents bdd2d32 + 30f212a commit caaf5be

File tree

12 files changed

+190
-283
lines changed

12 files changed

+190
-283
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [macos-latest, ubuntu-18.04]
19-
python-version: [3.7, 3.8]
19+
python-version: [3.7, 3.8, 3.9]
2020

2121
steps:
2222
- uses: actions/checkout@v2

reproschema/models/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, version=None):
1818
}
1919

2020
def set_landing_page(self, landing_page_url, lang="en"):
21-
self.schema["landingPage"] = {"@id": landing_page_url, "@language": lang}
21+
self.schema["landingPage"] = {"@id": landing_page_url, "inLanguage": lang}
2222

2323
# TODO
2424
# def add_landing_page(self, landing_page_url, lang="en"):

reproschema/tests/contexts/generic

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"imageUrl": {
2121
"@id": "schema:image",
22-
"@type": "xsd:anyURI"
22+
"@type": "@id"
2323
},
2424
"audio": {
2525
"@id": "schema:audio"
@@ -29,7 +29,7 @@
2929
},
3030
"contentUrl": {
3131
"@id": "schema:contentUrl",
32-
"@type": "xsd:anyURI"
32+
"@type": "@id"
3333
},
3434
"VideoObject": "schema:VideoObject",
3535
"AudioObject": "schema:AudioObject",
@@ -45,12 +45,10 @@
4545
"@container": "@language"
4646
},
4747
"version": {
48-
"@id": "schema:version",
49-
"@container": "@language"
48+
"@id": "schema:version"
5049
},
5150
"schemaVersion": {
52-
"@id": "schema:schemaVersion",
53-
"@container": "@language"
51+
"@id": "schema:schemaVersion"
5452
},
5553
"prefLabel": {
5654
"@id": "skos:prefLabel",
@@ -71,6 +69,7 @@
7169
},
7270
"landingPage": {
7371
"@id": "reproschema:landingPage",
72+
"@type": "@id",
7473
"@container": "@set"
7574
},
7675
"question": {
@@ -152,11 +151,11 @@
152151
},
153152
"compute": {
154153
"@id": "reproschema:compute",
155-
"@container": "@index"
154+
"@container": "@set"
156155
},
157156
"messages": {
158157
"@id": "reproschema:messages",
159-
"@container": "@index"
158+
"@container": "@set"
160159
},
161160
"jsExpression": {
162161
"@id": "reproschema:jsExpression"

reproschema/tests/data/activities/activity1.jsonld

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@id": "activity1.jsonld",
55
"prefLabel": "Example 1",
66
"description": "Activity example 1",
7-
"schemaVersion": "1.0.0-rc2",
7+
"schemaVersion": "1.0.0-rc4",
88
"version": "0.0.1",
99
"citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/",
1010
"image": {
@@ -15,18 +15,18 @@
1515
"en": "Over the last 2 weeks, how often have you been bothered by any of the following problems?",
1616
"es": "Durante las últimas 2 semanas, ¿con qué frecuencia le han molestado los siguintes problemas?"
1717
},
18-
"messages": [
19-
{
20-
"message": "Test message: Triggered when item1 value is greater than 1",
21-
"jsExpression": "item1 > 1"
22-
}
23-
],
2418
"compute": [
2519
{
2620
"variableName": "activity1_total_score",
2721
"jsExpression": "item1 + item2"
2822
}
2923
],
24+
"messages": [
25+
{
26+
"message": "Test message: Triggered when item1 value is greater than 1",
27+
"jsExpression": "item1 > 1"
28+
}
29+
],
3030
"ui": {
3131
"addProperties": [
3232
{ "isAbout": "items/item1.jsonld",
@@ -42,6 +42,11 @@
4242
"requiredValue": true,
4343
"isVis": true,
4444
"allow": ["reproschema:Skipped"]
45+
},
46+
{ "isAbout": "items/activity1_total_score",
47+
"variableName": "activity1_total_score",
48+
"requiredValue": true,
49+
"isVis": false
4550
}
4651
],
4752
"order": [
@@ -51,4 +56,4 @@
5156
],
5257
"shuffle": false
5358
}
54-
}
59+
}

reproschema/tests/data/activities/activity1_embed.jsonld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@id": "activity1.jsonld",
55
"prefLabel": "Example 1",
66
"description": "Activity example 1",
7-
"schemaVersion": "1.0.0-rc2",
7+
"schemaVersion": "1.0.0-rc4",
88
"version": "0.0.1",
99
"citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/",
1010
"preamble": {
@@ -24,7 +24,7 @@
2424
"@id": "items/item1.jsonld",
2525
"prefLabel": "item1",
2626
"description": "Q1 of example 1",
27-
"schemaVersion": "1.0.0-rc2",
27+
"schemaVersion": "1.0.0-rc4",
2828
"version": "0.0.1",
2929
"question": {
3030
"en": "Little interest or pleasure in doing things",

reproschema/tests/data/activities/items/activity1_total_score

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@id": "activity1_total_score",
55
"prefLabel": "activity1_total_score",
66
"description": "Score item for Activity 1",
7-
"schemaVersion": "1.0.0-rc2",
7+
"schemaVersion": "1.0.0-rc4",
88
"version": "0.0.1",
99
"ui": {
1010
"inputType": "number",

reproschema/tests/data/activities/items/item1.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@id": "item1.jsonld",
55
"prefLabel": "item1",
66
"description": "Q1 of example 1",
7-
"schemaVersion": "1.0.0-rc1.post",
7+
"schemaVersion": "1.0.0-rc4",
88
"version": "0.0.1",
99
"audio": {
1010
"@type": "AudioObject",

reproschema/tests/data/activities/items/item2.jsonld

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@id": "item2.jsonld",
55
"prefLabel": "item2",
66
"description": "Q2 of example 1",
7-
"schemaVersion": "0.0.1",
7+
"schemaVersion": "1.0.0-rc4",
88
"version": "0.0.1",
99
"question": {
1010
"en": "Current temperature.",
@@ -38,6 +38,3 @@
3838
]
3939
}
4040
}
41-
42-
43-

reproschema/tests/data/protocols/protocol1.jsonld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
"es": "Protocol1_es"
88
},
99
"description": "example Protocol",
10-
"schemaVersion": "1.0.0-rc2",
10+
"schemaVersion": "1.0.0-rc4",
1111
"version": "0.0.1",
12+
"landingPage": {"@id": "http://example.com/sample-readme.md",
13+
"inLanguage": "en"},
1214
"messages": [
1315
{
1416
"message": "Test message: Triggered when item1 value is greater than 0",

reproschema/tests/data/protocols/protocol1_embed.jsonld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"es": "Protocol1_es"
88
},
99
"description": "example Protocol",
10-
"schemaVersion": "1.0.0-rc2",
10+
"schemaVersion": "1.0.0-rc4",
1111
"version": "0.0.1",
1212
"ui": {
1313
"addProperties": [
@@ -27,7 +27,7 @@
2727
"@id": "../activities/activity1.jsonld",
2828
"prefLabel": "Example 1",
2929
"description": "Activity example 1",
30-
"schemaVersion": "1.0.0-rc2",
30+
"schemaVersion": "1.0.0-rc4",
3131
"version": "0.0.1",
3232
"citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/",
3333
"preamble": {
@@ -49,7 +49,7 @@
4949
"@id": "../activities/items/item1.jsonld",
5050
"prefLabel": "item1",
5151
"description": "Q1 of example 1",
52-
"schemaVersion": "1.0.0-rc2",
52+
"schemaVersion": "1.0.0-rc4",
5353
"version": "0.0.1",
5454
"question": {
5555
"en": "Little interest or pleasure in doing things",

0 commit comments

Comments
 (0)