Skip to content

Commit

Permalink
Add config reference for backwards-compat (#171)
Browse files Browse the repository at this point in the history
* Add config reference for backwards-compat

* Fix config patching

* Update config patching in test_xdg.py

* Bump ovos-config dependency

Co-authored-by: Daniel McKnight <daniel@neon.ai>
  • Loading branch information
NeonDaniel and Daniel McKnight committed Jul 14, 2022
1 parent bcb7672 commit 52276a3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions mycroft/configuration/config.py
@@ -1,2 +1,3 @@
# backwards compat - moved to own python package
from ovos_config.config import *
from ovos_config.locations import DEFAULT_CONFIG
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Expand Up @@ -8,7 +8,7 @@ combo-lock~=0.2
PyYAML~=5.4
watchdog

ovos-config~=0.0.1
ovos-config~=0.0.1, >=0.0.4a3
ovos-utils~=0.0, >=0.0.22
ovos-plugin-manager~=0.0, >=0.0.18a8
ovos-stt-plugin-server~=0.0, >=0.0.2
Expand Down
6 changes: 3 additions & 3 deletions test/unittests/configuration/test_configuration.py
Expand Up @@ -31,9 +31,9 @@ def test_remote(self, mock_api):
self.assertEqual(rc['location']['city']['name'], 'Stockholm')

@patch('json.dump')
@patch('ovos_config.config.exists')
@patch('ovos_config.config.isfile')
@patch('ovos_config.config.load_commented_json')
@patch('ovos_config.models.exists')
@patch('ovos_config.models.isfile')
@patch('ovos_config.models.load_commented_json')
def test_local(self, mock_json_loader, mock_isfile, mock_exists,
mock_json_dump):
local_conf = {'answer': 42, 'falling_objects': ['flower pot', 'whale']}
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/util/test_xdg.py
Expand Up @@ -8,7 +8,7 @@

class TestXdg(TestCase):

@mock.patch('ovos_utils.configuration.get_xdg_base')
@mock.patch('ovos_config.meta.get_xdg_base')
def test_base_folder(self, mock_folder):
mock_folder.return_value = "testcroft"
self.assertTrue(get_xdg_config_save_path().endswith("/testcroft"))
Expand Down

0 comments on commit 52276a3

Please sign in to comment.