Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ea698cd
Update Skill API to support outside applications (#554)
NeonDaniel Aug 27, 2025
31ca5fc
Increment Version to 1.13.1a1
NeonDaniel Aug 27, 2025
7c1a545
Update Changelog
NeonDaniel Aug 27, 2025
72eb112
Improve Skill metadata parsing support and remove OSM dependency (#558)
NeonDaniel Sep 10, 2025
0ab9be6
Increment Version to 1.13.1a2
NeonDaniel Sep 10, 2025
15696fa
Update Changelog
NeonDaniel Sep 10, 2025
b405616
Remove ovos-core test dependency (#557)
NeonDaniel Sep 10, 2025
8a73b3d
Increment Version to 1.13.1a3
NeonDaniel Sep 10, 2025
634f4ff
Update Changelog
NeonDaniel Sep 10, 2025
b858708
Update pip package installation method (#556)
NeonDaniel Sep 11, 2025
d53f559
Increment Version to 1.13.1a4
NeonDaniel Sep 11, 2025
02041b3
Update Changelog
NeonDaniel Sep 11, 2025
56d7795
Refactor log aggregators init (#560)
NeonDaniel Sep 12, 2025
eaaf585
Increment Version to 1.13.1a5
NeonDaniel Sep 12, 2025
cff6a5b
Update Changelog
NeonDaniel Sep 12, 2025
f9d6cd1
Add support for authenticated HANA (#537)
NeonDaniel Sep 12, 2025
a177594
Increment Version to 1.13.1a6
NeonDaniel Sep 12, 2025
8889182
Update Changelog
NeonDaniel Sep 12, 2025
668420f
Refactor to remove use of deprecated `pkg_resources` module (#555)
NeonDaniel Sep 12, 2025
d50c45a
Increment Version to 1.13.1a7
NeonDaniel Sep 12, 2025
23d0b46
Update Changelog
NeonDaniel Sep 12, 2025
d57ec2d
Add function to get installed prerelease packages (#517)
NeonDaniel Sep 12, 2025
7a92606
Increment Version to 1.13.1a8
NeonDaniel Sep 12, 2025
406e811
Update Changelog
NeonDaniel Sep 12, 2025
cadff3d
Increment Version to 1.14.0
NeonDaniel Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
with:
package-extras: audio,configuration,networking
packages-exclude: '^(precise-runner|fann2|tqdm|bs4|ovos-phal-plugin|ovos-skill|neon-core|nvidia|neon-phal-plugin|bitstruct|audioread|RapidFuzz|click|setuptools|typing_extensions|urllib).*'
packages-exclude: '^(precise-runner|fann2|tqdm|bs4|ovos-phal-plugin|ovos-skill|neon-core|nvidia|neon-phal-plugin|bitstruct|audioread|RapidFuzz|click|setuptools|typing_extensions|urllib|marisa-trie).*'
14 changes: 12 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
skill_object_tests:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.9, '3.10', '3.11', '3.12' ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
python -m pip install --upgrade pip setuptools
pip install wheel "cython<3.0.0" # TODO: cython patching https://github.com/yaml/pyyaml/issues/724
pip install --no-build-isolation pyyaml~=5.4 # TODO: patching https://github.com/yaml/pyyaml/issues/724
pip install .[test,audio,network,configuration]
pip install .[test,audio,network,configuration,skills]
- name: Change Test File Permissions
run: |
sudo chown -R nobody:nogroup tests/configuration/unwritable_path
Expand Down Expand Up @@ -223,4 +224,13 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: hana-util-test-results-${{ matrix.python-version }}
path: tests/hana-util-test-results.xml
path: tests/hana-util-test-results.xml

- name: Test Skill Utils
run: |
pytest tests/skill_util_tests.py --doctest-modules --junitxml=tests/skill-util-test-results.xml
- name: Upload skill utils test results
uses: actions/upload-artifact@v4
with:
name: skill-util-test-results-${{ matrix.python-version }}
path: tests/skill-util-test-results.xml
67 changes: 58 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,77 @@
# Changelog

## [1.12.2a3](https://github.com/NeonGeckoCom/neon-utils/tree/1.12.2a3) (2025-07-02)
## [1.13.1a8](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a8) (2025-09-12)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.12.2a2...1.12.2a3)
[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.1a7...1.13.1a8)

**Merged pull requests:**

- Override `/status` server endpoint logging [\#552](https://github.com/NeonGeckoCom/neon-utils/pull/552) ([NeonDaniel](https://github.com/NeonDaniel))
- Add function to get installed prerelease packages [\#517](https://github.com/NeonGeckoCom/neon-utils/pull/517) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.12.2a2](https://github.com/NeonGeckoCom/neon-utils/tree/1.12.2a2) (2025-06-25)
## [1.13.1a7](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a7) (2025-09-12)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.12.2a1...1.12.2a2)
[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.1a6...1.13.1a7)

**Implemented enhancements:**

- \[FEAT\] Allow self-signed certificates in hana-utils [\#536](https://github.com/NeonGeckoCom/neon-utils/issues/536)
- \[FEAT\] Docker handling of status hooks [\#498](https://github.com/NeonGeckoCom/neon-utils/issues/498)

**Merged pull requests:**

- Refactor to remove use of deprecated `pkg_resources` module [\#555](https://github.com/NeonGeckoCom/neon-utils/pull/555) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.13.1a6](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a6) (2025-09-12)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.1a5...1.13.1a6)

**Merged pull requests:**

- Add support for authenticated HANA [\#537](https://github.com/NeonGeckoCom/neon-utils/pull/537) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.13.1a5](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a5) (2025-09-12)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.1a4...1.13.1a5)

**Merged pull requests:**

- Refactor log aggregators init [\#560](https://github.com/NeonGeckoCom/neon-utils/pull/560) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.13.1a4](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a4) (2025-09-11)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.1a3...1.13.1a4)

**Merged pull requests:**

- Update pip package installation method [\#556](https://github.com/NeonGeckoCom/neon-utils/pull/556) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.13.1a3](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a3) (2025-09-10)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.1a2...1.13.1a3)

**Implemented enhancements:**

- \[FEAT\] Deprecate ovos-core dependency [\#469](https://github.com/NeonGeckoCom/neon-utils/issues/469)

**Merged pull requests:**

- Remove ovos-core test dependency [\#557](https://github.com/NeonGeckoCom/neon-utils/pull/557) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.13.1a2](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a2) (2025-09-10)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.1a1...1.13.1a2)

**Merged pull requests:**

- Add helper to start a health check server [\#551](https://github.com/NeonGeckoCom/neon-utils/pull/551) ([NeonDaniel](https://github.com/NeonDaniel))
- Improve Skill metadata parsing support and remove OSM dependency [\#558](https://github.com/NeonGeckoCom/neon-utils/pull/558) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.12.2a1](https://github.com/NeonGeckoCom/neon-utils/tree/1.12.2a1) (2025-05-30)
## [1.13.1a1](https://github.com/NeonGeckoCom/neon-utils/tree/1.13.1a1) (2025-08-27)

[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.12.1...1.12.2a1)
[Full Changelog](https://github.com/NeonGeckoCom/neon-utils/compare/1.13.0...1.13.1a1)

**Merged pull requests:**

- Make HANA SSL optional [\#550](https://github.com/NeonGeckoCom/neon-utils/pull/550) ([NeonDaniel](https://github.com/NeonDaniel))
- Update Skill API to support outside applications [\#554](https://github.com/NeonGeckoCom/neon-utils/pull/554) ([NeonDaniel](https://github.com/NeonDaniel))



Expand Down
83 changes: 15 additions & 68 deletions neon_utils/configuration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import yaml

from copy import deepcopy
from os.path import *
from os.path import join, isfile, isdir, exists, expanduser, dirname, basename, splitext
from collections.abc import MutableMapping
from contextlib import suppress

Expand Down Expand Up @@ -302,9 +302,9 @@ def _load_yaml_file(self) -> dict:
from ruamel.yaml import YAML
config = _make_loaded_config_safe(YAML().load(f))
except ImportError:
LOG.error(f"ruamel.yaml not available to load "
f"legacy config. "
f"pip install neon-utils[configuration]")
LOG.error("ruamel.yaml not available to load "
"legacy config. "
"pip install neon-utils[configuration]")
if not config:
LOG.debug(f"Empty config file found at: {self.file_path}")
config = dict()
Expand All @@ -325,7 +325,7 @@ def _write_yaml_file(self) -> bool:
"""
to_write = deepcopy(self._content)
if not to_write:
LOG.error(f"Config content empty! Skipping write to disk and reloading")
LOG.error("Config content empty! Skipping write to disk and reloading")
return False
if not path_is_read_writable(self.file_path):
LOG.warning(f"Insufficient write permissions: {self.file_path}")
Expand All @@ -347,7 +347,7 @@ def _write_yaml_file(self) -> bool:
self._disk_content_hash = hash(repr(self._content))
except Exception as e:
LOG.error(e)
LOG.info(f"Restoring config from tmp file backup")
LOG.info("Restoring config from tmp file backup")
shutil.copy2(tmp_filename, self.file_path)
return True

Expand Down Expand Up @@ -810,7 +810,7 @@ def get_user_config_from_mycroft_conf(user_config: dict = None) -> dict:
["offset"] / 3600000, 1))

else:
LOG.warning(f"No location in core configuration")
LOG.warning("No location in core configuration")
return user_config


Expand Down Expand Up @@ -941,6 +941,8 @@ def get_mycroft_compatible_location(location: dict) -> dict:
return location


@deprecated("Configuration should be managed via ovos_config.Configuration",
"2.0.0")
def get_mycroft_compatible_config(mycroft_only=False,
neon_config_path=None) -> dict:
"""
Expand Down Expand Up @@ -1022,6 +1024,8 @@ def get_mycroft_compatible_config(mycroft_only=False,
return default_config


@deprecated("Configuration should be managed via ovos_config.Configuration",
"2.0.0")
def write_mycroft_compatible_config(file_to_write: str = None) -> str:
"""
Generates a mycroft-like configuration and writes it to the specified file
Expand All @@ -1036,7 +1040,7 @@ def write_mycroft_compatible_config(file_to_write: str = None) -> str:
if isfile(file_path):
disk_config = load_commented_json(file_path)
if disk_config == configuration:
LOG.debug(f"Configuration already up to date")
LOG.debug("Configuration already up to date")
return file_path
LOG.warning(f"File exists and will be overwritten: {file_to_write}")
elif not isdir(dirname(file_path)):
Expand Down Expand Up @@ -1149,7 +1153,7 @@ def parse_skill_default_settings(settings_meta: dict) -> dict:
LOG.error(settings_meta)
raise TypeError(f"Expected a dict, got: {type(settings_meta)}")
if not settings_meta:
LOG.debug(f"Empty Settings")
LOG.debug("Empty Settings")
return dict()
else:
settings = dict()
Expand Down Expand Up @@ -1355,7 +1359,7 @@ def _get_neon_skills_config(neon_config_path=None) -> dict:
neon_skills["directory_override"] = neon_skills["directory"]
except ModuleNotFoundError:
LOG.warning("ovos-core not installed")
neon_skills["directory_override"] = neon_skills["directory"]
# neon_skills["directory_override"] = neon_skills["directory"]

neon_skills["disable_osm"] = neon_skills.get("skill_manager", "osm") != "osm"
neon_skills["priority_skills"] = neon_skills.get("priority") or []
Expand All @@ -1381,45 +1385,13 @@ def _get_neon_skills_config(neon_config_path=None) -> dict:
neon_skills["neon_token"] = find_neon_git_token()
# populate_github_token_config(neon_skills["neon_token"])
except FileNotFoundError:
LOG.debug(f"No Github token found; skills may fail to install")
LOG.debug("No Github token found; skills may fail to install")
neon_skills["neon_token"] = None
skills_config = {**mycroft_config.get("skills", {}), **neon_skills}
skills_config.setdefault("debug", False)
return skills_config


@deprecated("Configuration moved to `ovos_config.Configuration`", "2.0.0")
def _get_neon_transcribe_config(neon_config_path=None) -> dict:
"""
Get a configuration dict for the transcription module.
Returns:
dict of config params used for the Neon transcription module
"""
local_config = _get_neon_local_config(neon_config_path)
user_config = get_neon_user_config(neon_config_path) if \
isfile(join(neon_config_path or get_config_dir(),
"ngi_user_info.yml")) else {}
neon_transcribe_config = dict()
neon_transcribe_config["transcript_dir"] = \
local_config.get("dirVars", {}).get("docsDir", "")
neon_transcribe_config["audio_permission"] = \
user_config.get("privacy", {}).get("save_audio", False)
return neon_transcribe_config


@deprecated("Configuration moved to `ovos_config.Configuration`", "2.0.0")
def _get_neon_gui_config(neon_config_path=None) -> dict:
"""
Get a configuration dict for the gui module.
Returns:
dict of config params used for the Neon gui module
"""
local_config = _get_neon_local_config(neon_config_path)
gui_config = dict(local_config.get("gui", {}))
gui_config["base_port"] = gui_config.get("port")
return gui_config


@deprecated("Configuration moved to `ovos_config.Configuration`", "2.0.0")
def _safe_mycroft_config() -> dict:
"""
Expand All @@ -1432,31 +1404,6 @@ def _safe_mycroft_config() -> dict:
return dict(config)


@deprecated("Configuration moved to `ovos_config.Configuration`", "2.0.0")
def _get_neon_yaml_config() -> dict:
from ovos_config.meta import get_ovos_config
from ovos_config.locations import get_xdg_config_save_path
from ovos_utils.json_helper import merge_dict

with open(get_ovos_config()["default_config_path"]) as f:
default = yaml.safe_load(f)
config = dict(default)
system_config = os.environ.get("MYCROFT_SYSTEM_CONFIG",
"/etc/neon/neon.yaml")
user_config = join(get_xdg_config_save_path("neon"), "neon.yaml")
if isfile(system_config):
with open(system_config) as f:
system = yaml.safe_load(f)
config = merge_dict(config, system)

if isfile(user_config):
with open(user_config) as f:
user = yaml.safe_load(f)
config = merge_dict(config, user)

return config


@deprecated("Configuration moved to `ovos_config.Configuration`", "2.0.0")
def _get_neon_auth_config(path: Optional[str] = None) -> dict:
"""
Expand Down
Loading