-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added collection backend #44
Conversation
Codecov ReportBase: 72.38% // Head: 74.25% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 72.38% 74.25% +1.87%
==========================================
Files 11 12 +1
Lines 659 703 +44
==========================================
+ Hits 477 522 +45
+ Misses 182 181 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up code, use regexp for parse_object. Try to avoid redefining built-ins
…ing tests. Reduced code dublication. Hopefully addressed comments by Thomas in PR #44
* Improved generality of parse_literal() and parse_object() fixing failing tests. Reduced code dublication. Hopefully addressed comments by Thomas in PR #44 * Added __hash__() and __eq__() methods to Literal and fixed some tests. * Added __hash__() and __eq__() to Namespace as well. * Added test to infer IRI from pydantic datamodel * Added a pylint disable because of yet another bug in pylint * Changed `uri` to `identity` to match soft7 datamodels * Added comment * Also handle blank nodes correctly.
Closes #41
Simple backend providing a tripper interface to DLite collections. Will be used by oteapi when DLite is chooses as interoperability platform.
This PR also include tests for utils.py - they are written as a script since they are so simple that test isolation via pytest is not needed.
Note this is a minimal implementation. Support for prefixes should be added in follow-up PRs.
Right now all triples are stored written out completely, but for the user of dlite, I guess it would be easier if the IRIs stored in the collection would be prefixed. This is a topic for a later PR, though.