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

Fix batch objects where filter #443

Merged
merged 6 commits into from
Aug 24, 2023
Merged

Conversation

tsmith023
Copy link
Contributor

@tsmith023 tsmith023 commented Aug 24, 2023

This PR fixes a problem induced by the differing expected WhereFilter objects for the Batch delete objects REST endpoint, the filtering options on the Get GraphQL query, and the centralising Python-defined WhereFilter options.

Fundamentally, the GraphQL endpoint expects all keys as value<> determining the type based on the argument itself. The REST endpoint, however, expects the keys as value<>Array if they are lists. Finally, the Pythonic definition of these types is value<>List so conversion must be performed in each case to ensure validity of the user's request.

It also updates the Weaviate CI version to the latest PATCH.

@tsmith023 tsmith023 requested a review from dirkkul August 24, 2023 12:19
@tsmith023 tsmith023 requested a review from a team as a code owner August 24, 2023 12:19
@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2023

Codecov Report

Patch coverage: 91.63% and project coverage change: -0.92% ⚠️

Comparison is base (eb3bf16) 95.43% compared to head (78d329c) 94.51%.
Report is 88 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #443      +/-   ##
==========================================
- Coverage   95.43%   94.51%   -0.92%     
==========================================
  Files          64       63       -1     
  Lines        8165     8097      -68     
==========================================
- Hits         7792     7653     -139     
- Misses        373      444      +71     
Files Changed Coverage Δ
weaviate/util.py 91.02% <37.50%> (-5.31%) ⬇️
weaviate/batch/crud_batch.py 77.44% <69.51%> (-17.88%) ⬇️
weaviate/connect/connection.py 89.21% <78.57%> (+0.27%) ⬆️
weaviate/gql/aggregate.py 82.97% <85.45%> (+7.11%) ⬆️
weaviate/schema/crud_schema.py 78.66% <86.36%> (+0.51%) ⬆️
weaviate/gql/filter.py 93.53% <91.00%> (-0.82%) ⬇️
integration/test_schema.py 97.75% <93.54%> (-2.25%) ⬇️
integration/test_batch.py 98.41% <100.00%> (+0.37%) ⬆️
integration/test_cluster.py 100.00% <100.00%> (ø)
integration/test_graphql.py 94.08% <100.00%> (+0.44%) ⬆️
... and 10 more

... and 3 files with indirect coverage changes

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

integration/test_batch.py Outdated Show resolved Hide resolved
@tsmith023 tsmith023 merged commit 9c00952 into main Aug 24, 2023
19 checks passed
@tsmith023 tsmith023 deleted the fix-batch-objects-where-filter branch August 24, 2023 16:49
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