Skip to content
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

Merged
merged 3 commits into from
Feb 6, 2025
Merged

Update TabularDataByMQL documentation #837

merged 3 commits into from
Feb 6, 2025

Conversation

dmhilly
Copy link
Member

@dmhilly dmhilly commented Feb 5, 2025

@dmhilly dmhilly requested a review from a team as a code owner February 5, 2025 21:32
@@ -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.
Copy link
Member

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.

Copy link
Member Author

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

Comment on lines 367 to 368
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.
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call! Changed :)

@dmhilly dmhilly merged commit 9be6cb2 into main Feb 6, 2025
12 checks passed
@dmhilly dmhilly deleted the devin-h-test-branch branch February 6, 2025 22:05
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