Skip to content

Commit

Permalink
Subscription not providing Updates for Array Types (#27)
Browse files Browse the repository at this point in the history
* Fix Subscription not providing Updates for Array Types

closes: #26
  • Loading branch information
wba2hi authored May 8, 2024
1 parent bfa9205 commit db00030
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 66 deletions.
2 changes: 1 addition & 1 deletion kuksa-client/kuksa_client/cli_backend/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

def callback_wrapper(callback: Callable[[str], None]) -> Callable[[Iterable[EntryUpdate]], None]:
def wrapper(updates: Iterable[EntryUpdate]) -> None:
callback(json.dumps([update.to_dict() for update in updates]))
callback(json.dumps([update.to_dict() for update in updates], cls=DatabrokerEncoder))
return wrapper


Expand Down
2 changes: 1 addition & 1 deletion kuksa-client/kuksa_client/grpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def from_message(cls, message: types_pb2.Datapoint):
timestamp = message.timestamp.ToDatetime(
tzinfo=datetime.timezone.utc,
)
except OverflowError:
except ValueError:

logger.error("Timestamp %d out of accepted range, value ignored!",
message.timestamp.seconds)
Expand Down
2 changes: 1 addition & 1 deletion kuksa-client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"grpcio-tools>=1.54.2",
"grpcio-tools>=1.63.0",
"setuptools>=42",
"setuptools-git-versioning",
"wheel",
Expand Down
32 changes: 14 additions & 18 deletions kuksa-client/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,32 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --resolver=backtracking setup.cfg
# pip-compile setup.cfg
#
attrs==23.1.0
attrs==23.2.0
# via cmd2
cmd2==1.5.0
# via kuksa-client (setup.cfg)
# via kuksa_client (setup.cfg)
colorama==0.4.6
# via cmd2
decorator==5.1.1
# via jsonpath-ng
grpcio==1.56.2
grpcio==1.63.0
# via grpcio-tools
grpcio-tools==1.56.2
# via kuksa-client (setup.cfg)
jsonpath-ng==1.5.3
# via kuksa-client (setup.cfg)
grpcio-tools==1.63.0
# via kuksa_client (setup.cfg)
jsonpath-ng==1.6.1
# via kuksa_client (setup.cfg)
ply==3.11
# via jsonpath-ng
protobuf==4.23.4
protobuf==5.26.1
# via grpcio-tools
pygments==2.15.1
# via kuksa-client (setup.cfg)
pygments==2.18.0
# via kuksa_client (setup.cfg)
pyperclip==1.8.2
# via cmd2
six==1.16.0
# via jsonpath-ng
wcwidth==0.2.6
wcwidth==0.2.13
# via cmd2
websockets==11.0.3
# via kuksa-client (setup.cfg)
websockets==12.0
# via kuksa_client (setup.cfg)

# The following packages are considered to be unsafe in a requirements file:
# setuptools
2 changes: 1 addition & 1 deletion kuksa-client/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install_requires =
websockets >= 10.1
cmd2 >= 1.4, <2.0
pygments >= 2.15
grpcio-tools >= 1.54.2
grpcio-tools >= 1.63.0
jsonpath-ng >= 1.5.3
packages = find:

Expand Down
80 changes: 36 additions & 44 deletions kuksa-client/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,78 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --extra=test --output-file=test-requirements.txt --resolver=backtracking setup.cfg
# pip-compile --extra=test --output-file=test-requirements.txt setup.cfg
#
astroid==2.15.6
astroid==3.1.0
# via pylint
attrs==23.1.0
attrs==23.2.0
# via cmd2
cmd2==1.5.0
# via kuksa-client (setup.cfg)
# via kuksa_client (setup.cfg)
colorama==0.4.6
# via cmd2
coverage[toml]==7.2.7
coverage[toml]==7.5.1
# via pytest-cov
decorator==5.1.1
# via jsonpath-ng
dill==0.3.6
dill==0.3.8
# via pylint
exceptiongroup==1.1.2
exceptiongroup==1.2.1
# via pytest
grpcio==1.56.2
grpcio==1.63.0
# via grpcio-tools
grpcio-tools==1.56.2
# via kuksa-client (setup.cfg)
grpcio-tools==1.63.0
# via kuksa_client (setup.cfg)
iniconfig==2.0.0
# via pytest
isort==5.12.0
isort==5.13.2
# via pylint
jsonpath-ng==1.5.3
# via kuksa-client (setup.cfg)
lazy-object-proxy==1.9.0
# via astroid
jsonpath-ng==1.6.1
# via kuksa_client (setup.cfg)
mccabe==0.7.0
# via pylint
packaging==23.1
packaging==24.0
# via pytest
platformdirs==3.9.1
platformdirs==4.2.1
# via pylint
pluggy==1.2.0
pluggy==1.5.0
# via pytest
ply==3.11
# via jsonpath-ng
protobuf==4.23.4
protobuf==5.26.1
# via grpcio-tools
pygments==2.15.1
# via kuksa-client (setup.cfg)
pylint==2.17.4
# via kuksa-client (setup.cfg)
pygments==2.18.0
# via kuksa_client (setup.cfg)
pylint==3.1.0
# via kuksa_client (setup.cfg)
pyperclip==1.8.2
# via cmd2
pytest==7.4.0
pytest==8.2.0
# via
# kuksa-client (setup.cfg)
# kuksa_client (setup.cfg)
# pytest-asyncio
# pytest-cov
# pytest-mock
# pytest-timeout
pytest-asyncio==0.21.1
# via kuksa-client (setup.cfg)
pytest-cov==4.1.0
# via kuksa-client (setup.cfg)
pytest-mock==3.11.1
# via kuksa-client (setup.cfg)
pytest-timeout==2.1.0
# via kuksa-client (setup.cfg)
six==1.16.0
# via jsonpath-ng
pytest-asyncio==0.23.6
# via kuksa_client (setup.cfg)
pytest-cov==5.0.0
# via kuksa_client (setup.cfg)
pytest-mock==3.14.0
# via kuksa_client (setup.cfg)
pytest-timeout==2.3.1
# via kuksa_client (setup.cfg)
tomli==2.0.1
# via
# coverage
# pylint
# pytest
tomlkit==0.11.8
tomlkit==0.12.4
# via pylint
typing-extensions==4.7.1
typing-extensions==4.11.0
# via astroid
wcwidth==0.2.6
wcwidth==0.2.13
# via cmd2
websockets==11.0.3
# via kuksa-client (setup.cfg)
wrapt==1.15.0
# via astroid
websockets==12.0
# via kuksa_client (setup.cfg)

# The following packages are considered to be unsafe in a requirements file:
# setuptools

0 comments on commit db00030

Please sign in to comment.