From f969063e19730f6c5f3fe32110a09bcf6a1e46d5 Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Tue, 4 Apr 2023 23:23:26 +0100 Subject: [PATCH 01/27] default plugin requirements.txt --- requirements/requirements.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index e2d0ed5..0d1fff3 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,3 +1,13 @@ ovos-utils~=0.0, >=0.0.21 ovos_workshop~=0.0, >=0.0.8 ovos-plugin-manager~=0.0, >=0.0.20 + +ovos-phal-plugin-connectivity-events~=0.0, >=0.0.1 +ovos-PHAL-plugin-wallpaper-manager~=0.0, >=0.0.0 +# ovos-PHAL-plugin-brightness-control-rpi~=0.0, >=0.0.1 +ovos-PHAL-plugin-network-manager~=1.0, >=1.0.0 +ovos-phal-plugin-ipgeo~=0.0, >=0.0.1 +ovos-PHAL-plugin-oauth~=0.0, >=0.0.1 +ovos-PHAL-plugin-alsa~=0.0, >=0.0.1 +ovos-PHAL-plugin-system~=0.0, >=0.0.1 +ovos-PHAL-plugin-color-scheme-manager~=1.0, >=1.0.0 \ No newline at end of file From ff47505723b99a7f4cd9507a24467ccfc9bf21bc Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 4 Apr 2023 22:24:40 +0000 Subject: [PATCH 02/27] Increment Version --- CHANGELOG.md | 4 ++++ ovos_PHAL/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3576c0b..b8ab3f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [V0.0.4](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.4) (2022-11-16) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.4a4...V0.0.4) + ## [V0.0.4a4](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.4a4) (2022-11-16) [Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.4a3...V0.0.4a4) diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index f9d456b..b30f61a 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 0 +VERSION_ALPHA = 1 # END_VERSION_BLOCK From 4c71c745c61c0ebe946ffa72356cd9200b044dfa Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Wed, 5 Apr 2023 05:31:05 +0100 Subject: [PATCH 03/27] bump requirements.txt --- requirements/requirements.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 0d1fff3..010ac2a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,5 +1,7 @@ -ovos-utils~=0.0, >=0.0.21 -ovos_workshop~=0.0, >=0.0.8 +ovos-utils~=0.0, >=0.0.31a3 +ovos-bus-client~=0.0, >=0.0.3a4 +ovos_workshop~=0.0, >=0.0.12a3 +ovos-config~=0.0,>=0.0.8a2 ovos-plugin-manager~=0.0, >=0.0.20 ovos-phal-plugin-connectivity-events~=0.0, >=0.0.1 From 9808ca1c79a42d3912ae879d5cf6b3a0cdef89b2 Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Wed, 5 Apr 2023 05:39:03 +0100 Subject: [PATCH 04/27] bump requirements.txt --- requirements/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 010ac2a..d8048b4 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -10,6 +10,6 @@ ovos-PHAL-plugin-wallpaper-manager~=0.0, >=0.0.0 ovos-PHAL-plugin-network-manager~=1.0, >=1.0.0 ovos-phal-plugin-ipgeo~=0.0, >=0.0.1 ovos-PHAL-plugin-oauth~=0.0, >=0.0.1 -ovos-PHAL-plugin-alsa~=0.0, >=0.0.1 +# ovos-PHAL-plugin-alsa~=0.0, >=0.0.1 ovos-PHAL-plugin-system~=0.0, >=0.0.1 ovos-PHAL-plugin-color-scheme-manager~=1.0, >=1.0.0 \ No newline at end of file From b1b57660d35232946c7d1cd61aff4398769e68e8 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Wed, 5 Apr 2023 04:39:56 +0000 Subject: [PATCH 05/27] Increment Version --- CHANGELOG.md | 12 ++++++++++++ ovos_PHAL/version.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8ab3f9..590aada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a1...HEAD) + +**Merged pull requests:** + +- bump requirements.txt [\#15](https://github.com/OpenVoiceOS/ovos-PHAL/pull/15) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a1](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a1) (2023-04-04) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.4...V0.0.5a1) + ## [V0.0.4](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.4) (2022-11-16) [Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.4a4...V0.0.4) diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index b30f61a..aa20f05 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 1 +VERSION_ALPHA = 2 # END_VERSION_BLOCK From ca12f0fcb83ce165459b3cad4db79ab282eb5656 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Sat, 8 Apr 2023 04:51:21 +0100 Subject: [PATCH 06/27] bump requirements.txt (#16) --- requirements/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index d8048b4..4bce3e9 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,8 +1,8 @@ -ovos-utils~=0.0, >=0.0.31a3 -ovos-bus-client~=0.0, >=0.0.3a4 +ovos-utils~=0.0, >=0.0.31a6 +ovos-bus-client~=0.0, >=0.0.3a10 ovos_workshop~=0.0, >=0.0.12a3 -ovos-config~=0.0,>=0.0.8a2 -ovos-plugin-manager~=0.0, >=0.0.20 +ovos-config~=0.0,>=0.0.8a3 +ovos-plugin-manager~=0.0, >=0.0.23a5 ovos-phal-plugin-connectivity-events~=0.0, >=0.0.1 ovos-PHAL-plugin-wallpaper-manager~=0.0, >=0.0.0 From cbb5b74b39e48adc1e663e92867bc9c582eda01b Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Sat, 8 Apr 2023 03:52:12 +0000 Subject: [PATCH 07/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 590aada..6ccd6b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a1...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a2...HEAD) + +**Merged pull requests:** + +- bump requirements.txt [\#16](https://github.com/OpenVoiceOS/ovos-PHAL/pull/16) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a2](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a2) (2023-04-05) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a1...V0.0.5a2) **Merged pull requests:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index aa20f05..1f97d17 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 2 +VERSION_ALPHA = 3 # END_VERSION_BLOCK From d43e4d0fa0bb6f041becac556b8785095096c866 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Tue, 11 Apr 2023 23:53:14 +0100 Subject: [PATCH 08/27] refactor/ovos-bus-client (#17) --- ovos_PHAL/admin.py | 4 ++-- ovos_PHAL/service.py | 17 ++++++++--------- requirements/requirements.txt | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ovos_PHAL/admin.py b/ovos_PHAL/admin.py index 589cf7f..bc6ddbe 100644 --- a/ovos_PHAL/admin.py +++ b/ovos_PHAL/admin.py @@ -1,6 +1,6 @@ from ovos_plugin_manager.phal import find_admin_plugins from ovos_utils import wait_for_exit_signal -from ovos_utils.configuration import read_mycroft_config +from ovos_config import Configuration from ovos_utils.log import LOG from ovos_PHAL import PHAL @@ -40,7 +40,7 @@ def __init__(self, config=None, bus=None, on_ready=on_admin_ready, on_error=on_a watchdog=lambda: None, name="PHAL.admin", **kwargs): if not config: try: - config = read_mycroft_config() + config = Configuration() config = config.get("PHAL", {}).get("admin", {}) except: config = {} diff --git a/ovos_PHAL/service.py b/ovos_PHAL/service.py index 1e68e1a..2582880 100644 --- a/ovos_PHAL/service.py +++ b/ovos_PHAL/service.py @@ -1,7 +1,7 @@ from ovos_plugin_manager.phal import find_phal_plugins -from ovos_utils.configuration import read_mycroft_config +from ovos_config import Configuration from ovos_utils.log import LOG -from ovos_utils.messagebus import get_mycroft_bus +from ovos_bus_client.client import MessageBusClient from ovos_utils.process_utils import ProcessStatus, StatusCallbackMap from ovos_workshop import OVOSAbstractApplication @@ -52,13 +52,11 @@ def __init__(self, config=None, bus=None, on_started=started_hook) self.status = ProcessStatus(name, callback_map=callbacks) self._watchdog = watchdog # TODO implement - if not config: - try: - config = read_mycroft_config()["PHAL"] - except: - config = {} - self.config = config - self.bus = bus or get_mycroft_bus() + self.config = config or Configuration().get("PHAL") or {} + if not bus: + bus = MessageBusClient() + bus.run_in_thread() + self.bus = bus self.drivers = {} self.status.bind(self.bus) @@ -83,6 +81,7 @@ def start(self): self.load_plugins() self.status.set_ready() except Exception as e: + LOG.exception(e) self.status.set_error(e) def shutdown(self): diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 4bce3e9..afe80d8 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,5 +1,5 @@ ovos-utils~=0.0, >=0.0.31a6 -ovos-bus-client~=0.0, >=0.0.3a10 +ovos-bus-client>=0.0.3a16,~=0.0 ovos_workshop~=0.0, >=0.0.12a3 ovos-config~=0.0,>=0.0.8a3 ovos-plugin-manager~=0.0, >=0.0.23a5 From 0f0003cedb8b6c9ed0846a85f9c1bd0a55d73d44 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 11 Apr 2023 22:54:06 +0000 Subject: [PATCH 09/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ccd6b9..d4c0045 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a2...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a3...HEAD) + +**Merged pull requests:** + +- refactor/update\_imports [\#17](https://github.com/OpenVoiceOS/ovos-PHAL/pull/17) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a3](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a3) (2023-04-08) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a2...V0.0.5a3) **Merged pull requests:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 1f97d17..e9486a3 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 3 +VERSION_ALPHA = 4 # END_VERSION_BLOCK From b9b2abf65750ba0521a2024f88970aeefed02898 Mon Sep 17 00:00:00 2001 From: Swen Gross Date: Fri, 12 May 2023 22:31:36 +0200 Subject: [PATCH 10/27] add project description (#18) * add project description * add content_type md --- setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.py b/setup.py index 16afd2c..a57e989 100644 --- a/setup.py +++ b/setup.py @@ -48,6 +48,12 @@ def required(requirements_file): if pkg.strip() and not pkg.startswith("#")] +long_description = "" +if os.path.isfile(os.path.join(BASEDIR, "README.md")): + with open(os.path.join(BASEDIR, "README.md"), "r") as f: + long_description = f.read() + + setup( name='ovos_PHAL', version=get_version(), @@ -55,6 +61,9 @@ def required(requirements_file): install_requires=required("requirements/requirements.txt"), package_data={'': package_files('ovos_PHAL')}, url='https://github.com/OpenVoiceOS/ovos-PHAL', + description="Plugin based Hardware Abstraction Layer for OVOS", + long_description=long_description, + long_description_content_type="text/markdown", license='apache-2.0', author='jarbasAi', author_email='jarbasai@mailfence.com', From 36f245eec2c2c49976499e4b8490d8436dcb4333 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Fri, 12 May 2023 20:32:26 +0000 Subject: [PATCH 11/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c0045..86ed917 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a3...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a4...HEAD) + +**Merged pull requests:** + +- add project description [\#18](https://github.com/OpenVoiceOS/ovos-PHAL/pull/18) ([emphasize](https://github.com/emphasize)) + +## [V0.0.5a4](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a4) (2023-04-11) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a3...V0.0.5a4) **Merged pull requests:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index e9486a3..56d22d7 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 4 +VERSION_ALPHA = 5 # END_VERSION_BLOCK From b3e4c46922702db5f4461476968cfe14ebb099f7 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Tue, 16 May 2023 18:46:55 +0100 Subject: [PATCH 12/27] Update requirements.txt (#19) --- requirements/requirements.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index afe80d8..70772b8 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -5,11 +5,8 @@ ovos-config~=0.0,>=0.0.8a3 ovos-plugin-manager~=0.0, >=0.0.23a5 ovos-phal-plugin-connectivity-events~=0.0, >=0.0.1 -ovos-PHAL-plugin-wallpaper-manager~=0.0, >=0.0.0 -# ovos-PHAL-plugin-brightness-control-rpi~=0.0, >=0.0.1 ovos-PHAL-plugin-network-manager~=1.0, >=1.0.0 ovos-phal-plugin-ipgeo~=0.0, >=0.0.1 ovos-PHAL-plugin-oauth~=0.0, >=0.0.1 # ovos-PHAL-plugin-alsa~=0.0, >=0.0.1 ovos-PHAL-plugin-system~=0.0, >=0.0.1 -ovos-PHAL-plugin-color-scheme-manager~=1.0, >=1.0.0 \ No newline at end of file From b03fa1e3ba1202a34a755bb8979e0380419a02b3 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 16 May 2023 17:47:44 +0000 Subject: [PATCH 13/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ed917..3d9dfae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a4...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a5...HEAD) + +**Merged pull requests:** + +- Update requirements.txt [\#19](https://github.com/OpenVoiceOS/ovos-PHAL/pull/19) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a5](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a5) (2023-05-12) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a4...V0.0.5a5) **Merged pull requests:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 56d22d7..47e85a7 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 5 +VERSION_ALPHA = 6 # END_VERSION_BLOCK From ba5b8742447b722268be60bc1e8279f74830fafd Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Mon, 3 Jul 2023 22:21:39 +0100 Subject: [PATCH 14/27] init_service_logger("PHAL") --- ovos_PHAL/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ovos_PHAL/__main__.py b/ovos_PHAL/__main__.py index b934a7b..ee45b72 100644 --- a/ovos_PHAL/__main__.py +++ b/ovos_PHAL/__main__.py @@ -1,6 +1,7 @@ from ovos_PHAL.service import PHAL, on_ready, on_error, on_stopping from ovos_utils import wait_for_exit_signal +from ovos_utils.log import init_service_logger def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping): @@ -9,6 +10,7 @@ def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping): # "ovos-PHAL-plugin-display-manager-ipc": {"enabled": true}, # "ovos-PHAL-plugin-mk1": {"enabled": True} # } + init_service_logger("PHAL") phal = PHAL(on_error=error_hook, on_ready=ready_hook, on_stopping=stopping_hook) phal.start() wait_for_exit_signal() From 825b6535cb1b5b3ee34de67c8f3b9d43d81dfc43 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Mon, 3 Jul 2023 22:22:27 +0100 Subject: [PATCH 15/27] init_service_logger("PHAL_admin") --- ovos_PHAL/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ovos_PHAL/admin.py b/ovos_PHAL/admin.py index bc6ddbe..8067de5 100644 --- a/ovos_PHAL/admin.py +++ b/ovos_PHAL/admin.py @@ -1,7 +1,7 @@ from ovos_plugin_manager.phal import find_admin_plugins from ovos_utils import wait_for_exit_signal from ovos_config import Configuration -from ovos_utils.log import LOG +from ovos_utils.log import LOG, init_service_logger from ovos_PHAL import PHAL @@ -71,6 +71,7 @@ def main(ready_hook=on_admin_ready, error_hook=on_admin_error, stopping_hook=on_ # "ovos-PHAL-plugin-system": {"enabled": True} # } # } + init_service_logger("PHAL_admin") phal = AdminPHAL(on_error=error_hook, on_ready=ready_hook, on_stopping=stopping_hook) phal.start() wait_for_exit_signal() From d1226022fedcfdd84604c324bd9577498e23af5a Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Mon, 3 Jul 2023 21:22:43 +0000 Subject: [PATCH 16/27] Increment Version --- CHANGELOG.md | 4 ++-- ovos_PHAL/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d9dfae..0020ecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) +## [V0.0.5a6](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a6) (2023-05-16) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a5...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a5...V0.0.5a6) **Merged pull requests:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 47e85a7..7597244 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 6 +VERSION_ALPHA = 7 # END_VERSION_BLOCK From dd9c8d1c7c70bd495f23797bf73d9608700bb470 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Mon, 3 Jul 2023 21:23:18 +0000 Subject: [PATCH 17/27] Increment Version --- CHANGELOG.md | 4 ++++ ovos_PHAL/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0020ecc..c67d88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [V0.0.5a7](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a7) (2023-07-03) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a6...V0.0.5a7) + ## [V0.0.5a6](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a6) (2023-05-16) [Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a5...V0.0.5a6) diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 7597244..358839a 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 7 +VERSION_ALPHA = 8 # END_VERSION_BLOCK From 57e7ddcc875657890b97238044e7e27c7bd80bd6 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Wed, 12 Jul 2023 08:09:59 +0100 Subject: [PATCH 18/27] Update requirements.txt (#20) --- requirements/requirements.txt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 70772b8..b1d322a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,12 +1,5 @@ -ovos-utils~=0.0, >=0.0.31a6 -ovos-bus-client>=0.0.3a16,~=0.0 -ovos_workshop~=0.0, >=0.0.12a3 -ovos-config~=0.0,>=0.0.8a3 -ovos-plugin-manager~=0.0, >=0.0.23a5 - -ovos-phal-plugin-connectivity-events~=0.0, >=0.0.1 -ovos-PHAL-plugin-network-manager~=1.0, >=1.0.0 -ovos-phal-plugin-ipgeo~=0.0, >=0.0.1 -ovos-PHAL-plugin-oauth~=0.0, >=0.0.1 -# ovos-PHAL-plugin-alsa~=0.0, >=0.0.1 -ovos-PHAL-plugin-system~=0.0, >=0.0.1 +ovos-utils<0.1.0, >=0.0.35a7 +ovos_bus_client<0.1.0, >=0.0.5 +ovos_workshop~=0.0, >=0.0.12a38 +ovos-config~=0.0,>=0.0.11a3 +ovos-plugin-manager~=0.0, >=0.0.24a5 From 28e7e021cdd177c47b5814a48f0bc6422401889b Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Wed, 12 Jul 2023 07:11:01 +0000 Subject: [PATCH 19/27] Increment Version --- CHANGELOG.md | 12 ++++++++++++ ovos_PHAL/version.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c67d88a..0a15afc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a8...HEAD) + +**Merged pull requests:** + +- Update requirements.txt [\#20](https://github.com/OpenVoiceOS/ovos-PHAL/pull/20) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a8](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a8) (2023-07-03) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a7...V0.0.5a8) + ## [V0.0.5a7](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a7) (2023-07-03) [Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a6...V0.0.5a7) diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 358839a..677190e 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 8 +VERSION_ALPHA = 9 # END_VERSION_BLOCK From cc432f0e9b4112e20cfb7b1d277cfb328579af21 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Fri, 14 Jul 2023 15:00:27 +0100 Subject: [PATCH 20/27] rm deprecation logs name == skill_id (#21) --- ovos_PHAL/service.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ovos_PHAL/service.py b/ovos_PHAL/service.py index 2582880..bafafa4 100644 --- a/ovos_PHAL/service.py +++ b/ovos_PHAL/service.py @@ -38,8 +38,11 @@ class PHAL(OVOSAbstractApplication): def __init__(self, config=None, bus=None, on_ready=on_ready, on_error=on_error, on_stopping=on_stopping, on_started=on_started, on_alive=on_alive, - watchdog=lambda: None, name="PHAL", **kwargs): - super().__init__(skill_id=f"ovos.{name}") + watchdog=lambda: None, skill_id="ovos.PHAL", **kwargs): + if not bus: + bus = MessageBusClient() + bus.run_in_thread() + super().__init__(skill_id=skill_id, bus=bus) ready_hook = kwargs.get('ready_hook', on_ready) error_hook = kwargs.get('error_hook', on_error) stopping_hook = kwargs.get('stopping_hook', on_stopping) @@ -50,13 +53,9 @@ def __init__(self, config=None, bus=None, on_stopping=stopping_hook, on_alive=alive_hook, on_started=started_hook) - self.status = ProcessStatus(name, callback_map=callbacks) + self.status = ProcessStatus("PHAL", callback_map=callbacks) self._watchdog = watchdog # TODO implement self.config = config or Configuration().get("PHAL") or {} - if not bus: - bus = MessageBusClient() - bus.run_in_thread() - self.bus = bus self.drivers = {} self.status.bind(self.bus) From d8ab63be1d2556529593350a8e4b3333e87e8d58 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Fri, 14 Jul 2023 14:01:31 +0000 Subject: [PATCH 21/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a15afc..85b4160 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a8...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a9...HEAD) + +**Merged pull requests:** + +- rm deprecation logs name == skill\_id [\#21](https://github.com/OpenVoiceOS/ovos-PHAL/pull/21) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a9](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a9) (2023-07-12) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a8...V0.0.5a9) **Merged pull requests:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 677190e..8e6089b 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 9 +VERSION_ALPHA = 10 # END_VERSION_BLOCK From 00ad25f2804faa6cbbadc16924526d168b7441e6 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Tue, 12 Sep 2023 19:53:22 +0100 Subject: [PATCH 22/27] fix/no_need_to_subclass (#23) --- ovos_PHAL/service.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ovos_PHAL/service.py b/ovos_PHAL/service.py index bafafa4..392d214 100644 --- a/ovos_PHAL/service.py +++ b/ovos_PHAL/service.py @@ -3,7 +3,6 @@ from ovos_utils.log import LOG from ovos_bus_client.client import MessageBusClient from ovos_utils.process_utils import ProcessStatus, StatusCallbackMap -from ovos_workshop import OVOSAbstractApplication def on_ready(): @@ -26,7 +25,7 @@ def on_started(): LOG.info('PHAL is started') -class PHAL(OVOSAbstractApplication): +class PHAL: """ Args: config (dict): PHAL config, usually from mycroft.conf @@ -42,7 +41,9 @@ def __init__(self, config=None, bus=None, if not bus: bus = MessageBusClient() bus.run_in_thread() - super().__init__(skill_id=skill_id, bus=bus) + self.skill_id = skill_id + self.bus = bus + ready_hook = kwargs.get('ready_hook', on_ready) error_hook = kwargs.get('error_hook', on_error) stopping_hook = kwargs.get('stopping_hook', on_stopping) From 1181bf84ba370c491f6747b463ca3ffcd426f0dd Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 12 Sep 2023 18:54:04 +0000 Subject: [PATCH 23/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85b4160..b71e2f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a9...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a10...HEAD) + +**Fixed bugs:** + +- fix/no\_need\_to\_subclass [\#23](https://github.com/OpenVoiceOS/ovos-PHAL/pull/23) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a10](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a10) (2023-07-14) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a9...V0.0.5a10) **Merged pull requests:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 8e6089b..14013a2 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 10 +VERSION_ALPHA = 11 # END_VERSION_BLOCK From bca9eaa756703924e246bc4083b35d82fec3ee39 Mon Sep 17 00:00:00 2001 From: Swen Gross Date: Tue, 19 Sep 2023 23:29:46 +0200 Subject: [PATCH 24/27] load either user or admin (#24) --- ovos_PHAL/admin.py | 16 +++++++++------- ovos_PHAL/service.py | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ovos_PHAL/admin.py b/ovos_PHAL/admin.py index 8067de5..a08f5c4 100644 --- a/ovos_PHAL/admin.py +++ b/ovos_PHAL/admin.py @@ -38,17 +38,19 @@ class AdminPHAL(PHAL): def __init__(self, config=None, bus=None, on_ready=on_admin_ready, on_error=on_admin_error, on_stopping=on_admin_stopping, on_started=on_admin_started, on_alive=on_admin_alive, watchdog=lambda: None, name="PHAL.admin", **kwargs): - if not config: - try: - config = Configuration() - config = config.get("PHAL", {}).get("admin", {}) - except: - config = {} + if config and "admin" not in config: + config = {"admin": config} super().__init__(config, bus, on_ready, on_error, on_stopping, on_started, on_alive, watchdog, name, **kwargs) def load_plugins(self): for name, plug in find_admin_plugins().items(): - config = self.config.get(name) or {} + # load the plugin only if not defined as user plugin + # (for plugins that can be used as admin or user plugins) + if name in self.user_config: + LOG.debug(f"PHAL plugin {name} runs as user plugin, skipping") + continue + + config = self.admin_config.get(name) or {} enabled = config.get("enabled") if not enabled: continue # require explicit enabling by user diff --git a/ovos_PHAL/service.py b/ovos_PHAL/service.py index 392d214..80283fe 100644 --- a/ovos_PHAL/service.py +++ b/ovos_PHAL/service.py @@ -56,13 +56,23 @@ def __init__(self, config=None, bus=None, on_started=started_hook) self.status = ProcessStatus("PHAL", callback_map=callbacks) self._watchdog = watchdog # TODO implement - self.config = config or Configuration().get("PHAL") or {} + self.user_config = config or Configuration().get("PHAL") or {} + if "admin" in self.user_config: + self.admin_config = self.user_config.pop("admin") + else: + self.admin_config = {} self.drivers = {} self.status.bind(self.bus) def load_plugins(self): for name, plug in find_phal_plugins().items(): - config = self.config.get(name) or {} + # load the plugin only if not defined as admin plugin + # (for plugins that can be used as admin or user plugins) + if name in self.admin_config: + LOG.debug(f"PHAL plugin {name} runs as admin plugin, skipping") + continue + + config = self.user_config.get(name) or {} if hasattr(plug, "validator"): enabled = plug.validator.validate(config) else: From c958104ed5090dfd17dd61642e054d6ff77d6c23 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 19 Sep 2023 21:30:28 +0000 Subject: [PATCH 25/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b71e2f7..1afcd23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a10...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a11...HEAD) + +**Implemented enhancements:** + +- load either user or admin [\#24](https://github.com/OpenVoiceOS/ovos-PHAL/pull/24) ([emphasize](https://github.com/emphasize)) + +## [V0.0.5a11](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a11) (2023-09-12) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a10...V0.0.5a11) **Fixed bugs:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index 14013a2..a0d02d6 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 11 +VERSION_ALPHA = 12 # END_VERSION_BLOCK From 60ff1623412bfd9d3cd0b3d05aaf39a51e9102a2 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Wed, 18 Oct 2023 23:14:27 +0100 Subject: [PATCH 26/27] fix/PHAL admin service status (#25) * Update service.py * Update admin.py * Update admin.py --- ovos_PHAL/admin.py | 4 ++-- ovos_PHAL/service.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ovos_PHAL/admin.py b/ovos_PHAL/admin.py index a08f5c4..9a9a530 100644 --- a/ovos_PHAL/admin.py +++ b/ovos_PHAL/admin.py @@ -37,10 +37,10 @@ class AdminPHAL(PHAL): def __init__(self, config=None, bus=None, on_ready=on_admin_ready, on_error=on_admin_error, on_stopping=on_admin_stopping, on_started=on_admin_started, on_alive=on_admin_alive, - watchdog=lambda: None, name="PHAL.admin", **kwargs): + watchdog=lambda: None, skill_id="PHAL.admin", **kwargs): if config and "admin" not in config: config = {"admin": config} - super().__init__(config, bus, on_ready, on_error, on_stopping, on_started, on_alive, watchdog, name, **kwargs) + super().__init__(config, bus, on_ready, on_error, on_stopping, on_started, on_alive, watchdog, skill_id, **kwargs) def load_plugins(self): for name, plug in find_admin_plugins().items(): diff --git a/ovos_PHAL/service.py b/ovos_PHAL/service.py index 80283fe..a96091d 100644 --- a/ovos_PHAL/service.py +++ b/ovos_PHAL/service.py @@ -37,7 +37,7 @@ class PHAL: def __init__(self, config=None, bus=None, on_ready=on_ready, on_error=on_error, on_stopping=on_stopping, on_started=on_started, on_alive=on_alive, - watchdog=lambda: None, skill_id="ovos.PHAL", **kwargs): + watchdog=lambda: None, skill_id="PHAL", **kwargs): if not bus: bus = MessageBusClient() bus.run_in_thread() @@ -54,7 +54,7 @@ def __init__(self, config=None, bus=None, on_stopping=stopping_hook, on_alive=alive_hook, on_started=started_hook) - self.status = ProcessStatus("PHAL", callback_map=callbacks) + self.status = ProcessStatus(skill_id, callback_map=callbacks) self._watchdog = watchdog # TODO implement self.user_config = config or Configuration().get("PHAL") or {} if "admin" in self.user_config: From 7dcc31bd8a054c513464829bc3e898237a28411c Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Wed, 18 Oct 2023 22:15:09 +0000 Subject: [PATCH 27/27] Increment Version --- CHANGELOG.md | 10 +++++++++- ovos_PHAL/version.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1afcd23..5149de4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ ## [Unreleased](https://github.com/OpenVoiceOS/ovos-PHAL/tree/HEAD) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a11...HEAD) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a12...HEAD) + +**Fixed bugs:** + +- fix/PHAL admin service status [\#25](https://github.com/OpenVoiceOS/ovos-PHAL/pull/25) ([JarbasAl](https://github.com/JarbasAl)) + +## [V0.0.5a12](https://github.com/OpenVoiceOS/ovos-PHAL/tree/V0.0.5a12) (2023-09-19) + +[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL/compare/V0.0.5a11...V0.0.5a12) **Implemented enhancements:** diff --git a/ovos_PHAL/version.py b/ovos_PHAL/version.py index a0d02d6..e987051 100644 --- a/ovos_PHAL/version.py +++ b/ovos_PHAL/version.py @@ -3,5 +3,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 VERSION_BUILD = 5 -VERSION_ALPHA = 12 +VERSION_ALPHA = 13 # END_VERSION_BLOCK