-
Notifications
You must be signed in to change notification settings - Fork 2
resolve_resource_file core compatibility #73
Comments
New situation to consider here: I modified |
proposed order, until one is found:
when checking folders we can also:
|
That order makes sense to me, except I would put core/res above ovos packages to prevent the possibility of a dependency breaking core behavior (ovos_utils adds a new res and the core res is no longer matched).. I think a simple log of which absolute path was matched would be immensely helpful for debugging too. |
part of the purpose of ovos utils is to override mycroft-core resource files, the use case you describe really should use the resolve_resource_file method from core, not from ovos_utils |
Hmm, I guess from my perspective, ovos_utils vocab is essentially equivalent to mycroft-core in terms of priority and neon-core is a higher priority than those. I could see the argument for overriding resolve_resource_file in neon-core to work around this, but I also don't particularly like overloading that function name so much since it makes code less clear; it would be better IMO to have all modules (skills, speech, etc) import the same method from ovos_utils. |
in that case you could use the arg for extra paths to define a high priority neon path without doing that it is considered a "OVOS resource file", if the underlying core finds this unacceptable and there is chance of breakage with a next version, then that core either should not use this method (use its own) or pass the paths as described above |
That sounds fine to me; really, this only comes up in one or two places ( |
Regarding naming, would it make sense to refactor the method name here while we're making these changes? Main reasoning is that this will often be used in environments with Minor annoyance though, so this might not be worth the refactor. |
i forgot about indeed |
I think depreciating
|
From OVOS dev chat:
|
I think we may be able to close this issue. The solution I've reached in Neon is: audio_file = resolve_resource_file(snd_file, config=self.config_core)
if not audio_file:
audio_file = resolve_neon_resource_file(snd_file)
if not audio_file:
LOG.error(f"Could not resolve {snd_file}")
return I think it's up to the skill/module author to scope where to search for resource files (mycroft, ovos, neon, etc) |
With
neon
,ovos
,chatterbox
, andmycroft
(orholmesV
) cores now installable as different packages, resource files have more locations to be bundled.resolve_resource_file
currently checks formycroft
defaults.A few potential solutions come to mind:
path
resolve_resource_file
to specify a root path (or package name to locate in thepath
)resolve_resource_file
somewhere and import that method (makes modules less universal)res
directories in some setpath
(s)The text was updated successfully, but these errors were encountered: