-
Notifications
You must be signed in to change notification settings - Fork 45
Update Sparql query API to Python3 #185
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
Conversation
beets
left a comment
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.
cool!
should we keep the "query" modules (rather than renaming to sparql) for consistency with the REST endpoint?
datacommons/sparql.py
Outdated
|
|
||
| Args: | ||
| query_string (:obj:`str`): The SPARQL query string. | ||
| select (:obj:`func` accepting a row in the query result): A function that |
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.
| select (:obj:`func` accepting a row in the query result): A function that | |
| select (:obj:`func` accepting a row of the query result): A function that |
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.
Done
datacommons/sparql.py
Outdated
| query_string (:obj:`str`): The SPARQL query string. | ||
| select (:obj:`func` accepting a row in the query result): A function that | ||
| selects rows to be returned by :code:`query`. This function accepts a row | ||
| in the results of executing :code:`query_string` and return True if and |
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.
| in the results of executing :code:`query_string` and return True if and | |
| of the result of executing :code:`query_string` and returns True if and |
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.
Done
Right now there is a module "query" which has a function "query". The library re-export the function in init.py: This is more of an internal change and users will still use "dc.query". |
beets
left a comment
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.
ok makes sense. thanks bo
Also updated test for setting API key; Some format change.