From dcd2450e1e566455ef5af23b47633670200c6ced Mon Sep 17 00:00:00 2001 From: kgrim Date: Tue, 3 Dec 2024 23:01:37 +0100 Subject: [PATCH 1/6] - Added async consumers support - Dropped support for Python 3.7 - Updated requirements --- chatbot_core/v2/__init__.py | 4 +++- requirements/requirements.txt | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/chatbot_core/v2/__init__.py b/chatbot_core/v2/__init__.py index 9d658b7..9a7ca53 100644 --- a/chatbot_core/v2/__init__.py +++ b/chatbot_core/v2/__init__.py @@ -1,6 +1,6 @@ # NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System # -# Copyright 2008-2021 Neongecko.com Inc. | All Rights Reserved +# Copyright 2008-2024 Neongecko.com Inc. | All Rights Reserved # # Notice of License - Duplicating this Notice of License near the start of any file containing # a derivative of this software is a condition of license for this software. @@ -32,6 +32,8 @@ class ChatBot(KlatAPIMQ, ChatBotABC): """MQ-based chatbot implementation""" + async_consumers_enabled = True + def __init__(self, *args, **kwargs): config, service_name, vhost, bot_type = self.parse_init(*args, **kwargs) mq_config = config.get("MQ") or config diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 8a78651..cdd4559 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,6 +1,6 @@ +click~=8.0 +klat-connector==0.6.2a15 +neon-mq-connector==0.7.2a5 +neon_utils[network]~=1.0 ovos-bus-client~=0.0.5 -klat-connector>=0.6.2a15 psutil~=5.7 -neon_utils[network]~=1.0 -neon-mq-connector~=0.7,>=0.7.1 -click~=8.0 \ No newline at end of file From 037f529ce0a99ba97419e7d20c11afd710757120 Mon Sep 17 00:00:00 2001 From: kgrim Date: Tue, 3 Dec 2024 23:09:19 +0100 Subject: [PATCH 2/6] bumped gh actions to the latest supported versions --- .github/workflows/unit_tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 26ef8a4..bcc019b 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -30,7 +30,7 @@ jobs: pip install pytest pytest-timeout pytest-cov pytest tests/units --doctest-modules --junitxml=tests/unit-test-results.xml - name: Upload pytest unit test results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: unit-test-results path: tests/unit-test-results.xml @@ -43,9 +43,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -59,7 +59,7 @@ jobs: pip install pytest pytest-timeout pytest-cov pytest tests/integration --doctest-modules --junitxml=tests/integration-test-results.xml - name: Upload integration test results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: integration-test-results path: tests/integration-test-results.xml \ No newline at end of file From 810d23f008d9465c6a5bcfac328e66625c752eb3 Mon Sep 17 00:00:00 2001 From: kgrim Date: Tue, 3 Dec 2024 23:12:11 +0100 Subject: [PATCH 3/6] removed support for python 3.7 --- .github/workflows/unit_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index bcc019b..d023cc1 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -9,7 +9,7 @@ jobs: unit_tests: strategy: matrix: - python-version: [ 3.7, 3.8, 3.9] + python-version: [ 3.8, 3.9] # TODO: 3.10 and 3.11 need support in klat-connector runs-on: ubuntu-latest timeout-minutes: 15 @@ -37,7 +37,7 @@ jobs: integration_tests: strategy: matrix: - python-version: [ 3.7, 3.8, 3.9 ] + python-version: [ 3.8, 3.9 ] # TODO: 3.10 and 3.11 need support in klat-connector max-parallel: 1 runs-on: ubuntu-latest From 99d27edc2a26f5636e7f52ebeed60d5bf44f2d74 Mon Sep 17 00:00:00 2001 From: kgrim Date: Tue, 3 Dec 2024 23:17:31 +0100 Subject: [PATCH 4/6] added pre-fetching punkt dependency in nltk --- .github/workflows/unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index d023cc1..97c5225 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -23,6 +23,7 @@ jobs: run: | python -m pip install --upgrade pip pip install .[lang] -r requirements/test_requirements.txt + python -m nltk.downloader punkt env: GITHUB_TOKEN: ${{secrets.neon_token}} - name: Test with pytest From bd38c97ea604e151eb1d34354eddcc0d2cccd96c Mon Sep 17 00:00:00 2001 From: kgrim Date: Tue, 3 Dec 2024 23:19:25 +0100 Subject: [PATCH 5/6] added pre-fetching punkt_tab dependency in nltk --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 97c5225..6b9e1df 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -23,7 +23,7 @@ jobs: run: | python -m pip install --upgrade pip pip install .[lang] -r requirements/test_requirements.txt - python -m nltk.downloader punkt + python -m nltk.downloader punkt_tab env: GITHUB_TOKEN: ${{secrets.neon_token}} - name: Test with pytest From 8b6b828b7febb79772075ec279789f4e2ec61352 Mon Sep 17 00:00:00 2001 From: kgrim Date: Tue, 3 Dec 2024 23:21:42 +0100 Subject: [PATCH 6/6] Small fix to conflicting artifact upload --- .github/workflows/unit_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 6b9e1df..0e5c6c0 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -33,7 +33,7 @@ jobs: - name: Upload pytest unit test results uses: actions/upload-artifact@v4 with: - name: unit-test-results + name: unit-test-results-${{ matrix.python-version }} path: tests/unit-test-results.xml integration_tests: strategy: @@ -62,5 +62,5 @@ jobs: - name: Upload integration test results uses: actions/upload-artifact@v4 with: - name: integration-test-results + name: integration-test-results-${{ matrix.python-version }} path: tests/integration-test-results.xml \ No newline at end of file