Skip to content

reintroduce str as input to group_by in aggregate #843

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

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

tsmith023
Copy link
Collaborator

@tsmith023 tsmith023 commented Feb 1, 2024

This PR reintroduces using just string syntax when performing a aggregate group by query so that the happy path of usage is easier as it was previously, e.g.:

res = collection.aggregate.over_all(
    group_by="text",
    ...
)

instead of:

res = collection.aggregate.over_all(
    group_by=weaviate.classes.aggregate.GroupByAggregate(prop="text"),
    ...
)

@tsmith023 tsmith023 requested a review from dirkkul February 1, 2024 09:07
@codecov-commenter
Copy link

Codecov Report

Attention: 277 lines in your changes are missing coverage. Please review.

Comparison is base (e977081) 93.48% compared to head (657ce0a) 95.50%.
Report is 41 commits behind head on main.

Files Patch % Lines
integration/test_collection_openai.py 41.25% 84 Missing ⚠️
weaviate/collections/batch/base.py 83.87% 45 Missing ⚠️
integration/test_collection_rerank.py 32.69% 35 Missing ⚠️
integration/test_batch_v4.py 95.00% 14 Missing ⚠️
integration_v3/test_backup_v4.py 92.76% 11 Missing ⚠️
mock_tests/test_collection.py 85.71% 10 Missing ⚠️
weaviate/collections/aggregations/base.py 94.57% 9 Missing ⚠️
integration/test_collection.py 99.05% 8 Missing ⚠️
weaviate/collections/batch/batch_wrapper.py 86.20% 8 Missing ⚠️
integration/conftest.py 88.52% 7 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #843      +/-   ##
==========================================
+ Coverage   93.48%   95.50%   +2.02%     
==========================================
  Files          70      167      +97     
  Lines        8625    17089    +8464     
==========================================
+ Hits         8063    16321    +8258     
- Misses        562      768     +206     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tsmith023 tsmith023 merged commit fe7f448 into main Feb 1, 2024
@tsmith023 tsmith023 deleted the allow-str-in-agg-groupby branch February 1, 2024 09:26
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.

3 participants