Skip to content

Commit

Permalink
1.7.0 (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel authored Apr 23, 2024
2 parents b94de29 + db56cd5 commit 91ef33c
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 54 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ jobs:
needs: build_and_publish_pypi_and_release
uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master
secrets: inherit
with:
platforms: linux/amd64,linux/arm64
4 changes: 3 additions & 1 deletion .github/workflows/publish_test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ jobs:
build_and_publish_docker:
needs: publish_alpha_release
uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master
secrets: inherit
secrets: inherit
with:
platforms: linux/amd64,linux/arm64
7 changes: 3 additions & 4 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

name: Run Unit Tests
on:
push:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
py_build_tests:
Expand All @@ -15,6 +12,8 @@ jobs:
python_version: "3.8"
docker_build_tests:
uses: neongeckocom/.github/.github/workflows/docker_build_tests.yml@master
with:
platforms: linux/amd64,linux/arm64
unit_tests:
timeout-minutes: 15
strategy:
Expand All @@ -40,4 +39,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: enclosure-service-test-results
path: tests/enclosure-service-test-results.xml
path: tests/enclosure-service-test-results.xml
48 changes: 17 additions & 31 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,30 @@
# Changelog

## [1.6.1a5](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.1a5) (2023-12-13)
## [1.6.3a2](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.3a2) (2024-04-23)

[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.1a4...1.6.1a5)
[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.2a5...1.6.3a2)

**Merged pull requests:**

- Update plugins to stable releases [\#80](https://github.com/NeonGeckoCom/neon_enclosure/pull/80) ([NeonDaniel](https://github.com/NeonDaniel))
- Patch ovos-backend-client Stable Release Compatibility [\#88](https://github.com/NeonGeckoCom/neon_enclosure/pull/88) ([NeonDaniel](https://github.com/NeonDaniel))
- 1.6.1 [\#81](https://github.com/NeonGeckoCom/neon_enclosure/pull/81) ([github-actions[bot]](https://github.com/apps/github-actions))
- 1.6.0 [\#76](https://github.com/NeonGeckoCom/neon_enclosure/pull/76) ([github-actions[bot]](https://github.com/apps/github-actions))
- 1.5.1 [\#71](https://github.com/NeonGeckoCom/neon_enclosure/pull/71) ([github-actions[bot]](https://github.com/apps/github-actions))
- 1.5.0 [\#68](https://github.com/NeonGeckoCom/neon_enclosure/pull/68) ([github-actions[bot]](https://github.com/apps/github-actions))
- 1.4.2 [\#65](https://github.com/NeonGeckoCom/neon_enclosure/pull/65) ([github-actions[bot]](https://github.com/apps/github-actions))
- Update Dependencies [\#56](https://github.com/NeonGeckoCom/neon_enclosure/pull/56) ([github-actions[bot]](https://github.com/apps/github-actions))
- Updated Automation, Documentation, Docker Plugins [\#48](https://github.com/NeonGeckoCom/neon_enclosure/pull/48) ([github-actions[bot]](https://github.com/apps/github-actions))
- Admin Enclosure Service [\#41](https://github.com/NeonGeckoCom/neon_enclosure/pull/41) ([github-actions[bot]](https://github.com/apps/github-actions))
- Docker Updates, SystemD Compatibility, Unit Tests [\#32](https://github.com/NeonGeckoCom/neon_enclosure/pull/32) ([github-actions[bot]](https://github.com/apps/github-actions))
- PHAL Refactor [\#25](https://github.com/NeonGeckoCom/neon_enclosure/pull/25) ([github-actions[bot]](https://github.com/apps/github-actions))

## [1.6.1a4](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.1a4) (2023-11-22)
## [1.6.2a5](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.2a5) (2024-04-23)

[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.1a3...1.6.1a4)
[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.2a4...1.6.2a5)

**Merged pull requests:**

- Add monitoring plugin to docker dependencies [\#79](https://github.com/NeonGeckoCom/neon_enclosure/pull/79) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.6.1a3](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.1a3) (2023-11-16)

[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.1a2...1.6.1a3)

**Merged pull requests:**

- Improve Service Shutdown [\#37](https://github.com/NeonGeckoCom/neon_enclosure/pull/37) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.6.1a2](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.1a2) (2023-08-02)

[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.1a1...1.6.1a2)

**Merged pull requests:**

- Kubernetes container compat. [\#78](https://github.com/NeonGeckoCom/neon_enclosure/pull/78) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.6.1a1](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.1a1) (2023-07-20)

[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.0...1.6.1a1)

**Merged pull requests:**
## [1.6.2a4](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.2a4) (2024-02-22)

- Remove redundant `git` installation in Dockerfile [\#77](https://github.com/NeonGeckoCom/neon_enclosure/pull/77) ([NeonDaniel](https://github.com/NeonDaniel))
[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.2...1.6.2a4)



Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim
FROM python:3.10-slim

LABEL vendor=neon.ai \
ai.neon.name="neon-enclosure"
Expand All @@ -22,4 +22,6 @@ RUN pip install wheel && \

COPY docker_overlay/ /

CMD ["neon-enclosure", "run"]
RUN neon-enclosure install-dependencies

CMD ["bash", "/root/run.sh"]
32 changes: 32 additions & 0 deletions docker_overlay/root/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2022 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.

# Plugin installation must occur in a separate thread, before module load, for the entry point to be loaded.
neon-enclosure install-dependencies
neon-enclosure run
7 changes: 6 additions & 1 deletion neon_enclosure/admin/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def __init__(self, skill_id="neon.phal_admin", **kwargs):
AdminPHAL.__init__(self, skill_id=skill_id, **kwargs)
self.status.set_alive()
self.started = Event()
self.config = self.config or dict() # TODO: Fixed in ovos_PHAL 0.0.5a1

@property
def config(self):
from ovos_utils.log import log_deprecation
log_deprecation("Reference `admin_config`", "2.0.0")
return self.admin_config

def start(self):
LOG.info("Starting Admin PHAL")
Expand Down
16 changes: 15 additions & 1 deletion neon_enclosure/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import click
import sys

from click_default_group import DefaultGroup
from neon_utils.packaging_utils import get_package_version_spec
from neon_utils.configuration_utils import init_config_dir

from ovos_utils.log import LOG
from ovos_config.config import Configuration
from typing import List

@click.group("neon-enclosure", cls=DefaultGroup,
no_args_is_help=True, invoke_without_command=True,
Expand All @@ -43,6 +46,17 @@ def neon_enclosure_cli(version: bool = False):
click.echo(f"neon_enclosure version "
f"{get_package_version_spec('neon_enclosure')}")

@neon_enclosure_cli.command(help="Install neon-enclosure module dependencies from config & cli")
@click.option("--package", "-p", default=[], multiple=True,
help="Additional package to install (can be repeated)")
def install_dependencies(package: List[str]):
from neon_utils.packaging_utils import install_packages_from_pip
from neon_enclosure.utils import build_extra_dependency_list
config = Configuration()
dependencies = build_extra_dependency_list(config, list(package))
result = install_packages_from_pip("neon-enclosure", dependencies)
LOG.info(f"pip exit code: {result}")
sys.exit(result)

@neon_enclosure_cli.command(help="Start Neon Enclosure module")
def run():
Expand Down
11 changes: 8 additions & 3 deletions neon_enclosure/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ def __init__(self, skill_id="neon.phal", **kwargs):
PHAL.__init__(self, skill_id=skill_id, **kwargs)
self.status.set_alive()
self.started = Event()
self.config = self.config or dict() # TODO: Fixed in ovos_PHAL 0.0.5a1

@property
def config(self):
from ovos_utils.log import log_deprecation
log_deprecation("Reference `user_config`", "2.0.0")
return self.user_config

def start(self):
LOG.debug("Starting PHAL")
if self.config.get('wait_for_gui'):
if self.user_config.get('wait_for_gui'):
LOG.info("Waiting for GUI Service to start")
timeout = time() + 30
while time() < timeout:
Expand All @@ -59,7 +64,7 @@ def start(self):
def load_plugins(self):
for name, plug in find_phal_plugins().items():
LOG.info(f"Loading {name}")
config = self.config.get(name) or {}
config = self.user_config.get(name) or {}
try:
if hasattr(plug, "validator"):
enabled = plug.validator.validate(config)
Expand Down
36 changes: 36 additions & 0 deletions neon_enclosure/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2022 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_config.config import Configuration
from typing import List, Union

def build_extra_dependency_list(config: Union[dict, Configuration], additional: List[str] = []) -> List[str]:
extra_dependencies = config.get("extra_dependencies", {})
dependencies = additional + extra_dependencies.get("global", []) + extra_dependencies.get("enclosure", [])

return dependencies
9 changes: 6 additions & 3 deletions requirements/docker.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
ovos-phal-plugin-homeassistant~=0.0.1
ovos-phal-plugin-homeassistant~=0.0.3
ovos-phal-plugin-notification-widgets~=1.0.0
ovos-phal-plugin-color-scheme-manager~=1.0.0
ovos-phal-plugin-configuration-provider~=1.0.0
ovos-phal-plugin-dashboard~=0.0.1
ovos-phal-plugin-connectivity-events~=0.0.2
ovos-phal-plugin-connectivity-events~=0.0.3
ovos-phal-plugin-oauth~=0.0.2,>=0.0.3a1
neon-phal-plugin-monitoring~=0.0.1

# TODO Patching init error in 0.1.0
ovos-backend-client>=0.1.1a3
11 changes: 4 additions & 7 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
ovos-phal~=0.0.4
neon_utils[network]~=1.6
ovos_utils~=0.0.32
ovos-phal==0.0.5a15
neon-utils[network]~=1.9
ovos_utils~=0.0,>=0.0.32
click~=8.0
click-default-group~=1.2
ovos-bus-client~=0.0.4
ovos-bus-client~=0.0.8

# TODO: Patching ovos_PHAL inherited dependencies
ovos-backend-client>=0.0.6,<1.0.0
mycroft-messagebus-client~=0.10
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.6.2"
__version__ = "1.7.0"

0 comments on commit 91ef33c

Please sign in to comment.