From 1351e221e9046f9d077b1c03e315ffcf292a233a Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 2 Apr 2024 09:53:10 -0700 Subject: [PATCH 1/3] Refactor skill code into a directory for easier local installation --- requirements.txt | 3 ++- setup.py | 7 +++---- __init__.py => skill_alerts/__init__.py | 0 {util => skill_alerts/util}/__init__.py | 0 {util => skill_alerts/util}/alert.py | 0 {util => skill_alerts/util}/alert_manager.py | 0 {util => skill_alerts/util}/parse_utils.py | 0 {util => skill_alerts/util}/ui_models.py | 0 test/test_skill.py | 1 - 9 files changed, 5 insertions(+), 6 deletions(-) rename __init__.py => skill_alerts/__init__.py (100%) rename {util => skill_alerts/util}/__init__.py (100%) rename {util => skill_alerts/util}/alert.py (100%) rename {util => skill_alerts/util}/alert_manager.py (100%) rename {util => skill_alerts/util}/parse_utils.py (100%) rename {util => skill_alerts/util}/ui_models.py (100%) diff --git a/requirements.txt b/requirements.txt index 4fe8fa15..815a7e84 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ json_database~=0.5 neon-utils~=1.2 combo_lock~=0.2 ovos-utils~=0.0, >=0.0.32 -ovos-bus-client~=0.0.3 \ No newline at end of file +ovos-bus-client~=0.0.3 +adapt-parser>=0.5,<2.0 diff --git a/setup.py b/setup.py index 1236fe9e..dad19880 100644 --- a/setup.py +++ b/setup.py @@ -25,14 +25,14 @@ # 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 setuptools from setuptools import setup from os import getenv, path, walk SKILL_NAME = "skill-alerts" SKILL_PKG = SKILL_NAME.replace('-', '_') # skill_id=package_name:SkillClass -PLUGIN_ENTRY_POINT = f'{SKILL_NAME}.neongeckocom={SKILL_PKG}:AlertSkill' +PLUGIN_ENTRY_POINT = f'{SKILL_NAME}.neongeckocom={SKILL_PKG}.skill_alerts:AlertSkill' BASE_PATH = path.abspath(path.dirname(__file__)) @@ -94,8 +94,7 @@ def find_resource_files(): author_email='developers@neon.ai', long_description=long_description, long_description_content_type="text/markdown", - package_dir={SKILL_PKG: ""}, - packages=[SKILL_PKG, f"{SKILL_PKG}.util"], + packages=setuptools.find_packages(), package_data={SKILL_PKG: find_resource_files()}, include_package_data=True, entry_points={"ovos.plugin.skill": PLUGIN_ENTRY_POINT} diff --git a/__init__.py b/skill_alerts/__init__.py similarity index 100% rename from __init__.py rename to skill_alerts/__init__.py diff --git a/util/__init__.py b/skill_alerts/util/__init__.py similarity index 100% rename from util/__init__.py rename to skill_alerts/util/__init__.py diff --git a/util/alert.py b/skill_alerts/util/alert.py similarity index 100% rename from util/alert.py rename to skill_alerts/util/alert.py diff --git a/util/alert_manager.py b/skill_alerts/util/alert_manager.py similarity index 100% rename from util/alert_manager.py rename to skill_alerts/util/alert_manager.py diff --git a/util/parse_utils.py b/skill_alerts/util/parse_utils.py similarity index 100% rename from util/parse_utils.py rename to skill_alerts/util/parse_utils.py diff --git a/util/ui_models.py b/skill_alerts/util/ui_models.py similarity index 100% rename from util/ui_models.py rename to skill_alerts/util/ui_models.py diff --git a/test/test_skill.py b/test/test_skill.py index df430568..fe7e5c83 100644 --- a/test/test_skill.py +++ b/test/test_skill.py @@ -24,7 +24,6 @@ import lingua_franca import pytest import random -import sys import shutil import unittest import datetime as dt From 9989080d64ff0624e92321b7ee8a464e3d85295a Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 2 Apr 2024 16:54:14 +0000 Subject: [PATCH 2/3] Update skill.json --- skill.json | 1 + 1 file changed, 1 insertion(+) diff --git a/skill.json b/skill.json index 2325bed0..acddb14f 100644 --- a/skill.json +++ b/skill.json @@ -30,6 +30,7 @@ "systemDeps": false, "requirements": { "python": [ + "adapt-parser>=0.5,<2.0", "combo_lock~=0.2", "json_database~=0.5", "neon-utils~=1.2", From 8add90dc40039bc92c556513d501f8b07f17ae7c Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 2 Apr 2024 10:00:03 -0700 Subject: [PATCH 3/3] Fix invalid change in `setup.py` --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index dad19880..a08c0add 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ SKILL_NAME = "skill-alerts" SKILL_PKG = SKILL_NAME.replace('-', '_') # skill_id=package_name:SkillClass -PLUGIN_ENTRY_POINT = f'{SKILL_NAME}.neongeckocom={SKILL_PKG}.skill_alerts:AlertSkill' +PLUGIN_ENTRY_POINT = f'{SKILL_NAME}.neongeckocom={SKILL_PKG}:AlertSkill' BASE_PATH = path.abspath(path.dirname(__file__))