Skip to content
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/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.9
python-version: "3.10"
- name: Install dependencies
id: coverage-installer
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.9
python-version: "3.10"
- name: Setup requirements and run sphinx
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
uses: wagoid/commitlint-github-action@v4
with:
configFile: .commitlintrc.yml
- name: Install Python 3.9
- name: Install Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.9
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
20 changes: 15 additions & 5 deletions dgp/contribs/pd/metadata_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions dgp/contribs/pd/metadata_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import warnings

import grpc

GRPC_GENERATED_VERSION = '1.78.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ ' but the generated code in dgp/contribs/pd/metadata_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
4 changes: 2 additions & 2 deletions dgp/utils/protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def save_pbobject_as_json(pb_object, save_path):
assert save_path.endswith(".json"), 'File extension for {} needs to be json.'.format(save_path)
with open(save_path, "w", encoding='UTF-8') as _f:
json.dump(
MessageToDict(pb_object, including_default_value_fields=True, preserving_proto_field_name=True),
MessageToDict(pb_object, always_print_fields_with_no_presence=True, preserving_proto_field_name=True),
_f,
indent=2,
sort_keys=True
Expand Down Expand Up @@ -209,7 +209,7 @@ def generate_uid_from_pbobject(pb_object):
Hexdigest of annotation content
"""
json_string = json.dumps(
MessageToDict(pb_object, including_default_value_fields=True, preserving_proto_field_name=True),
MessageToDict(pb_object, always_print_fields_with_no_presence=True, preserving_proto_field_name=True),
indent=2,
sort_keys=True
)
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
requirements_dev = f.read().splitlines()

install_requires = requirements + [
"protobuf>=4.0.0,<5.0.0",
"protobuf>=6.30.1",
]
setup_requires = [
"protobuf>=4.0.0,<5.0.0",
"grpcio==1.62.2", # for the latest protobuf 4.X.X support.
"grpcio-tools==1.62.2", # for the latest protobuf 4.X.X support.
"protobuf>=6.30.1",
"grpcio>=1.70.0",
"grpcio-tools>=1.70.0",
]


Expand Down Expand Up @@ -90,7 +90,7 @@ def run(self):
"dev": requirements_dev,
},
zip_safe=False,
python_requires=">=3.8",
python_requires=">=3.10",
cmdclass={
"build_py": _CustomBuildPyCommand,
"install": _CustomInstallCommand,
Expand Down
Binary file modified tests/data/dgp/vis_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading