Skip to content

Commit

Permalink
Update Python version and dependencies (#65)
Browse files Browse the repository at this point in the history
# Description
Updates Dockerfile to use Python3.10
Updates ovos-bus-client dependency to allow 0.1+
Adds missing ovos-config dependency which was previously just inherited
from other dependencies

# Issues
Closes #62
Needs NeonGeckoCom/neon_mq_connector#110 to
resolve test cleanup errors

# Other Notes
<!-- Note any breaking changes, WIP changes, requests for input, etc.
here -->
  • Loading branch information
NeonDaniel authored Jan 14, 2025
1 parent be7e833 commit 34d7e4a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
py_build_tests:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
unit_tests:
timeout-minutes: 5
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim
FROM python:3.10-slim

# Label for vendor
LABEL vendor=neon.ai \
Expand Down
7 changes: 4 additions & 3 deletions neon_iris/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from pika.exceptions import StreamLostError
from neon_utils.configuration_utils import get_neon_user_config
from neon_utils.metrics_utils import Stopwatch
from neon_utils.mq_utils import NeonMQHandler
from neon_mq_connector.utils.client_utils import NeonMQHandler
from neon_utils.socket_utils import b64_to_dict
from neon_utils.file_utils import decode_base64_string_to_file, \
encode_file_to_base64_string
Expand Down Expand Up @@ -129,7 +129,7 @@ def shutdown(self):
Cleanly shuts down the MQ connection associated with this client
"""
try:
self._connection.stop()
self._connection.shutdown()
except Exception as e:
LOG.error(e)
try:
Expand All @@ -142,6 +142,7 @@ def shutdown(self):
except Exception as x:
LOG.exception(x)
LOG.error("Consumers not shutdown")
raise e

def handle_neon_response(self, channel, method, _, body):
"""
Expand Down Expand Up @@ -389,7 +390,7 @@ def _init_mq_connection(self):
"neon_chat_api_error",
self.handle_neon_error,
auto_ack=False)
mq_connection.run(daemon=True)
mq_connection.run(daemonize_consumers=True)
return mq_connection


Expand Down
7 changes: 4 additions & 3 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
click~=8.0
click-default-group~=1.2
neon-utils~=1.0
neon-utils~=1.0,>=1.11.1a7
pyyaml>=5.4,<7.0.0
neon-mq-connector~=0.7,>=0.7.1
ovos-bus-client~=0.0.3
neon-mq-connector~=0.7,>=0.7.2a11
ovos-bus-client~=0.0,>=0.0.3,<0.2.0
ovos-config~=0.1,<0.2.0
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import sys
import unittest

from neon_utils.mq_utils import NeonMQHandler
from neon_mq_connector.utils.client_utils import NeonMQHandler

sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from neon_iris.client import NeonAIClient
Expand Down

0 comments on commit 34d7e4a

Please sign in to comment.