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

Additional props for grpc #326

Merged
merged 2 commits into from
May 12, 2023
Merged

Additional props for grpc #326

merged 2 commits into from
May 12, 2023

Conversation

dirkkul
Copy link
Collaborator

@dirkkul dirkkul commented May 12, 2023

Adds:

  • a dataclass for additional properties
  • support for grpc with that dataclass, strings are not supported

The results for grpc and graphql should be identical

Usage:

query = client.query.get("Test").with_additional(
            weaviate.AdditionalProperties(
                uuid=True,
                vector=True,
                creationTimeUnix=True,
                lastUpdateTimeUnix=True,
                distance=True,
            )
        )

@dirkkul dirkkul requested a review from a team as a code owner May 12, 2023 13:45
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 87.73% and project coverage change: -0.24 ⚠️

Comparison is base (df41164) 95.99% compared to head (eea1ddd) 95.75%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #326      +/-   ##
==========================================
- Coverage   95.99%   95.75%   -0.24%     
==========================================
  Files          64       64              
  Lines        7544     7759     +215     
==========================================
+ Hits         7242     7430     +188     
- Misses        302      329      +27     
Impacted Files Coverage Δ
weaviate_grpc/weaviate_pb2.py 26.82% <3.57%> (-13.92%) ⬇️
weaviate/exceptions.py 91.42% <60.00%> (-5.35%) ⬇️
weaviate/auth.py 92.50% <80.00%> (-7.50%) ⬇️
weaviate/backup/backup.py 98.14% <83.33%> (-1.86%) ⬇️
weaviate/gql/get.py 97.17% <92.04%> (-1.57%) ⬇️
weaviate/connect/authentication.py 96.00% <94.44%> (+0.47%) ⬆️
weaviate/client.py 98.66% <96.00%> (+0.11%) ⬆️
weaviate/util.py 95.83% <96.15%> (-0.08%) ⬇️
integration/test_grcp.py 98.27% <96.77%> (+0.97%) ⬆️
integration/test_cluster.py 100.00% <100.00%> (ø)
... and 12 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dirkkul dirkkul merged commit 5d37a63 into main May 12, 2023
@dirkkul dirkkul deleted the additional_props branch May 12, 2023 14:11
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