Skip to content

Commit

Permalink
1.6.1 (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel authored Dec 16, 2023
2 parents f57b090 + 1a04ed0 commit d6d8fce
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 22 deletions.
32 changes: 20 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
# Changelog

## [1.5.2a4](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.5.2a4) (2023-07-20)
## [1.6.1a5](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.1a5) (2023-12-13)

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

**Merged pull requests:**

- Better handle default init kwargs [\#75](https://github.com/NeonGeckoCom/neon_enclosure/pull/75) ([NeonDaniel](https://github.com/NeonDaniel))
- Update plugins to stable releases [\#80](https://github.com/NeonGeckoCom/neon_enclosure/pull/80) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.5.2a3](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.5.2a3) (2023-07-19)
## [1.6.1a4](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.6.1a4) (2023-11-22)

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

**Merged pull requests:**

- Add `skill_id` to services to resolve logged deprecation warnings [\#74](https://github.com/NeonGeckoCom/neon_enclosure/pull/74) ([NeonDaniel](https://github.com/NeonDaniel))
- Add monitoring plugin to docker dependencies [\#79](https://github.com/NeonGeckoCom/neon_enclosure/pull/79) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.5.2a2](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.5.2a2) (2023-07-18)
## [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.5.2a1...1.5.2a2)
[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.1a2...1.6.1a3)

**Merged pull requests:**

- Mark old CLI entrypoint as deprecated [\#73](https://github.com/NeonGeckoCom/neon_enclosure/pull/73) ([NeonDaniel](https://github.com/NeonDaniel))
- Improve Service Shutdown [\#37](https://github.com/NeonGeckoCom/neon_enclosure/pull/37) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.5.2a1](https://github.com/NeonGeckoCom/neon_enclosure/tree/1.5.2a1) (2023-06-27)
## [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.5.1...1.5.2a1)
[Full Changelog](https://github.com/NeonGeckoCom/neon_enclosure/compare/1.6.1a1...1.6.1a2)

**Merged pull requests:**

- Update Docker to use OVOS\_CONFIG envvars [\#72](https://github.com/NeonGeckoCom/neon_enclosure/pull/72) ([NeonDaniel](https://github.com/NeonDaniel))
- 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:**

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



Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ LABEL vendor=neon.ai \

ENV OVOS_CONFIG_BASE_FOLDER neon
ENV OVOS_CONFIG_FILENAME neon.yaml
ENV XDG_CONFIG_HOME /config

RUN apt update && \
apt install -y \
Expand All @@ -16,8 +17,6 @@ RUN apt update && \
ADD . /neon_enclosure
WORKDIR /neon_enclosure

RUN apt install git

RUN pip install wheel && \
pip install .[docker]

Expand Down
3 changes: 2 additions & 1 deletion neon_enclosure/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from neon_utils.process_utils import start_malloc, snapshot_malloc, print_malloc
from neon_utils.signal_utils import init_signal_bus, init_signal_handlers
from ovos_utils.messagebus import get_mycroft_bus
from ovos_utils.process_utils import reset_sigint_handler
from ovos_utils.process_utils import reset_sigint_handler, PIDLock
from ovos_utils.log import LOG
from ovos_utils import wait_for_exit_signal

Expand All @@ -50,6 +50,7 @@ def main(*args, **kwargs):
init_signal_bus(bus)
init_signal_handlers()
reset_sigint_handler()
PIDLock('enclosure')
service = NeonHardwareAbstractionLayer(*args, **kwargs)
service.start()
wait_for_exit_signal()
Expand Down
3 changes: 2 additions & 1 deletion neon_enclosure/admin/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from neon_utils.process_utils import start_malloc, snapshot_malloc, print_malloc
from neon_utils.signal_utils import init_signal_bus, init_signal_handlers
from ovos_utils.messagebus import get_mycroft_bus
from ovos_utils.process_utils import reset_sigint_handler
from ovos_utils.process_utils import reset_sigint_handler, PIDLock
from ovos_utils import wait_for_exit_signal
from ovos_utils.log import LOG

Expand All @@ -50,6 +50,7 @@ def main(*args, **kwargs):
init_signal_bus(bus)
init_signal_handlers()
reset_sigint_handler()
PIDLock('admin')
service = NeonAdminHardwareAbstractionLayer(*args, **kwargs)
service.start()
wait_for_exit_signal()
Expand Down
15 changes: 15 additions & 0 deletions neon_enclosure/admin/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,18 @@ def start(self):
AdminPHAL.start(self)
LOG.info("Started Admin PHAL")
self.started.set()

def shutdown(self):
try:
AdminPHAL.shutdown(self)
except Exception as e:
LOG.exception(e)
# TODO: Below should be implemented in ovos-PHAL directly
for service, clazz in self.drivers.items():
try:
if hasattr(clazz, 'shutdown'):
LOG.debug(f"Shutting Down {service}")
clazz.shutdown()
except Exception as e:
LOG.error(f"Error shutting down {service}: {e}")
del clazz
25 changes: 21 additions & 4 deletions neon_enclosure/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
# 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 threading import Event

from threading import Event
from ovos_PHAL import PHAL
from ovos_plugin_manager.phal import find_phal_plugins
from time import time
from mycroft_bus_client import Message
from ovos_bus_client.message import Message
from ovos_utils.log import LOG


Expand All @@ -43,7 +43,7 @@ def __init__(self, skill_id="neon.phal", **kwargs):
self.config = self.config or dict() # TODO: Fixed in ovos_PHAL 0.0.5a1

def start(self):
LOG.info("Starting PHAL")
LOG.debug("Starting PHAL")
if self.config.get('wait_for_gui'):
LOG.info("Waiting for GUI Service to start")
timeout = time() + 30
Expand All @@ -53,7 +53,7 @@ def start(self):
LOG.debug('GUI Service is alive')
break
PHAL.start(self)
LOG.info("Started PHAL")
LOG.info(f"Started PHAL")
self.started.set()

def load_plugins(self):
Expand All @@ -75,3 +75,20 @@ def load_plugins(self):
except Exception:
LOG.exception(f"failed to load PHAL plugin: {name}")
continue

def shutdown(self):
LOG.info("Shutting Down")
try:
PHAL.shutdown(self)
except Exception as e:
LOG.exception(e)
# TODO: Below should be implemented in ovos-PHAL directly
for service, clazz in self.drivers.items():
try:
if hasattr(clazz, 'shutdown'):
LOG.debug(f"Shutting Down {service}")
clazz.shutdown()
except Exception as e:
LOG.error(f"Error shutting down {service}: {e}")
del clazz

1 change: 1 addition & 0 deletions requirements/docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ 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
neon-phal-plugin-monitoring~=0.0.1
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ovos_PHAL~=0.0.4
ovos-phal~=0.0.4
neon_utils[network]~=1.6
ovos_utils~=0.0.32
click~=8.0
Expand Down
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.0"
__version__ = "1.6.1"

0 comments on commit d6d8fce

Please sign in to comment.