From 9af05bd6a454d7fc3adf85bdc292b7688905bd77 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 25 Aug 2025 12:58:42 -0700 Subject: [PATCH 1/4] Remove Deprecated methods and extra dependencies --- neon_core/skills/service.py | 10 +------- neon_core/util/runtime_utils.py | 44 --------------------------------- setup.py | 7 ------ 3 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 neon_core/util/runtime_utils.py diff --git a/neon_core/skills/service.py b/neon_core/skills/service.py index c69a061a3..b93fe559a 100644 --- a/neon_core/skills/service.py +++ b/neon_core/skills/service.py @@ -34,7 +34,7 @@ from ovos_bus_client import Message, MessageBusClient from ovos_config.locale import set_default_lang, set_default_tz from ovos_config.config import Configuration -from ovos_utils.log import LOG, log_deprecation +from ovos_utils.log import LOG from ovos_plugin_manager.skills import get_plugin_skills, get_skill_directories from ovos_utils.process_utils import StatusCallbackMap, ProcessState from neon_utils.metrics_utils import announce_connection @@ -106,14 +106,6 @@ def __init__(self, stopping_hook=self.callbacks.on_stopping) self.skill_manager.name = "skill_manager" - @property - def status(self): - log_deprecation("This reference is deprecated. Use " - "`NeonSkillService.skill_manager.status` directly.", - "24.7.0") - return self.skill_manager.status - - def check_health(self): """ Check the health of the skills service and get an error state if the diff --git a/neon_core/util/runtime_utils.py b/neon_core/util/runtime_utils.py deleted file mode 100644 index 51f968e63..000000000 --- a/neon_core/util/runtime_utils.py +++ /dev/null @@ -1,44 +0,0 @@ -# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework -# All trademark and other rights reserved by their respective owners -# Copyright 2008-2025 Neongecko.com Inc. -# Contributors: Daniel McKnight, Guy Daniels, Elon Gasper, Richard Leeds, -# Regina Bloomstine, Casimiro Ferreira, Andrii Pernatii, Kirill Hrymailo -# BSD-3 License -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from this -# software without specific prior written permission. -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -from ovos_utils.log import deprecated - - -@deprecated("ovos.conf meta configuration is deprecated. Use envvars " - "`OVOS_CONFIG_FILENAME`, `OVOS_CONFIG_BASE_FOLDER`, and " - "`OVOS_DEFAULT_CONFIG`.", "24.11.0") -def use_neon_core(func): - """ - Wrapper to ensure call originates from neon_core for stack checks. - This is used for ovos-utils config platform detection which uses the stack - to determine which module config to return. - """ - def wrapper(*args, **kwargs): - return func(*args, **kwargs) - return wrapper - diff --git a/setup.py b/setup.py index d12ae17b8..1c12c6125 100644 --- a/setup.py +++ b/setup.py @@ -88,13 +88,6 @@ def get_requirements(requirements_filename: str): "test": get_requirements("test.txt"), "pi": get_requirements("pi.txt"), "docker": get_requirements("docker.txt"), - # # TODO: Deprecate `_`-specified extras after 2024.5 - "core_modules": get_requirements("core_modules.txt"), - "skills_required": get_requirements("skills_required.txt"), - "skills_essential": get_requirements("skills_essential.txt"), - "skills_default": get_requirements("skills_default.txt"), - "skills_extended": get_requirements("skills_extended.txt"), - # PEP503 specified normalization to `-` "core-modules": get_requirements("core_modules.txt"), "skills-required": get_requirements("skills_required.txt"), "skills-essential": get_requirements("skills_essential.txt"), From c637b330b070beedeba2e32ee3913a1b3d3a58b8 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 25 Aug 2025 13:01:10 -0700 Subject: [PATCH 2/4] Update references to extra dependencies with "_" instead of "-" --- .github/workflows/setup_tests.yml | 4 ++-- .github/workflows/unit_tests.yml | 2 +- test/pi_setup_3_10.sh | 4 ++-- test/pi_setup_3_11.sh | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/setup_tests.yml b/.github/workflows/setup_tests.yml index 760760c92..21569fbb2 100644 --- a/.github/workflows/setup_tests.yml +++ b/.github/workflows/setup_tests.yml @@ -27,10 +27,10 @@ jobs: pip install wheel - name: Test Core Module Installation run: | - pip install .[core_modules] + pip install .[core-modules] - name: Test Skills Installation run: | - pip install .[skills_required,skills_essential,skills_default,skills_extended] + pip install .[skills-required,skills-essential,skills-default,skills-extended] pi_image_3_10: runs-on: ubuntu-latest timeout-minutes: 90 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index fa6c7fff4..086e5f0d8 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -32,7 +32,7 @@ jobs: sudo apt update sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev pip install wheel - pip install . -r requirements/test.txt + pip install .[test] env: GITHUB_TOKEN: ${{secrets.neon_token}} diff --git a/test/pi_setup_3_10.sh b/test/pi_setup_3_10.sh index 8d754538a..86cdc6e61 100644 --- a/test/pi_setup_3_10.sh +++ b/test/pi_setup_3_10.sh @@ -44,6 +44,6 @@ python3.10 -m venv "/core/venv" || exit 11 . /core/venv/bin/activate pip install --upgrade pip wheel -pip install ".[core_modules,skills_required,skills_essential,skills_default,skills_extended,pi]" || exit 11 +pip install ".[core-modules,skills-required,skills-essential,skills-default,skills-extended,pi]" || exit 11 -cp -rf /core/test/pi_image_overlay/* / \ No newline at end of file +cp -rf /core/test/pi_image_overlay/* / diff --git a/test/pi_setup_3_11.sh b/test/pi_setup_3_11.sh index bc03f7040..6e25b49da 100644 --- a/test/pi_setup_3_11.sh +++ b/test/pi_setup_3_11.sh @@ -46,6 +46,6 @@ python3.11 -m venv "/core/venv" || exit 11 pip install --upgrade pip wheel pip install https://github.com/smartgic/python-tflite-runtime/releases/download/2.13.0-cp311/tflite_runtime-2.13.0-cp311-cp311-linux_aarch64.whl #pip install https://whl.smartgic.io/tflite_runtime-2.13.0-cp311-cp311-linux_aarch64.whl -pip install ".[core_modules,skills_required,skills_essential,skills_default,skills_extended,pi]" || exit 11 +pip install ".[core-modules,skills-required,skills-essential,skills-default,skills-extended,pi]" || exit 11 -cp -rf /core/test/pi_image_overlay/* / \ No newline at end of file +cp -rf /core/test/pi_image_overlay/* / From b278f1d1636755e5cd764db70f7d65eaa136e681 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 25 Aug 2025 13:22:49 -0700 Subject: [PATCH 3/4] Remove deprecated reference in unit test --- test/test_skills_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_skills_module.py b/test/test_skills_module.py index ff20c68eb..3b97d517d 100644 --- a/test/test_skills_module.py +++ b/test/test_skills_module.py @@ -367,12 +367,12 @@ class TestSkillManager(unittest.TestCase): @classmethod def setUpClass(cls) -> None: - from neon_core.util.runtime_utils import use_neon_core - from neon_utils.configuration_utils import init_config_dir + #from neon_core.util.runtime_utils import use_neon_core + #from neon_utils.configuration_utils import init_config_dir os.environ["XDG_CONFIG_HOME"] = cls.config_dir os.environ["OVOS_CONFIG_BASE_FOLDER"] = "neon" os.environ["OVOS_CONFIG_FILENAME"] = "neon.yaml" - use_neon_core(init_config_dir)() + #use_neon_core(init_config_dir)() @classmethod def tearDownClass(cls) -> None: From b270c550f66e728a90ae88165fbee2859430a990 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 25 Aug 2025 13:33:36 -0700 Subject: [PATCH 4/4] Skip tests of deprecated configuration patching --- test/test_configuration.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test_configuration.py b/test/test_configuration.py index 6ef7d9f34..8f8d17e8b 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -69,10 +69,10 @@ def tearDownClass(cls) -> None: # os.environ.pop("OVOS_CONFIG_BASE_FOLDER") # os.environ.pop("OVOS_CONFIG_FILENAME") + @unittest.skip("mycroft.configuration is deprecated") def test_neon_core_config_init(self): from neon_core.configuration import Configuration from mycroft.configuration import Configuration as MycroftConfig - # TODO: Replace test after ovos_utils YML config compat. from neon_core.util.runtime_utils import use_neon_core configuration = Configuration() @@ -84,10 +84,8 @@ def test_neon_core_config_init(self): from ovos_config.config import read_mycroft_config self.assertEqual(configuration, use_neon_core(read_mycroft_config)()) + @unittest.skip("mycroft.configuration is deprecated") def test_patch_config(self): - from os.path import join - import json - test_config_dir = os.path.join(os.path.dirname(__file__), "config") os.makedirs(test_config_dir, exist_ok=True) os.environ["XDG_CONFIG_HOME"] = test_config_dir