Skip to content

Conversation

@shifucun
Copy link
Contributor

@shifucun shifucun commented Nov 4, 2022

Also updated test for setting API key; Some format change.

@shifucun shifucun requested review from beets and pradh November 4, 2022 20:33
Copy link
Contributor

@beets beets left a 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?


Args:
query_string (:obj:`str`): The SPARQL query string.
select (:obj:`func` accepting a row in the query result): A function that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@shifucun
Copy link
Contributor Author

shifucun commented Nov 4, 2022

cool!

should we keep the "query" modules (rather than renaming to sparql) for consistency with the REST endpoint?

Right now there is a module "query" which has a function "query". The library re-export the function in init.py:
from datacommons.query import query, which leaves "datacommons.query" ambiguous for test and import.

This is more of an internal change and users will still use "dc.query".

@shifucun shifucun requested a review from beets November 4, 2022 22:09
Copy link
Contributor

@beets beets left a 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

@shifucun shifucun merged commit c0a41d8 into datacommonsorg:master Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants