-
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
New TableDoc class providing a table interface for data documentation #273
base: master
Are you sure you want to change the base?
Conversation
- Allow to add other types of entries to the triplestore that are not datasets. Ex: samples, models, instruments, people, projects... - Renamed list_data_iris() to search_iris(). It can now be use to search for all types of entries. - Renamed prepare() to as_jsonld() and made it part of the public API
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #273 +/- ##
==========================================
+ Coverage 78.21% 78.46% +0.25%
==========================================
Files 20 21 +1
Lines 2153 2206 +53
==========================================
+ Hits 1684 1731 +47
- Misses 469 475 +6 ☔ View full report in Codecov by Sentry. |
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.
Suggested some small documentation changes.
This PR adds a TableDoc class and addnested function with tests.
One issue is that we cannot add multiple of the same nested data (two distribution.downloadURL for instance). Can you add a warning for this in addnested?
Something like if d = {"a" : {"b" : 1}}, then a warning/error is issued
d = {"a" : {"b" : 1}}
addnested(d, "a.b", 2)
### WARNING/ERROR, a.b already exists.
@@ -104,7 +104,8 @@ max-public-methods = 25 | |||
max-locals = 20 | |||
disable = [ | |||
"fixme", | |||
"too-many-positional-arguments", | |||
"invalid-name", | |||
#"too-many-positional-arguments", |
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.
#"too-many-positional-arguments", |
@@ -0,0 +1,81 @@ | |||
"""Test the dataset module.""" |
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.
"""Test the dataset module.""" | |
"""Test the TableDoc class.""" |
# context={ | ||
# "ds": "http:/example.com/datasets#", | ||
# }, |
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.
# context={ | |
# "ds": "http:/example.com/datasets#", | |
# }, |
|
||
def asdicts(self) -> "List[dict]": | ||
"""Return the table as a list of dicts.""" | ||
kw = {"_context": self.context} if self.context else {} |
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.
Should this be @context?
kw = {"_context": self.context} if self.context else {} | |
kw = {"@context": self.context} if self.context else {} |
Description
Added the TableDoc class providing a table interface for data documentation.
This PR builds on top of PR #272. Merge that one first.
Type of change
Checklist for the reviewer
This checklist should be used as a help for the reviewer.