Skip to content

Commit

Permalink
Update ovos-workshop dependency
Browse files Browse the repository at this point in the history
Resolve and patch deprecation warnings
  • Loading branch information
NeonDaniel committed Dec 29, 2023
1 parent a61da61 commit 2f9c303
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions neon_utils/skills/neon_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,22 +546,24 @@ def _init_settings(self):
"""
from neon_utils.configuration_utils import dict_update_keys
super()._init_settings()
skill_settings = get_local_settings(self.settings_path)
settings_from_disk = dict(skill_settings)
self.settings = dict_update_keys(skill_settings,
settings_from_disk = dict(self.settings)
self.settings = dict_update_keys(self.settings,
self._read_default_settings())
if self.settings != settings_from_disk:
if isinstance(self.settings, JsonStorage):
self.settings.store()
else:
with open(self.settings_path, "w+") as f:
json.dump(self.settings, f, indent=4)
LOG.info("Updated default settings from skill metadata")
self.settings.store()

self._initial_settings = dict(self.settings)

def _init_settings_manager(self):
# TODO: Same as upstream implementation?
from ovos_workshop.settings import SkillSettingsManager
self.settings_manager = SkillSettingsManager(self)
def _handle_converse_request(self, message: Message):
# TODO: Remove patch after ovos-core 0.0.8
if message.msg_type == "skill.converse.request" and \
message.data.get('skill_id') != self.skill_id:
# Legacy request not for Neon
return
if message.msg_type == "skill.converse.request":
message.msg_type = "neon.converse.request"
BaseSkill._handle_converse_request(self, message)

def _read_default_settings(self):
from neon_utils.configuration_utils import parse_skill_default_settings
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ovos-lingua-franca~=0.4
ovos_utils~=0.0.35
geopy~=2.1
ovos-config~=0.0.9
ovos-workshop~=0.0.12
ovos-workshop~=0.0.15

0 comments on commit 2f9c303

Please sign in to comment.