Skip to content

Commit

Permalink
API-TEST: Update Curie Formation Logic (#755)
Browse files Browse the repository at this point in the history
* - Update curie formation logic

* - Improve code logic

* - Improve code logic to handle edge cases

* - Update testcases

* - Update API testcase
  • Loading branch information
haideriqbal authored Oct 17, 2024
1 parent f4724f8 commit b76f351
Show file tree
Hide file tree
Showing 31 changed files with 4,293 additions and 4,296 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,10 @@ public boolean diff() throws FileNotFoundException {
continue;
}

if(jsonA.equals(jsonB)) {
System.out.println(inputDir + filename + " was equal to " + expectedDir + filename);
} else {
if(!jsonA.equals(jsonB)) {
System.out.println(inputDir + filename + " differed from " + expectedDir + filename);
success = false;
}

}

return success;
Expand Down
20 changes: 10 additions & 10 deletions testcases_expected_output_api/v2/ontologies.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"language": "en",
"linkedEntities": {
"http://exmpl.org/xmpl/Preferred_name": {
"curie": "XMPL:Preferred_name",
"curie": "XMPL_Preferred_name",
"definedBy": [
"xmpl"
],
Expand All @@ -181,7 +181,7 @@
]
},
"http://exmpl.org/xmpl/Synonym": {
"curie": "XMPL:Synonym",
"curie": "XMPL_Synonym",
"definedBy": [
"xmpl"
],
Expand Down Expand Up @@ -241,7 +241,7 @@
"language": "en",
"linkedEntities": {
"http://www.w3.org/2000/01/rdf-schema#comment": {
"curie": "RDFS:comment",
"curie": "RDFS_comment",
"definedBy": [
"rdfs"
],
Expand All @@ -254,7 +254,7 @@
]
},
"http://www.w3.org/2000/01/rdf-schema#label": {
"curie": "RDFS:label",
"curie": "RDFS_label",
"definedBy": [
"rdfs"
],
Expand Down Expand Up @@ -300,7 +300,7 @@
"language": "en",
"linkedEntities": {
"http://www.w3.org/2000/01/rdf-schema#seeAlso": {
"curie": "RDFS:seeAlso",
"curie": "RDFS_seeAlso",
"definedBy": [
"rdfs"
],
Expand Down Expand Up @@ -359,7 +359,7 @@
"language": "en",
"linkedEntities": {
"http://www.w3.org/2000/01/rdf-schema#comment": {
"curie": "RDFS:comment",
"curie": "RDFS_comment",
"definedBy": [
"rdfs"
],
Expand All @@ -372,7 +372,7 @@
]
},
"http://www.w3.org/2000/01/rdf-schema#isDefinedBy": {
"curie": "RDFS:isDefinedBy",
"curie": "RDFS_isDefinedBy",
"definedBy": [
"rdfs"
],
Expand All @@ -385,7 +385,7 @@
]
},
"http://www.w3.org/2000/01/rdf-schema#seeAlso": {
"curie": "RDFS:seeAlso",
"curie": "RDFS_seeAlso",
"definedBy": [
"rdfs"
],
Expand Down Expand Up @@ -452,7 +452,7 @@
]
},
"http://www.w3.org/2000/01/rdf-schema#seeAlso": {
"curie": "RDFS:seeAlso",
"curie": "RDFS_seeAlso",
"definedBy": [
"rdfs"
],
Expand Down Expand Up @@ -604,7 +604,7 @@
]
},
"http://purl.obolibrary.org/obo/ms#part_of": {
"curie": "part:of",
"curie": "part_of",
"hasLocalDefinition": true,
"label": "part_of",
"numAppearsIn": 1.0,
Expand Down
22 changes: 11 additions & 11 deletions testcases_expected_output_api/v2/ontologies/duo/classes.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000008",
"curie": "APOLLO_SV:00000008",
"definition": "A planned process that has specified output a software product and that involves the creation of source code.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -214,7 +214,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000032",
"curie": "APOLLO_SV:00000032",
"definition": "A measurement datum that is the output of counting.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -266,7 +266,7 @@
"label": "count",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000033": {
"curie": "APOLLO:SV_00000033",
"curie": "APOLLO_SV:00000033",
"hasLocalDefinition": true,
"label": "counting",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -410,7 +410,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000033",
"curie": "APOLLO_SV:00000033",
"definition": "The planned process of finding the number of elements in a finite set of objects.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -464,7 +464,7 @@
"url": "http://en.wikipedia.org/wiki/Counting"
},
"http://purl.obolibrary.org/obo/APOLLO_SV_00000032": {
"curie": "APOLLO:SV_00000032",
"curie": "APOLLO_SV:00000032",
"hasLocalDefinition": true,
"label": "count",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -599,7 +599,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000522",
"curie": "APOLLO_SV:00000522",
"definition": [
"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.",
"Refers to the stuff that lives on GitHub, not to GitHub or the git software on which it is based"
Expand Down Expand Up @@ -867,7 +867,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000524",
"curie": "APOLLO_SV:00000524",
"definition": [
"A planned process that converts human-written or curated software into a machine-executable or interpretable set of instructions.",
"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.).",
Expand Down Expand Up @@ -941,7 +941,7 @@
"label": "compiling software",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000008": {
"curie": "APOLLO:SV_00000008",
"curie": "APOLLO_SV:00000008",
"hasLocalDefinition": true,
"label": "software development",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -1109,7 +1109,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000796",
"curie": "APOLLO_SV:00000796",
"definition": "A planned process that has a data set as its specified output.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -20289,7 +20289,7 @@
"label": "data item",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
"curie": "APOLLO:SV_00000522",
"curie": "APOLLO_SV:00000522",
"hasLocalDefinition": true,
"label": "source code repository",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -24297,7 +24297,7 @@
"label": "source code module",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
"curie": "APOLLO:SV_00000522",
"curie": "APOLLO_SV:00000522",
"hasLocalDefinition": true,
"label": "source code repository",
"numAppearsIn": 1.0,
Expand Down
28 changes: 14 additions & 14 deletions testcases_expected_output_api/v2/ontologies/duo/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000008",
"curie": "APOLLO_SV:00000008",
"definition": "A planned process that has specified output a software product and that involves the creation of source code.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -214,7 +214,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000032",
"curie": "APOLLO_SV:00000032",
"definition": "A measurement datum that is the output of counting.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -266,7 +266,7 @@
"label": "count",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000033": {
"curie": "APOLLO:SV_00000033",
"curie": "APOLLO_SV:00000033",
"hasLocalDefinition": true,
"label": "counting",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -410,7 +410,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000033",
"curie": "APOLLO_SV:00000033",
"definition": "The planned process of finding the number of elements in a finite set of objects.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -464,7 +464,7 @@
"url": "http://en.wikipedia.org/wiki/Counting"
},
"http://purl.obolibrary.org/obo/APOLLO_SV_00000032": {
"curie": "APOLLO:SV_00000032",
"curie": "APOLLO_SV:00000032",
"hasLocalDefinition": true,
"label": "count",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -599,7 +599,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000522",
"curie": "APOLLO_SV:00000522",
"definition": [
"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.",
"Refers to the stuff that lives on GitHub, not to GitHub or the git software on which it is based"
Expand Down Expand Up @@ -867,7 +867,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000524",
"curie": "APOLLO_SV:00000524",
"definition": [
"A planned process that converts human-written or curated software into a machine-executable or interpretable set of instructions.",
"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.).",
Expand Down Expand Up @@ -941,7 +941,7 @@
"label": "compiling software",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000008": {
"curie": "APOLLO:SV_00000008",
"curie": "APOLLO_SV:00000008",
"hasLocalDefinition": true,
"label": "software development",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -1109,7 +1109,7 @@
"appearsIn": [
"duo"
],
"curie": "APOLLO:SV_00000796",
"curie": "APOLLO_SV:00000796",
"definition": "A planned process that has a data set as its specified output.",
"definitionProperty": "http://purl.obolibrary.org/obo/IAO_0000115",
"directAncestor": [
Expand Down Expand Up @@ -21757,7 +21757,7 @@
"label": "data item",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
"curie": "APOLLO:SV_00000522",
"curie": "APOLLO_SV:00000522",
"hasLocalDefinition": true,
"label": "source code repository",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -25836,7 +25836,7 @@
"label": "source code module",
"linkedEntities": {
"http://purl.obolibrary.org/obo/APOLLO_SV_00000522": {
"curie": "APOLLO:SV_00000522",
"curie": "APOLLO_SV:00000522",
"hasLocalDefinition": true,
"label": "source code repository",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -73904,7 +73904,7 @@
]
},
"http://www.geneontology.org/formats/oboInOwl#created_by": {
"curie": "created:by",
"curie": "created_by",
"hasLocalDefinition": true,
"label": "created_by",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -78651,7 +78651,7 @@
"appearsIn": [
"duo"
],
"curie": "created:by",
"curie": "created_by",
"hasDirectChildren": false,
"hasDirectParents": false,
"hasHierarchicalChildren": false,
Expand Down Expand Up @@ -78681,7 +78681,7 @@
"appearsIn": [
"duo"
],
"curie": "creation:date",
"curie": "creation_date",
"hasDirectChildren": false,
"hasDirectParents": false,
"hasHierarchicalChildren": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7781,7 +7781,7 @@
]
},
"http://www.geneontology.org/formats/oboInOwl#created_by": {
"curie": "created:by",
"curie": "created_by",
"hasLocalDefinition": true,
"label": "created_by",
"numAppearsIn": 1.0,
Expand Down Expand Up @@ -11227,7 +11227,7 @@
"appearsIn": [
"duo"
],
"curie": "created:by",
"curie": "created_by",
"hasDirectChildren": false,
"hasDirectParents": false,
"hasHierarchicalChildren": false,
Expand Down Expand Up @@ -11257,7 +11257,7 @@
"appearsIn": [
"duo"
],
"curie": "creation:date",
"curie": "creation_date",
"hasDirectChildren": false,
"hasDirectParents": false,
"hasHierarchicalChildren": false,
Expand Down
Loading

0 comments on commit b76f351

Please sign in to comment.