From 16cdee3c9a44763001f8d58ecaf9fa1113bc9311 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 3 Sep 2025 10:54:57 -0700 Subject: [PATCH 1/5] Refactor to use pip installation function from neon-utils --- neon_core/util/skill_utils.py | 15 +++++---------- requirements/requirements.txt | 3 ++- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/neon_core/util/skill_utils.py b/neon_core/util/skill_utils.py index fc8d0cb8b..2247d8f06 100644 --- a/neon_core/util/skill_utils.py +++ b/neon_core/util/skill_utils.py @@ -34,11 +34,12 @@ from typing import List from ovos_utils.xdg_utils import xdg_data_home -from ovos_utils.log import LOG +from ovos_utils.log import LOG, deprecated from ovos_config.config import Configuration +@deprecated("Internal function is deprecated", "25.09.01") def _write_pip_constraints_to_file(output_file: str): """ Writes out a constraints file for OSM to use to prevent broken dependencies @@ -67,6 +68,7 @@ def _write_pip_constraints_to_file(output_file: str): LOG.info(f"Wrote core constraints to file: {output_file}") +@deprecated("Internal function is deprecated", "25.09.01") def _install_skill_pip(skill_package: str, constraints_file: str) -> bool: """ Pip install the specified package @@ -92,15 +94,8 @@ def install_skills_from_list(skills_to_install: list, config: dict = None): :param skills_to_install: list of skills to install :param config: optional dict configuration """ - constraints_file = join(xdg_data_home(), "neon", "constraints.txt") - _write_pip_constraints_to_file(constraints_file) - - for spec in skills_to_install: - if "://" in spec and "git+" not in spec: - LOG.error(f"Got an invalid package spec to install: {spec}") - elif not _install_skill_pip(spec, constraints_file): - LOG.error(f"Pip installation failed for: {spec}") - + from neon_utils.packaging_utils import install_packages_from_pip + install_packages_from_pip("neon-core", skills_to_install, True) LOG.info(f"Installed {len(skills_to_install)} skills") diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 9ceaaf025..4183207db 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -2,7 +2,8 @@ ovos-core[lgpl]~=0.1 -neon-utils[network]~=1.13,>=1.13.1a1 +#neon-utils[network]~=1.13,>=1.13.1a1 +neon-utils[network] @ git+https://github.com/neongeckocom/neon-utils@FEAT_PipInstallGitForce#egg=neon-utils ovos-utils~=0.0,>=0.0.38 ovos-bus-client~=0.0,>=0.0.10 neon-transformers~=1.0 From a636ef9021c20006e9ce4c7bf4d0cd9ecc0c030e Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 3 Sep 2025 11:12:52 -0700 Subject: [PATCH 2/5] Remove invalid skill URL from unit test case --- neon_core/util/skill_utils.py | 1 - test/test_skill_utils.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/neon_core/util/skill_utils.py b/neon_core/util/skill_utils.py index 2247d8f06..5ea80397d 100644 --- a/neon_core/util/skill_utils.py +++ b/neon_core/util/skill_utils.py @@ -33,7 +33,6 @@ from os.path import expanduser, join, isdir, dirname, islink from typing import List -from ovos_utils.xdg_utils import xdg_data_home from ovos_utils.log import LOG, deprecated from ovos_config.config import Configuration diff --git a/test/test_skill_utils.py b/test/test_skill_utils.py index 295e37bbe..57797a785 100644 --- a/test/test_skill_utils.py +++ b/test/test_skill_utils.py @@ -32,7 +32,6 @@ import unittest from os.path import dirname, join, exists, isdir from unittest.mock import patch -from unittest import skip sys.path.append(os.path.dirname(os.path.dirname(__file__))) @@ -43,7 +42,7 @@ ] TEST_SKILLS_WITH_PIP = [ - "https://github.com/NeonGeckoCom/skill-date_time/tree/dev", +# "https://github.com/NeonGeckoCom/skill-date_time/tree/dev", "git+https://github.com/NeonGeckoCom/malls-parser-skill", "neon-skill-support_helper" ] From 4a231b394c0900bdac518abd27e264654dee8742 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 15:57:01 -0700 Subject: [PATCH 3/5] Update logging to reflect skill installation success or failure --- neon_core/util/skill_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neon_core/util/skill_utils.py b/neon_core/util/skill_utils.py index 5ea80397d..b34af4e49 100644 --- a/neon_core/util/skill_utils.py +++ b/neon_core/util/skill_utils.py @@ -94,8 +94,11 @@ def install_skills_from_list(skills_to_install: list, config: dict = None): :param config: optional dict configuration """ from neon_utils.packaging_utils import install_packages_from_pip - install_packages_from_pip("neon-core", skills_to_install, True) - LOG.info(f"Installed {len(skills_to_install)} skills") + ret_code = install_packages_from_pip("neon-core", skills_to_install, True) + if ret_code == 0: + LOG.info(f"Installed {len(skills_to_install)} skills") + else: + LOG.error(f"Error installing skills: {ret_code}") def install_skills_default(config: dict = None): From 9782c461dea98e86890fb08cd417ff94c8135185 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 18:09:38 -0700 Subject: [PATCH 4/5] Update Docker default configuration to prevent logged warnings in default installation --- docker_overlay/etc/neon/neon.yaml | 6 ++++-- neon_core/configuration/neon.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker_overlay/etc/neon/neon.yaml b/docker_overlay/etc/neon/neon.yaml index f70153cd9..638bcfb41 100644 --- a/docker_overlay/etc/neon/neon.yaml +++ b/docker_overlay/etc/neon/neon.yaml @@ -1,7 +1,9 @@ language: supported_langs: - en - - uk +# secondary_langs defines what languages are loaded in ovos-core intent services +secondary_langs: [en-us] + skills: wait_for_internet: false extra_directories: @@ -45,4 +47,4 @@ ready_settings: - skills signal: use_signal_files: false - patch_imports: false \ No newline at end of file + patch_imports: false diff --git a/neon_core/configuration/neon.yaml b/neon_core/configuration/neon.yaml index aabb77f2f..587e1190e 100644 --- a/neon_core/configuration/neon.yaml +++ b/neon_core/configuration/neon.yaml @@ -338,4 +338,4 @@ location: code: America/Los_Angeles name: Pacific Standard Time dstOffset: 3600000 - offset: -28800000 \ No newline at end of file + offset: -28800000 From b5c3e7999ce893849a1852d84f35714435d470f7 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 10 Sep 2025 18:09:51 -0700 Subject: [PATCH 5/5] Update neon-utils dependency to PyPI released version spec --- requirements/requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 4183207db..6c0b56062 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -2,8 +2,7 @@ ovos-core[lgpl]~=0.1 -#neon-utils[network]~=1.13,>=1.13.1a1 -neon-utils[network] @ git+https://github.com/neongeckocom/neon-utils@FEAT_PipInstallGitForce#egg=neon-utils +neon-utils[network]~=1.13,>=1.13.1a4 ovos-utils~=0.0,>=0.0.38 ovos-bus-client~=0.0,>=0.0.10 neon-transformers~=1.0