From 97c4c7be2b6a9b4a29425126a3acaba1c639d9de Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:26:16 -0800 Subject: [PATCH 1/6] Support ovos-utils 0.1 (#45) * Update dependencies to support ovos-utils 0.1 * Update skill.json * Update tests to extend base class from Minerva * Fix empty "on" dialog file --------- Co-authored-by: Daniel McKnight Co-authored-by: NeonDaniel --- locale/en-us/dialog/on.dialog | 1 + requirements.txt | 2 +- requirements/test.txt | 1 + setup.py | 1 + skill.json | 2 +- test/test_skill.py | 48 +++-------------------------------- 6 files changed, 8 insertions(+), 47 deletions(-) create mode 100644 requirements/test.txt diff --git a/locale/en-us/dialog/on.dialog b/locale/en-us/dialog/on.dialog index e69de29..e8fd903 100644 --- a/locale/en-us/dialog/on.dialog +++ b/locale/en-us/dialog/on.dialog @@ -0,0 +1 @@ +on \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index b0495d3..e802ece 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ neon-utils[network]~=1.0 -ovos-utils~=0.0.28 +ovos-utils~=0.0, >=0.0.28 ovos-bus-client~=0.0.3 diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..55bb597 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1 @@ +neon-minerva[padatious]~=0.1,>=0.1.1a5 diff --git a/setup.py b/setup.py index 5b47889..1d94fd3 100644 --- a/setup.py +++ b/setup.py @@ -89,6 +89,7 @@ def find_resource_files(): url=f'https://github.com/NeonGeckoCom/{SKILL_NAME}', license='BSD-3-Clause', install_requires=get_requirements("requirements.txt"), + extras_require={"test": get_requirements("requirements/test.txt")}, author='Neongecko', author_email='developers@neon.ai', long_description=long_description, diff --git a/skill.json b/skill.json index 3aa9387..243f6de 100644 --- a/skill.json +++ b/skill.json @@ -15,7 +15,7 @@ "python": [ "neon-utils[network]~=1.0", "ovos-bus-client~=0.0.3", - "ovos-utils~=0.0.28" + "ovos-utils~=0.0, >=0.0.28" ], "system": {}, "skill": [] diff --git a/test/test_skill.py b/test/test_skill.py index 1022c38..13da527 100644 --- a/test/test_skill.py +++ b/test/test_skill.py @@ -25,55 +25,13 @@ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import os.path -import shutil -import unittest -import pytest -import json - -from os import mkdir -from os.path import dirname, join, exists -from mock import Mock -from mycroft_bus_client import Message -from ovos_utils.messagebus import FakeBus - -from mycroft.skills.skill_loader import SkillLoader - - -class TestSkillMethods(unittest.TestCase): - @classmethod - def setUpClass(cls) -> None: - bus = FakeBus() - bus.run_in_thread() - skill_loader = SkillLoader(bus, dirname(dirname(__file__))) - skill_loader.load() - cls.skill = skill_loader.instance - - # Define a directory to use for testing - cls.test_fs = join(dirname(__file__), "skill_fs") - if not exists(cls.test_fs): - mkdir(cls.test_fs) - - # Override the fs paths to use the test directory - cls.skill.settings_write_path = cls.test_fs - cls.skill.file_system.path = cls.test_fs - - # Override speak and speak_dialog to test passed arguments - cls.skill.speak = Mock() - cls.skill.speak_dialog = Mock() - - def setUp(self): - self.skill.speak.reset_mock() - self.skill.speak_dialog.reset_mock() +import pytest - def tearDown(self) -> None: - self.skill.bus.remove_all_listeners("neon.wake_words_state") +from neon_minerva.tests.skill_unit_test_base import SkillTestCase - @classmethod - def tearDownClass(cls) -> None: - shutil.rmtree(cls.test_fs) +class TestSkillMethods(SkillTestCase): def test_00_skill_init(self): # Test any parameters expected to be set in init or initialize methods from neon_utils.skills import NeonSkill From 907606802a1f6cc5cd17fbcbf266ef05ee4c8e79 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 6 Feb 2024 02:26:30 +0000 Subject: [PATCH 2/6] Increment Version to 1.0.1a1 --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 0fd4bc8..4fb316f 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "1.0.0" +__version__ = "1.0.1a1" From 9086a1a52990106c3fb59677c3002349cc26b8d6 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:59:12 -0700 Subject: [PATCH 3/6] Update test dependency to stable version (#46) Co-authored-by: Daniel McKnight --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 55bb597..19363c1 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1 +1 @@ -neon-minerva[padatious]~=0.1,>=0.1.1a5 +neon-minerva[padatious]~=0.2 From aa50a36627b1fa7379b19ea3c7dbe5d5efacc405 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 3 Apr 2024 18:59:25 +0000 Subject: [PATCH 4/6] Increment Version to 1.0.1a2 --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 4fb316f..853f4ad 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "1.0.1a1" +__version__ = "1.0.1a2" From 44720cad93ec26308a3a8869de43dd7ff12309b2 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 3 Apr 2024 19:34:15 +0000 Subject: [PATCH 5/6] Increment Version to 1.0.1 --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 853f4ad..3c9aede 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "1.0.1a2" +__version__ = "1.0.1" From 2223d5758fb85c594a69d6474af972a52bc48c48 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 3 Apr 2024 19:34:37 +0000 Subject: [PATCH 6/6] Update Changelog --- CHANGELOG.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e38a25..7857313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,20 @@ # Changelog -## [0.4.1a3](https://github.com/NeonGeckoCom/skill-launcher/tree/0.4.1a3) (2023-06-15) +## [1.0.1a2](https://github.com/NeonGeckoCom/skill-launcher/tree/1.0.1a2) (2024-04-03) -[Full Changelog](https://github.com/NeonGeckoCom/skill-launcher/compare/0.4.1a2...0.4.1a3) +[Full Changelog](https://github.com/NeonGeckoCom/skill-launcher/compare/1.0.1a1...1.0.1a2) **Merged pull requests:** -- Deprecate create\_skill method and Update \_\_init\_\_ for best practices [\#43](https://github.com/NeonGeckoCom/skill-launcher/pull/43) ([NeonDaniel](https://github.com/NeonDaniel)) +- Update test dependency to stable version [\#46](https://github.com/NeonGeckoCom/skill-launcher/pull/46) ([NeonDaniel](https://github.com/NeonDaniel)) -## [0.4.1a2](https://github.com/NeonGeckoCom/skill-launcher/tree/0.4.1a2) (2023-06-14) +## [1.0.1a1](https://github.com/NeonGeckoCom/skill-launcher/tree/1.0.1a1) (2024-02-06) -[Full Changelog](https://github.com/NeonGeckoCom/skill-launcher/compare/0.4.0...0.4.1a2) +[Full Changelog](https://github.com/NeonGeckoCom/skill-launcher/compare/1.0.0...1.0.1a1) **Merged pull requests:** -- Update GH automation to best practices [\#42](https://github.com/NeonGeckoCom/skill-launcher/pull/42) ([NeonDaniel](https://github.com/NeonDaniel)) -- Refactor mycroft-messagebus-client to ovos-bus-client [\#40](https://github.com/NeonGeckoCom/skill-launcher/pull/40) ([NeonDaniel](https://github.com/NeonDaniel)) +- Support ovos-utils 0.1 [\#45](https://github.com/NeonGeckoCom/skill-launcher/pull/45) ([NeonDaniel](https://github.com/NeonDaniel))