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

Upgrade to proto 0.14.3 #16

Merged
merged 2 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# Setup Cottontail DB service container
services:
cottontail:
image: vitrivr/cottontaildb:0.15.0
image: vitrivr/cottontaildb:0.15.2
ports:
- 1865:1865
options: -it
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
[![Python package workflow](https://github.com/Spiess/cottontaildb-python-client/actions/workflows/python-package.yml/badge.svg)](https://github.com/Spiess/cottontaildb-python-client/actions/workflows/python-package.yml)

A Cottontail DB gRPC client for Python. Built with [Cottontail DB Proto](https://github.com/vitrivr/cottontaildb-proto)
version `0.14.0`. Comes with an interactive CLI for remote DB access.
version `0.14.3`. Comes with an interactive CLI for remote DB access.

Versions are numbered such that the first two numbers correspond with those of the compatible Cottontail DB Proto.

## Installation

Expand Down Expand Up @@ -50,15 +52,13 @@ file in the [Cottontail DB Proto](https://github.com/vitrivr/cottontaildb-proto)
The following is an approximate guide on how to do so from a terminal:

```bash
# Get the latest version of the Cottontail DB proto
wget https://github.com/vitrivr/cottontaildb-proto/raw/master/src/main/protobuf/cottontail.proto
# Get the latest version of the Cottontail DB proto (and download to cottontaildb_client directory)
wget https://github.com/vitrivr/cottontaildb-proto/raw/master/src/main/protobuf/cottontail.proto -P ./cottontaildb_client/
# Install necessary python packages
pip install grpcio grpcio-tools
# Generate the gRPC client
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. cottontail.proto
# Update the client files (where PYTHON_CLIENT_PATH is the path to this repository)
mv cottontail_pb2.py cottontail_pb2_grpc.py $PYTHON_CLIENT_PATH/cottontaildb_client/
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./cottontaildb_client/cottontail.proto
```

Finally, the line `import cottontail_pb2 as cottontail__pb2` in the file `cottontail_pb2_grpc.py` must be replaced
with `from . import cottontail_pb2 as cottontail__pb2`.
It is important that the path to the `cottontail.proto` file reflects the location of the gRPC Python files, such that
the imports can be generated correctly.
4 changes: 2 additions & 2 deletions cottontaildb_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .cottontail_pb2 import IndexType, Type, Literal
from .cottontaildb_client import CottontailDBClient, column_def, float_vector
from cottontaildb_client.cottontail_pb2 import IndexType, Type, Literal
from cottontaildb_client.cottontaildb_client import CottontailDBClient, column_def, float_vector
2 changes: 1 addition & 1 deletion cottontaildb_client/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .cottontaildb_cli import cli
from cottontaildb_client.cottontaildb_cli import cli

if __name__ == '__main__':
cli()
513 changes: 246 additions & 267 deletions cottontaildb_client/cottontail_pb2.py

Large diffs are not rendered by default.

254 changes: 127 additions & 127 deletions cottontaildb_client/cottontail_pb2_grpc.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = cottontaildb-client
version = 0.0.7
version = 0.14.0
author = Florian Spiess
author_email = florian.spiess@unibas.ch
description = A Cottontail DB gRPC client.
Expand Down