Skip to content

Commit b76f351

Browse files
authored
API-TEST: Update Curie Formation Logic (#755)
* - Update curie formation logic * - Improve code logic * - Improve code logic to handle edge cases * - Update testcases * - Update API testcase
1 parent f4724f8 commit b76f351

31 files changed

+4293
-4296
lines changed

apitester4/src/main/java/uk/ac/ebi/ols/apitester/RecursiveJsonDiff.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,10 @@ public boolean diff() throws FileNotFoundException {
6363
continue;
6464
}
6565

66-
if(jsonA.equals(jsonB)) {
67-
System.out.println(inputDir + filename + " was equal to " + expectedDir + filename);
68-
} else {
66+
if(!jsonA.equals(jsonB)) {
6967
System.out.println(inputDir + filename + " differed from " + expectedDir + filename);
7068
success = false;
7169
}
72-
7370
}
7471

7572
return success;

testcases_expected_output_api/v2/ontologies.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
"language": "en",
168168
"linkedEntities": {
169169
"http://exmpl.org/xmpl/Preferred_name": {
170-
"curie": "XMPL:Preferred_name",
170+
"curie": "XMPL_Preferred_name",
171171
"definedBy": [
172172
"xmpl"
173173
],
@@ -181,7 +181,7 @@
181181
]
182182
},
183183
"http://exmpl.org/xmpl/Synonym": {
184-
"curie": "XMPL:Synonym",
184+
"curie": "XMPL_Synonym",
185185
"definedBy": [
186186
"xmpl"
187187
],
@@ -241,7 +241,7 @@
241241
"language": "en",
242242
"linkedEntities": {
243243
"http://www.w3.org/2000/01/rdf-schema#comment": {
244-
"curie": "RDFS:comment",
244+
"curie": "RDFS_comment",
245245
"definedBy": [
246246
"rdfs"
247247
],
@@ -254,7 +254,7 @@
254254
]
255255
},
256256
"http://www.w3.org/2000/01/rdf-schema#label": {
257-
"curie": "RDFS:label",
257+
"curie": "RDFS_label",
258258
"definedBy": [
259259
"rdfs"
260260
],
@@ -300,7 +300,7 @@
300300
"language": "en",
301301
"linkedEntities": {
302302
"http://www.w3.org/2000/01/rdf-schema#seeAlso": {
303-
"curie": "RDFS:seeAlso",
303+
"curie": "RDFS_seeAlso",
304304
"definedBy": [
305305
"rdfs"
306306
],
@@ -359,7 +359,7 @@
359359
"language": "en",
360360
"linkedEntities": {
361361
"http://www.w3.org/2000/01/rdf-schema#comment": {
362-
"curie": "RDFS:comment",
362+
"curie": "RDFS_comment",
363363
"definedBy": [
364364
"rdfs"
365365
],
@@ -372,7 +372,7 @@
372372
]
373373
},
374374
"http://www.w3.org/2000/01/rdf-schema#isDefinedBy": {
375-
"curie": "RDFS:isDefinedBy",
375+
"curie": "RDFS_isDefinedBy",
376376
"definedBy": [
377377
"rdfs"
378378
],
@@ -385,7 +385,7 @@
385385
]
386386
},
387387
"http://www.w3.org/2000/01/rdf-schema#seeAlso": {
388-
"curie": "RDFS:seeAlso",
388+
"curie": "RDFS_seeAlso",
389389
"definedBy": [
390390
"rdfs"
391391
],
@@ -452,7 +452,7 @@
452452
]
453453
},
454454
"http://www.w3.org/2000/01/rdf-schema#seeAlso": {
455-
"curie": "RDFS:seeAlso",
455+
"curie": "RDFS_seeAlso",
456456
"definedBy": [
457457
"rdfs"
458458
],
@@ -604,7 +604,7 @@
604604
]
605605
},
606606
"http://purl.obolibrary.org/obo/ms#part_of": {
607-
"curie": "part:of",
607+
"curie": "part_of",
608608
"hasLocalDefinition": true,
609609
"label": "part_of",
610610
"numAppearsIn": 1.0,

testcases_expected_output_api/v2/ontologies/duo/classes.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"appearsIn": [
44
"duo"
55
],
6-
"curie": "APOLLO:SV_00000008",
6+
"curie": "APOLLO_SV:00000008",
77
"definition": "A planned process that has specified output a software product and that involves the creation of source code.",
88
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
99
"directAncestor": [
@@ -214,7 +214,7 @@
214214
"appearsIn": [
215215
"duo"
216216
],
217-
"curie": "APOLLO:SV_00000032",
217+
"curie": "APOLLO_SV:00000032",
218218
"definition": "A measurement datum that is the output of counting.",
219219
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
220220
"directAncestor": [
@@ -266,7 +266,7 @@
266266
"label": "count",
267267
"linkedEntities": {
268268
"http://purl.obolibrary.org/obo/APOLLO_SV_00000033": {
269-
"curie": "APOLLO:SV_00000033",
269+
"curie": "APOLLO_SV:00000033",
270270
"hasLocalDefinition": true,
271271
"label": "counting",
272272
"numAppearsIn": 1.0,
@@ -410,7 +410,7 @@
410410
"appearsIn": [
411411
"duo"
412412
],
413-
"curie": "APOLLO:SV_00000033",
413+
"curie": "APOLLO_SV:00000033",
414414
"definition": "The planned process of finding the number of elements in a finite set of objects.",
415415
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
416416
"directAncestor": [
@@ -464,7 +464,7 @@
464464
"url": "http://en.wikipedia.org/wiki/Counting"
465465
},
466466
"http://purl.obolibrary.org/obo/APOLLO_SV_00000032": {
467-
"curie": "APOLLO:SV_00000032",
467+
"curie": "APOLLO_SV:00000032",
468468
"hasLocalDefinition": true,
469469
"label": "count",
470470
"numAppearsIn": 1.0,
@@ -599,7 +599,7 @@
599599
"appearsIn": [
600600
"duo"
601601
],
602-
"curie": "APOLLO:SV_00000522",
602+
"curie": "APOLLO_SV:00000522",
603603
"definition": [
604604
"A document that comprises at least one source code module and provenance data about who contributed the set of files making up the module(s), and optionally comprises also multiple versions of files with detailed change history about who committed files and when, a license for the software, readme files, documentation, executables, etc.",
605605
"Refers to the stuff that lives on GitHub, not to GitHub or the git software on which it is based"
@@ -867,7 +867,7 @@
867867
"appearsIn": [
868868
"duo"
869869
],
870-
"curie": "APOLLO:SV_00000524",
870+
"curie": "APOLLO_SV:00000524",
871871
"definition": [
872872
"A planned process that converts human-written or curated software into a machine-executable or interpretable set of instructions.",
873873
"It's compiling \"software\" (scare quotes) and not \"source code\" because you can compile Java bytecode to machine code, and Java bytecode is not technically \"source code\". Compiling source code would be a subclass of this class (as would compiling Java bytecode, etc.).",
@@ -941,7 +941,7 @@
941941
"label": "compiling software",
942942
"linkedEntities": {
943943
"http://purl.obolibrary.org/obo/APOLLO_SV_00000008": {
944-
"curie": "APOLLO:SV_00000008",
944+
"curie": "APOLLO_SV:00000008",
945945
"hasLocalDefinition": true,
946946
"label": "software development",
947947
"numAppearsIn": 1.0,
@@ -1109,7 +1109,7 @@
11091109
"appearsIn": [
11101110
"duo"
11111111
],
1112-
"curie": "APOLLO:SV_00000796",
1112+
"curie": "APOLLO_SV:00000796",
11131113
"definition": "A planned process that has a data set as its specified output.",
11141114
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
11151115
"directAncestor": [
@@ -20289,7 +20289,7 @@
2028920289
"label": "data item",
2029020290
"linkedEntities": {
2029120291
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
20292-
"curie": "APOLLO:SV_00000522",
20292+
"curie": "APOLLO_SV:00000522",
2029320293
"hasLocalDefinition": true,
2029420294
"label": "source code repository",
2029520295
"numAppearsIn": 1.0,
@@ -24297,7 +24297,7 @@
2429724297
"label": "source code module",
2429824298
"linkedEntities": {
2429924299
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
24300-
"curie": "APOLLO:SV_00000522",
24300+
"curie": "APOLLO_SV:00000522",
2430124301
"hasLocalDefinition": true,
2430224302
"label": "source code repository",
2430324303
"numAppearsIn": 1.0,

testcases_expected_output_api/v2/ontologies/duo/entities.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"appearsIn": [
44
"duo"
55
],
6-
"curie": "APOLLO:SV_00000008",
6+
"curie": "APOLLO_SV:00000008",
77
"definition": "A planned process that has specified output a software product and that involves the creation of source code.",
88
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
99
"directAncestor": [
@@ -214,7 +214,7 @@
214214
"appearsIn": [
215215
"duo"
216216
],
217-
"curie": "APOLLO:SV_00000032",
217+
"curie": "APOLLO_SV:00000032",
218218
"definition": "A measurement datum that is the output of counting.",
219219
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
220220
"directAncestor": [
@@ -266,7 +266,7 @@
266266
"label": "count",
267267
"linkedEntities": {
268268
"http://purl.obolibrary.org/obo/APOLLO_SV_00000033": {
269-
"curie": "APOLLO:SV_00000033",
269+
"curie": "APOLLO_SV:00000033",
270270
"hasLocalDefinition": true,
271271
"label": "counting",
272272
"numAppearsIn": 1.0,
@@ -410,7 +410,7 @@
410410
"appearsIn": [
411411
"duo"
412412
],
413-
"curie": "APOLLO:SV_00000033",
413+
"curie": "APOLLO_SV:00000033",
414414
"definition": "The planned process of finding the number of elements in a finite set of objects.",
415415
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
416416
"directAncestor": [
@@ -464,7 +464,7 @@
464464
"url": "http://en.wikipedia.org/wiki/Counting"
465465
},
466466
"http://purl.obolibrary.org/obo/APOLLO_SV_00000032": {
467-
"curie": "APOLLO:SV_00000032",
467+
"curie": "APOLLO_SV:00000032",
468468
"hasLocalDefinition": true,
469469
"label": "count",
470470
"numAppearsIn": 1.0,
@@ -599,7 +599,7 @@
599599
"appearsIn": [
600600
"duo"
601601
],
602-
"curie": "APOLLO:SV_00000522",
602+
"curie": "APOLLO_SV:00000522",
603603
"definition": [
604604
"A document that comprises at least one source code module and provenance data about who contributed the set of files making up the module(s), and optionally comprises also multiple versions of files with detailed change history about who committed files and when, a license for the software, readme files, documentation, executables, etc.",
605605
"Refers to the stuff that lives on GitHub, not to GitHub or the git software on which it is based"
@@ -867,7 +867,7 @@
867867
"appearsIn": [
868868
"duo"
869869
],
870-
"curie": "APOLLO:SV_00000524",
870+
"curie": "APOLLO_SV:00000524",
871871
"definition": [
872872
"A planned process that converts human-written or curated software into a machine-executable or interpretable set of instructions.",
873873
"It's compiling \"software\" (scare quotes) and not \"source code\" because you can compile Java bytecode to machine code, and Java bytecode is not technically \"source code\". Compiling source code would be a subclass of this class (as would compiling Java bytecode, etc.).",
@@ -941,7 +941,7 @@
941941
"label": "compiling software",
942942
"linkedEntities": {
943943
"http://purl.obolibrary.org/obo/APOLLO_SV_00000008": {
944-
"curie": "APOLLO:SV_00000008",
944+
"curie": "APOLLO_SV:00000008",
945945
"hasLocalDefinition": true,
946946
"label": "software development",
947947
"numAppearsIn": 1.0,
@@ -1109,7 +1109,7 @@
11091109
"appearsIn": [
11101110
"duo"
11111111
],
1112-
"curie": "APOLLO:SV_00000796",
1112+
"curie": "APOLLO_SV:00000796",
11131113
"definition": "A planned process that has a data set as its specified output.",
11141114
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
11151115
"directAncestor": [
@@ -21757,7 +21757,7 @@
2175721757
"label": "data item",
2175821758
"linkedEntities": {
2175921759
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
21760-
"curie": "APOLLO:SV_00000522",
21760+
"curie": "APOLLO_SV:00000522",
2176121761
"hasLocalDefinition": true,
2176221762
"label": "source code repository",
2176321763
"numAppearsIn": 1.0,
@@ -25836,7 +25836,7 @@
2583625836
"label": "source code module",
2583725837
"linkedEntities": {
2583825838
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
25839-
"curie": "APOLLO:SV_00000522",
25839+
"curie": "APOLLO_SV:00000522",
2584025840
"hasLocalDefinition": true,
2584125841
"label": "source code repository",
2584225842
"numAppearsIn": 1.0,
@@ -73904,7 +73904,7 @@
7390473904
]
7390573905
},
7390673906
"http://www.geneontology.org/formats/oboInOwl#created_by": {
73907-
"curie": "created:by",
73907+
"curie": "created_by",
7390873908
"hasLocalDefinition": true,
7390973909
"label": "created_by",
7391073910
"numAppearsIn": 1.0,
@@ -78651,7 +78651,7 @@
7865178651
"appearsIn": [
7865278652
"duo"
7865378653
],
78654-
"curie": "created:by",
78654+
"curie": "created_by",
7865578655
"hasDirectChildren": false,
7865678656
"hasDirectParents": false,
7865778657
"hasHierarchicalChildren": false,
@@ -78681,7 +78681,7 @@
7868178681
"appearsIn": [
7868278682
"duo"
7868378683
],
78684-
"curie": "creation:date",
78684+
"curie": "creation_date",
7868578685
"hasDirectChildren": false,
7868678686
"hasDirectParents": false,
7868778687
"hasHierarchicalChildren": false,

testcases_expected_output_api/v2/ontologies/duo/properties.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7781,7 +7781,7 @@
77817781
]
77827782
},
77837783
"http://www.geneontology.org/formats/oboInOwl#created_by": {
7784-
"curie": "created:by",
7784+
"curie": "created_by",
77857785
"hasLocalDefinition": true,
77867786
"label": "created_by",
77877787
"numAppearsIn": 1.0,
@@ -11227,7 +11227,7 @@
1122711227
"appearsIn": [
1122811228
"duo"
1122911229
],
11230-
"curie": "created:by",
11230+
"curie": "created_by",
1123111231
"hasDirectChildren": false,
1123211232
"hasDirectParents": false,
1123311233
"hasHierarchicalChildren": false,
@@ -11257,7 +11257,7 @@
1125711257
"appearsIn": [
1125811258
"duo"
1125911259
],
11260-
"curie": "creation:date",
11260+
"curie": "creation_date",
1126111261
"hasDirectChildren": false,
1126211262
"hasDirectParents": false,
1126311263
"hasHierarchicalChildren": false,

0 commit comments

Comments
 (0)