@@ -12,7 +12,7 @@ def test_issue_0002():
1212
1313 node = build_fake_node (omcore .Person )
1414 data = node .to_jsonld ()
15- assert data ["@type" ] == "https://openminds.ebrains.eu/core /Person"
15+ assert data ["@type" ] == "https://openminds.om-i.org/types /Person"
1616
1717
1818def test_issue_0003 ():
@@ -38,21 +38,22 @@ def test_issue_0003():
3838 )
3939 # on export, a single item should be wrapped in a list, where the property expects an array
4040 expected = {
41- "@context" : {"@vocab" : "https://openminds.ebrains.eu/vocab /" },
42- "@type" : "https://openminds.ebrains.eu/core /FileArchive" ,
41+ "@context" : {"@vocab" : "https://openminds.om-i.org/props /" },
42+ "@type" : "https://openminds.om-i.org/types /FileArchive" ,
4343 "IRI" : "http://example.com/archive.zip" ,
4444 "format" : {
45- "@type" : "https://openminds.ebrains.eu/core /ContentType" ,
45+ "@type" : "https://openminds.om-i.org/types /ContentType" ,
4646 "name" : "application/zip" ,
4747 },
4848 "sourceData" : [
4949 {
50- "@type" : "https://openminds.ebrains.eu/core /File" ,
50+ "@type" : "https://openminds.om-i.org/types /File" ,
5151 "IRI" : "http://example.com/some_file.txt" ,
5252 "name" : "some_file.txt" ,
5353 }
5454 ],
5555 }
56+
5657 assert (
5758 node1 .to_jsonld (include_empty_properties = False ) == node2 .to_jsonld (include_empty_properties = False ) == expected
5859 )
@@ -89,23 +90,19 @@ def test_issue0007():
8990
9091 actual = person .to_jsonld (include_empty_properties = False , embed_linked_nodes = False , with_context = True )
9192 expected = {
92- "@context" : {"@vocab" : "https://openminds.ebrains.eu/vocab /" },
93+ "@context" : {"@vocab" : "https://openminds.om-i.org/props /" },
9394 "@id" : "_:001" ,
94- "@type" : "https://openminds.ebrains.eu/core /Person" ,
95+ "@type" : "https://openminds.om-i.org/types /Person" ,
9596 "familyName" : "Professor" ,
9697 "givenName" : "A" ,
9798 "affiliation" : [
9899 {
99- "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
100- "memberOf" : {
101- "@id" : "_:002"
102- },
100+ "@type" : "https://openminds.om-i.org/types/Affiliation" ,
101+ "memberOf" : {"@id" : "_:002" },
103102 },
104103 {
105- "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
106- "memberOf" : {
107- "@id" : "_:003"
108- },
104+ "@type" : "https://openminds.om-i.org/types/Affiliation" ,
105+ "memberOf" : {"@id" : "_:003" },
109106 },
110107 ],
111108 }
@@ -119,36 +116,32 @@ def test_issue0007():
119116 saved_data = json .load (fp )
120117 os .remove ("issue0007.jsonld" )
121118 expected_saved_data = {
122- "@context" : {"@vocab" : "https://openminds.ebrains.eu/vocab /" },
119+ "@context" : {"@vocab" : "https://openminds.om-i.org/props /" },
123120 "@graph" : [
124121 {
125122 "@id" : "_:001" ,
126- "@type" : "https://openminds.ebrains.eu/core /Person" ,
123+ "@type" : "https://openminds.om-i.org/types /Person" ,
127124 "affiliation" : [
128125 {
129- "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
130- "memberOf" : {
131- "@id" : "_:002"
132- },
126+ "@type" : "https://openminds.om-i.org/types/Affiliation" ,
127+ "memberOf" : {"@id" : "_:002" },
133128 },
134129 {
135- "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
136- "memberOf" : {
137- "@id" : "_:003"
138- },
130+ "@type" : "https://openminds.om-i.org/types/Affiliation" ,
131+ "memberOf" : {"@id" : "_:003" },
139132 },
140133 ],
141134 "familyName" : "Professor" ,
142135 "givenName" : "A" ,
143136 },
144137 {
145138 "@id" : "_:002" ,
146- "@type" : "https://openminds.ebrains.eu/core /Organization" ,
139+ "@type" : "https://openminds.om-i.org/types /Organization" ,
147140 "fullName" : "University of This Place" ,
148141 },
149142 {
150143 "@id" : "_:003" ,
151- "@type" : "https://openminds.ebrains.eu/core /Organization" ,
144+ "@type" : "https://openminds.om-i.org/types /Organization" ,
152145 "fullName" : "University of That Place" ,
153146 },
154147 ],
@@ -170,16 +163,14 @@ def test_issue0008():
170163 )
171164 actual = person .to_jsonld (include_empty_properties = False , embed_linked_nodes = False , with_context = True )
172165 expected = {
173- "@context" : {"@vocab" : "https://openminds.ebrains.eu/vocab /" },
166+ "@context" : {"@vocab" : "https://openminds.om-i.org/props /" },
174167 "@id" : "_:002" ,
175- "@type" : "https://openminds.ebrains.eu/core /Person" ,
168+ "@type" : "https://openminds.om-i.org/types /Person" ,
176169 "affiliation" : [
177170 {
178- "@type" : "https://openminds.ebrains.eu/core /Affiliation" ,
171+ "@type" : "https://openminds.om-i.org/types /Affiliation" ,
179172 "endDate" : "2023-09-30" ,
180- "memberOf" : {
181- "@id" : "_:001"
182- },
173+ "memberOf" : {"@id" : "_:001" },
183174 }
184175 ],
185176 "familyName" : "Professor" ,
@@ -195,10 +186,7 @@ def test_issue0026():
195186
196187 uni1 = omcore .Organization (full_name = "University of This Place" , id = "_:uthisp" )
197188 person = omcore .Person (
198- given_name = "A" ,
199- family_name = "Professor" ,
200- affiliations = [omcore .Affiliation (member_of = uni1 )],
201- id = "_:ap"
189+ given_name = "A" , family_name = "Professor" , affiliations = [omcore .Affiliation (member_of = uni1 )], id = "_:ap"
202190 )
203191
204192 c = Collection (person )
@@ -223,16 +211,9 @@ def test_issue0023():
223211
224212 uni1 = omcore .Organization (full_name = "University of This Place" , id = "_:uthisp" )
225213 person = omcore .Person (
226- given_name = "A" ,
227- family_name = "Professor" ,
228- affiliations = [omcore .Affiliation (member_of = uni1 )],
229- id = "_:ap"
230- )
231- dv = omcore .DatasetVersion (
232- full_name = "The name of the dataset version" ,
233- custodians = [person ],
234- id = "_:dv"
214+ given_name = "A" , family_name = "Professor" , affiliations = [omcore .Affiliation (member_of = uni1 )], id = "_:ap"
235215 )
216+ dv = omcore .DatasetVersion (full_name = "The name of the dataset version" , custodians = [person ], id = "_:dv" )
236217
237218 c = Collection (dv )
238219
0 commit comments