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 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 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) 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 1e7a78c..1154fe6 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 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 @@ -15,12 +15,12 @@ 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): 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)