-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move test entities and input and output files to sub-directories (#731)
# Description Moved entities, input and output files to respectively sub-directories in the Python tests. Closes #689 Addresses also issue #609 While updating the tests to use the new sub-directories, a few other path-related issues were discovered and fixed: * two potential segfaults in dlite-storage.i and dlite.rdf.c if an invalid path is provided were fixed * raise DLiteParseError instead of DLiteOtherError for invalid json input * allow to hide DLiteOtherError by using DLiteUnknownError. ## Type of change - [x] Bug fix & code cleanup - [ ] New feature - [ ] Documentation update - [ ] Test update ## Checklist for the reviewer This checklist should be used as a help for the reviewer. - [ ] Is the change limited to one issue? - [ ] Does this PR close the issue? - [ ] Is the code easy to read and understand? - [ ] Do all new feature have an accompanying new test? - [ ] Has the documentation been updated as necessary?
- Loading branch information
Showing
41 changed files
with
227 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,2 @@ | ||
.gdb_history | ||
__pycache__ | ||
|
||
inst.ttl | ||
inst.yaml | ||
test.json | ||
test.yaml | ||
|
||
xxx.json | ||
xxx2.json | ||
yyy.json | ||
|
||
myentity.json | ||
persons2.json | ||
|
||
db.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ set(tests | |
test_postgresql2_read | ||
test_ref_type | ||
test_pydantic | ||
test_iri | ||
) | ||
|
||
foreach(test ${tests}) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
{ | ||
"name": "Missing version", | ||
"namespace": "http://onto-ns.com/meta", | ||
"meta": "http://onto-ns.com/meta/0.3/EntitySchema", | ||
"dimensions": {} | ||
"properties": {} | ||
"uri": "http://onto-ns.com/meta/0.1/Invalid1", | ||
"description": "An datamodel for an item with float type and invalid shape name.", | ||
"dimensions": { | ||
"nf": "Number of eigen-frequencies." | ||
}, | ||
"properties": { | ||
"name": { | ||
"type": "str", | ||
"description": "Name of the item." | ||
}, | ||
"f": { | ||
"type": "float64", | ||
"shape": ["nf_MISPELLED"], | ||
"unit": "Hz", | ||
"description": "The magic eigen-frequencies of the item." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
{ | ||
"name": "Missing namespace", | ||
"version": "0.0.1", | ||
"meta": "http://onto-ns.com/meta/0.3/EntitySchema", | ||
"dimensions": {} | ||
"properties": {} | ||
"uri": "http://onto-ns.com/meta/0.1/Invalid2", | ||
"description": "A datamodel with ref-types with invalid shape name...", | ||
"dimensions": { | ||
"nrefs": "Number of references to Ref datamodels." | ||
}, | ||
"properties": { | ||
"items": { | ||
"type": "ref", | ||
"$ref": "http://onto-ns.com/meta/0.1/Item", | ||
"shape": ["INVALID_nrefs"], | ||
"description": "List of Item datamodels." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
{ | ||
"url": "http://onto-ns.com/meta/0.1/Invalid3", | ||
"description": "Missing properties", | ||
"dimensions": {} | ||
"uri": "http://onto-ns.com/meta/0.1/Invalid3", | ||
"description": "Invalid JSON (square bracket for dimensions instead of braces).", | ||
"dimensions": [ | ||
"nfrequencies": "Number of eigen-frequencies." | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "str", | ||
"description": "Name of the item." | ||
}, | ||
"f": { | ||
"type": "float64", | ||
"shape": ["nf"], | ||
"unit": "Hz", | ||
"description": "The magic eigen-frequencies of the item." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "Missing version", | ||
"namespace": "http://onto-ns.com/meta", | ||
"meta": "http://onto-ns.com/meta/0.3/EntitySchema", | ||
"dimensions": {} | ||
"properties": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "Missing namespace", | ||
"version": "0.0.1", | ||
"meta": "http://onto-ns.com/meta/0.3/EntitySchema", | ||
"dimensions": {} | ||
"properties": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"url": "http://onto-ns.com/meta/0.1/Invalid7", | ||
"description": "Missing properties", | ||
"dimensions": {} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,23 @@ | ||
{ | ||
"name": "Person", | ||
"version": "0.1", | ||
"namespace": "http://onto-ns.com/meta", | ||
"meta": "http://onto-ns.com/meta/0.3/EntitySchema", | ||
"uri": "http://onto-ns.com/meta/0.1/Person", | ||
"description": "A person.", | ||
"dimensions": [ | ||
{ | ||
"name": "N", | ||
"description": "Number of skills." | ||
} | ||
], | ||
"properties": [ | ||
{ | ||
"name": "name", | ||
"dimensions": { | ||
"N": "Number of skills." | ||
}, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Full name." | ||
}, | ||
{ | ||
"name": "age", | ||
"age": { | ||
"type": "float", | ||
"unit": "years", | ||
"description": "Age of person." | ||
}, | ||
{ | ||
"name": "skills", | ||
"skills": { | ||
"type": "string", | ||
"dims": [ | ||
"N" | ||
], | ||
"shape": ["N"], | ||
"description": "List of skills." | ||
} | ||
] | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
*.json | ||
*.yaml | ||
*.ttl | ||
db.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.