Skip to content

Commit

Permalink
Update init and deprecation logging to resolve test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Oct 25, 2023
1 parent 672b7e5 commit fd75f90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions neon_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# import sys

# from neon_core.config import setup_resolve_resource_file, get_core_version
from neon_core.config import setup_resolve_resource_file, get_core_version
from os.path import dirname


Expand All @@ -37,7 +37,7 @@
# sys.path.append(NEON_ROOT_PATH)

CORE_VERSION_STR = "" # get_core_version()
# setup_resolve_resource_file()
setup_resolve_resource_file()

__all__ = ['NEON_ROOT_PATH',
'CORE_VERSION_STR']
5 changes: 3 additions & 2 deletions neon_core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ def setup_resolve_resource_file():
"""
from ovos_utils.log import log_deprecation
from neon_utils.file_utils import resolve_neon_resource_file
log_deprecation("This method is deprecated; resource resolution is handled "
"automatically.", "23.12.1")

def patched_resolve_resource_file(res_name):
from mycroft.util.file_utils import resolve_resource_file
log_deprecation("This method is deprecated; use "
"`ovos_utils.file_utils.resolve_resource_file.",
"23.12.1")
resource = resolve_neon_resource_file(res_name) or \
resolve_resource_file(res_name)
return resource
Expand Down

0 comments on commit fd75f90

Please sign in to comment.