Skip to content

Commit

Permalink
Remove deprecated patches
Browse files Browse the repository at this point in the history
Add log to troubleshoot test failure
  • Loading branch information
NeonDaniel committed Dec 29, 2023
1 parent 2f9c303 commit df2c690
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
13 changes: 0 additions & 13 deletions neon_utils/skills/mycroft_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ def __init__(self, name=None, bus=None, *args, **kwargs):
self._speak_timeout = 30
self._get_response_timeout = 15 # 10 for listener, 5 for STT, then timeout

@property
def settings_path(self):
# TODO: Deprecate backwards-compat. wrapper after ovos-workshop 0.0.13
try:
return super().settings_path
except AttributeError:
return super()._settings_path

@property
def location(self):
"""
Expand All @@ -90,11 +82,6 @@ def _init_settings(self):
json.dump(self.settings, f, indent=4)
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 _read_default_settings(self):
yaml_path = os.path.join(self.root_dir, "settingsmeta.yml")
json_path = os.path.join(self.root_dir, "settingsmeta.json")
Expand Down
22 changes: 3 additions & 19 deletions neon_utils/skills/neon_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,6 @@ def initialize(self):
self.schedule_event(self._write_cache_on_disk, CACHE_TIME_OFFSET,
name="neon.load_cache_on_disk")

@property
def settings_path(self):
# TODO: Deprecate backwards-compat. wrapper after ovos-workshop 0.0.13
try:
return super().settings_path
except AttributeError:
return super()._settings_path

@property
def resources(self):
# TODO: Deprecate backwards-compat. wrapper after ovos-workshop 0.0.13
try:
return super().resources
except AttributeError:
return super()._resources

@property
# @deprecated("Call `dateutil.tz.gettz` directly", "2.0.0")
def sys_tz(self):
Expand Down Expand Up @@ -545,15 +529,15 @@ def _init_settings(self):
Extends the default method to handle settingsmeta defaults locally
"""
from neon_utils.configuration_utils import dict_update_keys
super()._init_settings()
BaseSkill._init_settings(self)
settings_from_disk = dict(self.settings)
self.settings = dict_update_keys(self.settings,
self._read_default_settings())
if self.settings != settings_from_disk:
LOG.info("Updated default settings from skill metadata")
self.settings.store()

self._initial_settings = dict(self.settings)
self._initial_settings = dict(self.settings)
LOG.info(f"Skill initialized with settings: {self.settings}")

def _handle_converse_request(self, message: Message):
# TODO: Remove patch after ovos-core 0.0.8
Expand Down

0 comments on commit df2c690

Please sign in to comment.