-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for both new and old instance formats (#730)
# Description Test that new and old instance formats are equivalent. To support the test, also added a convenient `props` property to metadata as well as equality comparition to properties and dimensions. Closes #702 ## Type of change - [x] Bug fix & code cleanup - [ ] New feature - [ ] Documentation update - [x] 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
4 changed files
with
78 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"uri": "http://onto-ns.com/meta/0.1/PersonNew", | ||
"description": "A person.", | ||
"dimensions": { | ||
"N": "Number of skills." | ||
}, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Full name." | ||
}, | ||
"age": { | ||
"type": "float", | ||
"unit": "years", | ||
"description": "Age of person." | ||
}, | ||
"skills": { | ||
"type": "string", | ||
"shape": ["N"], | ||
"description": "List of skills." | ||
} | ||
} | ||
} |
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,31 @@ | ||
{ | ||
"name": "PersonOld", | ||
"version": "0.1", | ||
"namespace": "http://onto-ns.com/meta", | ||
"description": "A person.", | ||
"dimensions": [ | ||
{ | ||
"name": "N", | ||
"description": "Number of skills." | ||
} | ||
], | ||
"properties": [ | ||
{ | ||
"name": "name", | ||
"type": "string", | ||
"description": "Full name." | ||
}, | ||
{ | ||
"name": "age", | ||
"type": "float", | ||
"unit": "years", | ||
"description": "Age of person." | ||
}, | ||
{ | ||
"name": "skills", | ||
"type": "string", | ||
"dims": ["N"], | ||
"description": "List of skills." | ||
} | ||
] | ||
} |
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