-
Notifications
You must be signed in to change notification settings - Fork 56
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
Update TabularDataByMQL documentation #837
Conversation
src/viam/app/data_client.py
Outdated
@@ -363,7 +363,8 @@ async def tabular_data_by_mql( | |||
Args: | |||
organization_id (str): The ID of the organization that owns the data. | |||
You can obtain your organization ID from the Viam app's organization settings page. | |||
query (Union[List[bytes], List[Dict[str, Any]]]): The MQL query to run as a list of BSON queries. | |||
query (Union[List[bytes], List[Dict[str, Any]]]): "The MQL query to run, as a list of MongoDB aggregation pipeline stages. | |||
The stages can be provided either as raw BSON bytes, or as dictionaries. |
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.
I would argue that because support for bytes will be removed, we shouldn't include bytes in the comment. We know that we want users to use dictionaries, so we shouldn't encourage alternatives, even if there is a note added below.
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.
Makes sense! I tweaked the language a bit so this section is now in the note. I can also just remove that part altogether and keep the note as it was before. LMK what you prefer
src/viam/app/data_client.py
Outdated
Note: Each stage can be provided as either raw BSON bytes or as a dictionary, but support for bytes will be removed in the future, | ||
so using a dictionary is preferred. |
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.
I like this change way more!
If we're keeping bytes in the comment, then I'd prefer having dictionary as the first option so that that's what people read first. as either a dictionary or raw BSON bytes
. Otherwise, LGTM
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.
Good call! Changed :)
Context here: https://viaminc.slack.com/archives/C0307PGHR7E/p1738787849399009