From 4a48909029ae702052a2c76963894a5503799db3 Mon Sep 17 00:00:00 2001 From: jarbasai Date: Thu, 9 Feb 2023 21:40:45 +0000 Subject: [PATCH 1/8] feat/runtime_requirements --- __init__.py | 14 ++++++++++++++ requirements.txt | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index c950a2b..7f68d9e 100644 --- a/__init__.py +++ b/__init__.py @@ -16,6 +16,8 @@ from mycroft import MycroftSkill, intent_handler from mycroft.skills import skill_api_method +from ovos_utils.process_utils import RuntimeRequirements +from ovos_utils import classproperty class CameraSkill(MycroftSkill): @@ -28,6 +30,18 @@ def __init__(self): self.camera_mode = None self.save_folder = None + @classproperty + def runtime_requirements(self): + return RuntimeRequirements(internet_before_load=False, + network_before_load=False, + gui_before_load=True, + requires_internet=False, + requires_network=False, + requires_gui=True, + no_internet_fallback=True, + no_network_fallback=True, + no_gui_fallback=False) + def initialize(self): """Perform any initial setup.""" self.save_folder = os.path.expanduser("~/Pictures") diff --git a/requirements.txt b/requirements.txt index 8d1c8b6..855e4f1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ - +ovos-utils~=0.0, >=0.0.28a4 +ovos_workshop~=0.0, >=0.0.11a4 \ No newline at end of file From 3bc3e5a33eb5b31bb74772ee8f5ba18b9f4436a2 Mon Sep 17 00:00:00 2001 From: jarbasai Date: Thu, 9 Feb 2023 23:54:44 +0000 Subject: [PATCH 2/8] fix test --- test/unittests/test_skill_loading.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unittests/test_skill_loading.py b/test/unittests/test_skill_loading.py index 1e7a78c..87c6ced 100644 --- a/test/unittests/test_skill_loading.py +++ b/test/unittests/test_skill_loading.py @@ -6,7 +6,7 @@ from adapt.engine import IntentDeterminationEngine from adapt.intent import IntentBuilder -from ovos_skill_camera import VolumeSkill, create_skill +from ovos_skill_camera import CameraSkill, create_skill from ovos_plugin_manager.skills import find_skill_plugins from ovos_utils.messagebus import FakeBus from mycroft.skills.skill_loader import PluginSkillLoader, SkillLoader @@ -20,7 +20,7 @@ def setUpClass(self): def test_from_class(self): bus = FakeBus() - skill = VolumeSkill() + skill = CameraSkill() skill._startup(bus, self.skill_id) self.assertEqual(skill.bus, bus) self.assertEqual(skill.skill_id, self.skill_id) From 592fe9af33a83bcee566ce2b6072713914250949 Mon Sep 17 00:00:00 2001 From: jarbasai Date: Thu, 9 Feb 2023 23:55:31 +0000 Subject: [PATCH 3/8] fix test --- test/plugin_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin_tests.py b/test/plugin_tests.py index 50afc71..a9cd4f0 100644 --- a/test/plugin_tests.py +++ b/test/plugin_tests.py @@ -6,7 +6,7 @@ class TestPlugin(unittest.TestCase): @classmethod def setUpClass(self): - self.skill_id = "ovos-skill-camera.OpenVoiceOS" + self.skill_id = 'skill-ovos-camera.openvoiceos' def test_find_plugin(self): plugins = find_skill_plugins() From ea98bdb3d1770d7c67307e06acaa3bc62af09905 Mon Sep 17 00:00:00 2001 From: jarbasai Date: Thu, 9 Feb 2023 23:56:16 +0000 Subject: [PATCH 4/8] fix test --- .github/workflows/license_tests.yml | 41 ----------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .github/workflows/license_tests.yml diff --git a/.github/workflows/license_tests.yml b/.github/workflows/license_tests.yml deleted file mode 100644 index 78ed90c..0000000 --- a/.github/workflows/license_tests.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Run License Tests -on: - push: - branches: - - master - pull_request: - branches: - - dev - paths: - - 'requirements.txt' - - 'setup.py' - workflow_dispatch: - -jobs: - license_tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install Build Tools - run: | - python -m pip install build wheel - - name: Install System Dependencies - run: | - sudo apt-get update - sudo apt install python3-dev swig libssl-dev - - name: Install core repo - run: | - pip install . - - name: Install licheck - run: | - pip install git+https://github.com/NeonJarbas/lichecker - - name: Install test dependencies - run: | - pip install pytest pytest-timeout pytest-cov - - name: Test Licenses - run: | - pytest test/license_tests.py \ No newline at end of file From 751d794031435e1af79b4c3a429322edf89b5fbc Mon Sep 17 00:00:00 2001 From: jarbasai Date: Thu, 9 Feb 2023 23:57:54 +0000 Subject: [PATCH 5/8] fix test --- test/osm_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/osm_tests.py b/test/osm_tests.py index 2838ac9..d6e2d8e 100644 --- a/test/osm_tests.py +++ b/test/osm_tests.py @@ -6,12 +6,12 @@ from ovos_skills_manager import SkillEntry branch = "dev" -url = f"https://github.com/OpenVoiceOS/ovos-skill-camera@{branch}" +url = f"https://github.com/OpenVoiceOS/skill-ovos-camera@{branch}" class TestOSM(unittest.TestCase): @classmethod def setUpClass(self): - self.skill_id = "ovos-skill-camera.OpenVoiceOS" + self.skill_id = 'skill-ovos-camera.openvoiceos' def test_osm_install(self): skill = SkillEntry.from_github_url(url) From 0b45d03c18554cdd2780038a0b6658685e01c9ad Mon Sep 17 00:00:00 2001 From: jarbasai Date: Fri, 10 Feb 2023 00:00:20 +0000 Subject: [PATCH 6/8] fix test --- test/unittests/test_skill_loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittests/test_skill_loading.py b/test/unittests/test_skill_loading.py index 87c6ced..14398e5 100644 --- a/test/unittests/test_skill_loading.py +++ b/test/unittests/test_skill_loading.py @@ -6,7 +6,7 @@ from adapt.engine import IntentDeterminationEngine from adapt.intent import IntentBuilder -from ovos_skill_camera import CameraSkill, create_skill +from skill_ovos_camera import CameraSkill, create_skill from ovos_plugin_manager.skills import find_skill_plugins from ovos_utils.messagebus import FakeBus from mycroft.skills.skill_loader import PluginSkillLoader, SkillLoader From ab6ac78b657c1bf97572e3a69d76464b4f60e549 Mon Sep 17 00:00:00 2001 From: jarbasai Date: Fri, 10 Feb 2023 00:03:40 +0000 Subject: [PATCH 7/8] fix test --- test/plugin_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin_tests.py b/test/plugin_tests.py index a9cd4f0..50afc71 100644 --- a/test/plugin_tests.py +++ b/test/plugin_tests.py @@ -6,7 +6,7 @@ class TestPlugin(unittest.TestCase): @classmethod def setUpClass(self): - self.skill_id = 'skill-ovos-camera.openvoiceos' + self.skill_id = "ovos-skill-camera.OpenVoiceOS" def test_find_plugin(self): plugins = find_skill_plugins() From 7e5d6c881f0a07508300b8d3a93db77ba344fa5c Mon Sep 17 00:00:00 2001 From: jarbasai Date: Fri, 10 Feb 2023 00:07:11 +0000 Subject: [PATCH 8/8] fix test --- test/plugin_tests.py | 2 +- test/unittests/test_skill_loading.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plugin_tests.py b/test/plugin_tests.py index 50afc71..a9cd4f0 100644 --- a/test/plugin_tests.py +++ b/test/plugin_tests.py @@ -6,7 +6,7 @@ class TestPlugin(unittest.TestCase): @classmethod def setUpClass(self): - self.skill_id = "ovos-skill-camera.OpenVoiceOS" + self.skill_id = 'skill-ovos-camera.openvoiceos' def test_find_plugin(self): plugins = find_skill_plugins() diff --git a/test/unittests/test_skill_loading.py b/test/unittests/test_skill_loading.py index 14398e5..1154fe6 100644 --- a/test/unittests/test_skill_loading.py +++ b/test/unittests/test_skill_loading.py @@ -15,7 +15,7 @@ class TestSkillLoading(unittest.TestCase): @classmethod def setUpClass(self): - self.skill_id = "ovos-skill-camera.OpenVoiceOS" + self.skill_id = 'skill-ovos-camera.openvoiceos' self.path = dirname(dirname(dirname(__file__))) def test_from_class(self):