Skip to content

Commit

Permalink
Merge pull request #293 from OpenVoiceOS/release-0.3.7a1
Browse files Browse the repository at this point in the history
Release 0.3.7a1
  • Loading branch information
JarbasAl authored Nov 5, 2024
2 parents 24fdb56 + 573cb15 commit 0b4f9df
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 30 deletions.
17 changes: 14 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# Changelog

## [0.3.6a1](https://github.com/OpenVoiceOS/ovos-utils/tree/0.3.6a1) (2024-10-21)
## [0.3.7a1](https://github.com/OpenVoiceOS/ovos-utils/tree/0.3.7a1) (2024-11-04)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-utils/compare/0.3.5...0.3.6a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-utils/compare/0.3.6...0.3.7a1)

**Fixed bugs:**

- Should be 0.1.0; is there a bug in the version automation? [\#244](https://github.com/OpenVoiceOS/ovos-utils/issues/244)

**Closed issues:**

- system.py - Added method should get a docstring and type annotation [\#243](https://github.com/OpenVoiceOS/ovos-utils/issues/243)
- skills.py - This should get type annotations and a docstring [\#242](https://github.com/OpenVoiceOS/ovos-utils/issues/242)
- setup.py - This should be updated to an absolute path for automations [\#240](https://github.com/OpenVoiceOS/ovos-utils/issues/240)

**Merged pull requests:**

- Update ovos-workshop requirement from \<1.0.0,\>=0.0.13 to \>=0.0.13,\<2.0.0 in /requirements [\#289](https://github.com/OpenVoiceOS/ovos-utils/pull/289) ([dependabot[bot]](https://github.com/apps/dependabot))
- Update ovos-workshop requirement from \<2.0.0,\>=0.0.13 to \>=0.0.13,\<3.0.0 in /requirements [\#292](https://github.com/OpenVoiceOS/ovos-utils/pull/292) ([dependabot[bot]](https://github.com/apps/dependabot))
- chore: update docstrings and type hints [\#291](https://github.com/OpenVoiceOS/ovos-utils/pull/291) ([mikejgray](https://github.com/mikejgray))



Expand Down
10 changes: 9 additions & 1 deletion ovos_utils/skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ def check_class(cls):
return set(check_class(obj.__class__))


def skills_loaded(bus=None):
def skills_loaded(bus=None) -> bool:
"""
Await a reply from mycroft.skills.all_loaded to check if all skills are
loaded.
@param bus: OVOS messagebus client
@return: Are all skills loaded? True/False
"""
if bus is None:
return False
reply = wait_for_reply('mycroft.skills.all_loaded',
'mycroft.skills.all_loaded.response',
bus=bus)
Expand Down
28 changes: 5 additions & 23 deletions ovos_utils/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

from ovos_utils.log import LOG, deprecated

def is_running_from_module(module_name):
def is_running_from_module(module_name: str) -> bool:
"""
Check and see if the code is being run from a specific module
@param module_name: name of the module to check for
"""
# Stack:
# [0] - _log()
# [1] - debug(), info(), warning(), or error()
Expand Down Expand Up @@ -91,28 +95,6 @@ def restart_mycroft_service(sudo=True, user=False):
"""
restart_service("mycroft.service", sudo=sudo, user=user)

def is_running_from_module(module_name):
# Stack:
# [0] - _log()
# [1] - debug(), info(), warning(), or error()
# [2] - caller
stack = inspect.stack()

# Record:
# [0] - frame object
# [1] - filename
# [2] - line number
# [3] - function
# ...
for record in stack[2:]:
mod = inspect.getmodule(record[0])
name = mod.__name__ if mod else ''
# module name in file path of caller
# or import name matches module name
if f"/{module_name}/" in record[1] or \
name.startswith(module_name.replace("-", "_").replace(" ", "_")):
return True
return False

def restart_service(service_name, sudo=True, user=False):
"""
Expand Down
4 changes: 2 additions & 2 deletions ovos_utils/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 0
VERSION_MINOR = 3
VERSION_BUILD = 6
VERSION_ALPHA = 0
VERSION_BUILD = 7
VERSION_ALPHA = 1
# END_VERSION_BLOCK
2 changes: 1 addition & 1 deletion requirements/extras.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rapidfuzz>=3.6,<4.0
ovos-plugin-manager>=0.0.25,<1.0.0
ovos-config>=0.0.12,<1.0.0
ovos-workshop>=0.0.13,<2.0.0
ovos-workshop>=0.0.13,<3.0.0
ovos_bus_client>=0.0.8,<1.0.0

0 comments on commit 0b4f9df

Please sign in to comment.