From 98ddce55ea05a2d0f2f1e1bac5d3a51e210e998a Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:47:43 -0800 Subject: [PATCH 01/14] Make skill references compatible with ovos-workshop changes (#15) * Make skill references compatible with ovos-workshop changes * manually increment version to test changes --------- Co-authored-by: Daniel McKnight --- neon_minerva/tests/test_skill_resources.py | 15 +++++++++++---- neon_minerva/version.py | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/neon_minerva/tests/test_skill_resources.py b/neon_minerva/tests/test_skill_resources.py index 0dedf76..60e9e48 100644 --- a/neon_minerva/tests/test_skill_resources.py +++ b/neon_minerva/tests/test_skill_resources.py @@ -81,10 +81,17 @@ def _on_message(cls, message): def test_skill_setup(self): self.assertEqual(self.skill.skill_id, self.test_skill_id) - self.assertEqual(set([self.skill._core_lang] + - self.skill._secondary_langs), - set(self.supported_languages), - f"expected={self.supported_languages}") + if hasattr(self.skill, "_core_lang"): + # ovos-workshop < 0.0.15 + self.assertEqual(set([self.skill._core_lang] + + self.skill._secondary_langs), + set(self.supported_languages), + f"expected={self.supported_languages}") + else: + self.assertEqual(set([self.skill.core_lang] + + self.skill.secondary_langs), + set(self.supported_languages), + f"expected={self.supported_languages}") def test_intent_registration(self): registered_adapt = list() diff --git a/neon_minerva/version.py b/neon_minerva/version.py index 4488dcb..fa01ac9 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.0" +__version__ = "0.1.1a1" From 573d7c2b99ec81224fdc079f3dd4e90d11f150c2 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 2 Jan 2024 22:48:01 +0000 Subject: [PATCH 02/14] Increment Version to 0.1.1a2 --- neon_minerva/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_minerva/version.py b/neon_minerva/version.py index fa01ac9..f948c1a 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.1a1" +__version__ = "0.1.1a2" From 074ad7ec5bdc7a717dcacb3fcff58902b488ded6 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 15 Jan 2024 13:12:37 -0800 Subject: [PATCH 03/14] Implement CommonQuery tests from shared GH action with test class (#16) adapted from NeonCore Co-authored-by: Daniel McKnight --- neon_minerva/intent_services/common_query.py | 179 +++++++++++++++++++ neon_minerva/tests/test_skill_intents.py | 53 +++++- 2 files changed, 230 insertions(+), 2 deletions(-) create mode 100644 neon_minerva/intent_services/common_query.py diff --git a/neon_minerva/intent_services/common_query.py b/neon_minerva/intent_services/common_query.py new file mode 100644 index 0000000..290550d --- /dev/null +++ b/neon_minerva/intent_services/common_query.py @@ -0,0 +1,179 @@ + +import time +from dataclasses import dataclass +from threading import Event +from typing import Dict + +from ovos_utils import flatten_list +from ovos_utils.log import LOG +from neon_minerva.intent_services import IntentMatch + + +EXTENSION_TIME = 15 +MIN_RESPONSE_WAIT = 3 + + +@dataclass +class Query: + session_id: str + query: str + replies: list = None + extensions: list = None + query_time: float = time.time() + timeout_time: float = time.time() + 1 + responses_gathered: Event = Event() + completed: Event = Event() + answered: bool = False + + +class CommonQuery: + def __init__(self, bus): + self.bus = bus + self.skill_id = "common_query.test" # fake skill + self.active_queries: Dict[str, Query] = dict() + self._vocabs = {} + self.bus.on('question:query.response', self.handle_query_response) + self.bus.on('common_query.question', self.handle_question) + # TODO: Register available CommonQuery skills + + def is_question_like(self, utterance, lang): + # skip utterances with less than 3 words + if len(utterance.split(" ")) < 3: + return False + return True + + def match(self, utterances, lang, message): + """Send common query request and select best response + + Args: + utterances (list): List of tuples, + utterances and normalized version + lang (str): Language code + message: Message for session context + Returns: + IntentMatch or None + """ + # we call flatten in case someone is sending the old style list of tuples + utterances = flatten_list(utterances) + match = None + for utterance in utterances: + if self.is_question_like(utterance, lang): + message.data["lang"] = lang # only used for speak + message.data["utterance"] = utterance + answered = self.handle_question(message) + if answered: + match = IntentMatch('CommonQuery', None, {}, None, + utterance) + break + return match + + def handle_question(self, message): + """ + Send the phrase to the CommonQuerySkills and prepare for handling + the replies. + """ + utt = message.data.get('utterance') + sid = "test_session" + # TODO: Why are defaults not creating new objects on init? + query = Query(session_id=sid, query=utt, replies=[], extensions=[], + query_time=time.time(), timeout_time=time.time() + 1, + responses_gathered=Event(), completed=Event(), + answered=False) + assert query.responses_gathered.is_set() is False + assert query.completed.is_set() is False + self.active_queries[sid] = query + + LOG.info(f'Searching for {utt}') + # Send the query to anyone listening for them + msg = message.reply('question:query', data={'phrase': utt}) + if "skill_id" not in msg.context: + msg.context["skill_id"] = self.skill_id + self.bus.emit(msg) + + query.timeout_time = time.time() + 1 + timeout = False + while not query.responses_gathered.wait(EXTENSION_TIME): + if time.time() > query.timeout_time + 1: + LOG.debug(f"Timeout gathering responses ({query.session_id})") + timeout = True + break + + # forcefully timeout if search is still going + if timeout: + LOG.warning(f"Timed out getting responses for: {query.query}") + self._query_timeout(message) + if not query.completed.wait(10): + raise TimeoutError("Timed out processing responses") + answered = bool(query.answered) + self.active_queries.pop(sid) + LOG.debug(f"answered={answered}|" + f"remaining active_queries={len(self.active_queries)}") + return answered + + def handle_query_response(self, message): + search_phrase = message.data['phrase'] + skill_id = message.data['skill_id'] + searching = message.data.get('searching') + answer = message.data.get('answer') + + query = self.active_queries.get("test_session") + if not query: + LOG.warning(f"No active query for: {search_phrase}") + # Manage requests for time to complete searches + if searching: + LOG.debug(f"{skill_id} is searching") + # request extending the timeout by EXTENSION_TIME + query.timeout_time = time.time() + EXTENSION_TIME + # TODO: Perhaps block multiple extensions? + if skill_id not in query.extensions: + query.extensions.append(skill_id) + else: + # Search complete, don't wait on this skill any longer + if answer: + LOG.info(f'Answer from {skill_id}') + query.replies.append(message.data) + + # Remove the skill from list of timeout extensions + if skill_id in query.extensions: + LOG.debug(f"Done waiting for {skill_id}") + query.extensions.remove(skill_id) + + time_to_wait = query.query_time + MIN_RESPONSE_WAIT - time.time() + if time_to_wait > 0: + LOG.debug(f"Waiting {time_to_wait}s before checking extensions") + query.responses_gathered.wait(time_to_wait) + # not waiting for any more skills + if not query.extensions: + LOG.debug(f"No more skills to wait for ({query.session_id})") + query.responses_gathered.set() + + def _query_timeout(self, message): + query = self.active_queries.get("test_session") + LOG.info(f'Check responses with {len(query.replies)} replies') + search_phrase = message.data.get('phrase', "") + if query.extensions: + query.extensions = [] + + # Look at any replies that arrived before the timeout + # Find response(s) with the highest confidence + best = None + ties = [] + for response in query.replies: + if not best or response['conf'] > best['conf']: + best = response + ties = [] + elif response['conf'] == best['conf']: + ties.append(response) + + if best: + # invoke best match + LOG.info('Handling with: ' + str(best['skill_id'])) + cb = best.get('callback_data') or {} + self.bus.emit(message.forward('question:action', + data={'skill_id': best['skill_id'], + 'phrase': search_phrase, + 'callback_data': cb})) + query.answered = True + else: + query.answered = False + query.completed.set() diff --git a/neon_minerva/tests/test_skill_intents.py b/neon_minerva/tests/test_skill_intents.py index 0a36513..60977dc 100644 --- a/neon_minerva/tests/test_skill_intents.py +++ b/neon_minerva/tests/test_skill_intents.py @@ -30,6 +30,9 @@ from os import getenv from os.path import join, exists +from unittest.mock import Mock + +from ovos_bus_client import Message from ovos_utils.messagebus import FakeBus from ovos_utils.log import LOG @@ -38,6 +41,7 @@ from neon_minerva.intent_services.padatious import PadatiousContainer, TestPadatiousMatcher from neon_minerva.intent_services.adapt import AdaptContainer from neon_minerva.intent_services.padacioso import PadaciosoContainer +from neon_minerva.intent_services.common_query import CommonQuery from neon_minerva.intent_services import IntentMatch @@ -81,6 +85,9 @@ class TestSkillIntentMatching(unittest.TestCase): bus) adapt_services[lang] = AdaptContainer(lang, bus) + if common_query: + common_query_service = CommonQuery(bus) + skill = get_skill_object(skill_entrypoint=skill_entrypoint, skill_id=test_skill_id, bus=bus, config_patch=core_config_patch) @@ -148,8 +155,50 @@ def test_negative_intents(self): padatious.test_intent(utt) def test_common_query(self): - # TODO - pass + if not self.common_query: + return + + qa_callback = Mock() + qa_response = Mock() + self.skill.events.add('question:action', qa_callback) + self.skill.events.add('question:query.response', qa_response) + for lang in self.common_query.keys(): + for utt in self.common_query[lang]: + if isinstance(utt, dict): + data = list(utt.values())[0] + utt = list(utt.keys())[0] + else: + data = dict() + message = Message('test_utterance', + {"utterances": [utt], "lang": lang}) + self.common_query_service.handle_question(message) + response = qa_response.call_args[0][0] + callback = qa_response.call_args[0][0] + self.assertIsInstance(response, Message) + self.assertTrue(response.data["phrase"] in utt) + self.assertEqual(response.data["skill_id"], self.skill.skill_id) + self.assertIn("callback_data", response.data.keys()) + self.assertIsInstance(response.data["conf"], float) + self.assertIsInstance(response.data["answer"], str) + + self.assertIsInstance(callback, Message) + self.assertEqual(callback.data['skill_id'], self.skill.skill_id) + self.assertEqual(callback.data['phrase'], + response.data['phrase']) + if not data: + continue + if isinstance(data.get('callback'), dict): + self.assertEqual(callback.data['callback_data'], + data['callback']) + elif isinstance(data.get('callback'), list): + self.assertEqual(set(callback.data['callback_data'].keys()), + set(data.get('callback'))) + if data.get('min_confidence'): + self.assertGreaterEqual(response.data['conf'], + data['min_confidence']) + if data.get('max_confidence'): + self.assertLessEqual(response.data['conf'], + data['max_confidence']) def test_common_play(self): # TODO From 9c4c691b7a7f97ed5cec4c54fd2399b5589d2e44 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 15 Jan 2024 21:12:51 +0000 Subject: [PATCH 04/14] Increment Version to 0.1.1a3 --- neon_minerva/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_minerva/version.py b/neon_minerva/version.py index f948c1a..b479d57 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.1a2" +__version__ = "0.1.1a3" From b3e7b646343ffea617696c5952eaf9e810da09ad Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:13:25 -0800 Subject: [PATCH 05/14] Patch FakeBus object for MessageBusClient compat. (#17) Co-authored-by: Daniel McKnight --- neon_minerva/tests/skill_unit_test_base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neon_minerva/tests/skill_unit_test_base.py b/neon_minerva/tests/skill_unit_test_base.py index 0732b16..b2237e7 100644 --- a/neon_minerva/tests/skill_unit_test_base.py +++ b/neon_minerva/tests/skill_unit_test_base.py @@ -31,6 +31,7 @@ from os import environ, getenv from os.path import dirname, join +from threading import Event from unittest.mock import Mock from ovos_utils.messagebus import FakeBus @@ -49,6 +50,8 @@ class SkillTestCase(unittest.TestCase): bus = FakeBus() # Patching FakeBus compat. with MessageBusClient bus.emitter = bus.ee + bus.connected_event = Event() + bus.connected_event.set() bus.run_forever() test_skill_id = 'test_skill.test' From 870d158289b391715abad906e142297b8a13eed9 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 15 Jan 2024 23:13:41 +0000 Subject: [PATCH 06/14] Increment Version to 0.1.1a4 --- neon_minerva/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_minerva/version.py b/neon_minerva/version.py index b479d57..79f0214 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.1a3" +__version__ = "0.1.1a4" From 4c500b01da47845349a52f44b9c5aac680b21aa2 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:38:44 -0800 Subject: [PATCH 07/14] Utterance handling bugfixes (#18) * Fix utterance case normalization Fix message formatting bug for CQS tests * Update padatious intent handling to match ovos-core behavior * Add utterance to confidence exception * Handle med and low conf matches as valid in intent tests * Add matched intent to Low Conf exception --------- Co-authored-by: Daniel McKnight --- neon_minerva/intent_services/padatious.py | 6 +++--- neon_minerva/tests/test_skill_intents.py | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/neon_minerva/intent_services/padatious.py b/neon_minerva/intent_services/padatious.py index b4e8931..725d74c 100644 --- a/neon_minerva/intent_services/padatious.py +++ b/neon_minerva/intent_services/padatious.py @@ -94,9 +94,9 @@ def test_intent(self, utterance: str) -> IntentMatch: raise IntentNotMatched(utterance) conf = intent.get("conf") or 0.0 if conf < self.min_conf: - raise ConfidenceTooLow(f"{conf} less than minimum {self.min_conf}") + raise ConfidenceTooLow(f"{conf} less than minimum {self.min_conf}: " + f"{utterance}. intent={intent}") skill_id = intent.get('name').split(':')[0] - sentence = ' '.join(intent.get('sent')) if intent.get('sent') else utterance return IntentMatch('Padatious', intent.get('name'), intent.get('matches') or intent.get('entities'), - skill_id, sentence) + skill_id, utterance) diff --git a/neon_minerva/tests/test_skill_intents.py b/neon_minerva/tests/test_skill_intents.py index 60977dc..67a7ba1 100644 --- a/neon_minerva/tests/test_skill_intents.py +++ b/neon_minerva/tests/test_skill_intents.py @@ -109,7 +109,10 @@ def test_intents(self): for intent, examples in self.valid_intents[lang].items(): # TODO: Better method to determine parser? if intent.endswith('.intent'): - parser = TestPadatiousMatcher(self.padatious_services[lang]) + # TODO: Configurable min confidence + parser = TestPadatiousMatcher(self.padatious_services[lang], + include_med=True, + include_low=True) else: parser = self.adapt_services[lang] @@ -119,7 +122,7 @@ def test_intents(self): utt = list(utt.keys())[0] else: data = list() - + utt = utt.lower() match = parser.test_intent(utt) self.assertIsInstance(match, IntentMatch) self.assertEqual(match.skill_id, self.test_skill_id) @@ -169,8 +172,9 @@ def test_common_query(self): utt = list(utt.keys())[0] else: data = dict() + utt = utt.lower() message = Message('test_utterance', - {"utterances": [utt], "lang": lang}) + {"utterance": utt, "lang": lang}) self.common_query_service.handle_question(message) response = qa_response.call_args[0][0] callback = qa_response.call_args[0][0] From 6ff5c88526c42cc5b6c63329a591230a6603cfae Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Mon, 15 Jan 2024 23:38:59 +0000 Subject: [PATCH 08/14] Increment Version to 0.1.1a5 --- neon_minerva/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_minerva/version.py b/neon_minerva/version.py index 79f0214..67de908 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.1a4" +__version__ = "0.1.1a5" From eef3a85bbc9340f00cb53dbb2670bfa19978f49d Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:23:00 -0800 Subject: [PATCH 09/14] Document test file structure (#19) Loosen ovos-utils dependency to allow 0.1+ Co-authored-by: Daniel McKnight --- README.md | 65 +++++++++++++++++++++++++++++++++++ requirements/requirements.txt | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 74278cc..bc2076c 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,39 @@ To test that skill resources are defined for all supported languages, the skill's root directory > - is a relative or absolute path to the resource test file, usually `test_resources.yaml` +example `test_resources.yaml`: +```yaml +# Specify resources to test here. + +# Specify languages to be tested +languages: + - "en-us" + - "uk-ua" + +# vocab is lowercase .voc file basenames +vocab: + - ip + - public + - query + +# dialog is .dialog file basenames (case-sensitive) +dialog: + - dot + - my address is + - my address on X is Y + - no network connection + - word_public + - word_local +# regex entities, not necessarily filenames +regex: [] +intents: + # Padatious intents are the `.intent` file names + padatious: [] + # Adapt intents are the name passed to the constructor + adapt: + - IPIntent +``` + ### Intent Tests To test that skill intents match as expected for all supported languages, `minerva test-intents ` @@ -42,6 +75,38 @@ To test that skill intents match as expected for all supported languages, > - is a relative or absolute path to the resource test file, usually `test_intents.yaml` > - The `--padacioso` flag can be added to test with Padacioso instead of Padatious for relevant intents +example `test_intents.yaml`: +```yaml +en-us: + IPIntent: + - what is your ip address + - what is my ip address: + - IP + - what is my i.p. address + - What is your I.P. address? + - what is my public IP address?: + - public: public + +uk-ua: + IPIntent: + - шо в мене за ай пі: + - IP + - покажи яка в мене за мережа: + - IP + - покажи яка в мене публічний ай пі адреса: + - public: публічний +``` + +#### Test Configuration +The following top-level sections can be added to intent test configuration: + +- `unmatched intents`: dict of `lang` to list of `utterances` that should match + no intents. Note that this does not test for CommonQuery or CommonPlay matches. +- `common query`: dict of `lang` to list of `utterances` OR dict of `utterances` + to expected: `callback_data` (list keys or dict data), `min_confidence`, and + `max_confidence` +- `common play`: TBD + ## Advanced Usage In addition to convenient CLI methods, this package also provides test cases that may be extended. diff --git a/requirements/requirements.txt b/requirements/requirements.txt index b517944..b78ae07 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,6 +1,6 @@ click~=8.0 click-default-group~=1.2 -ovos-utils~=0.0.35 +ovos-utils~=0.0, >=0.0.35 ovos-workshop~=0.0.12 padacioso~=0.1 pyyaml>=5.4,<7.0 From b2b23ef384773eb4206bd7765209ca1929b3fa8e Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Thu, 1 Feb 2024 20:23:16 +0000 Subject: [PATCH 10/14] Increment Version to 0.1.1a6 --- neon_minerva/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_minerva/version.py b/neon_minerva/version.py index 67de908..dea884d 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.1a5" +__version__ = "0.1.1a6" From 9405ff5aad2ca2bf5f4e654e183a8d805c119099 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:07:40 -0800 Subject: [PATCH 11/14] Update to address review https://github.com/NeonGeckoCom/neon-minerva/pull/20 (#21) Co-authored-by: Daniel McKnight --- neon_minerva/intent_services/common_query.py | 27 ++++++++++++++++++++ neon_minerva/tests/test_skill_resources.py | 15 +++-------- requirements/requirements.txt | 2 +- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/neon_minerva/intent_services/common_query.py b/neon_minerva/intent_services/common_query.py index 290550d..145f80d 100644 --- a/neon_minerva/intent_services/common_query.py +++ b/neon_minerva/intent_services/common_query.py @@ -1,3 +1,30 @@ +# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework +# All trademark and other rights reserved by their respective owners +# Copyright 2008-2022 Neongecko.com Inc. +# Contributors: Daniel McKnight, Guy Daniels, Elon Gasper, Richard Leeds, +# Regina Bloomstine, Casimiro Ferreira, Andrii Pernatii, Kirill Hrymailo +# BSD-3 License +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from this +# software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# 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 time from dataclasses import dataclass diff --git a/neon_minerva/tests/test_skill_resources.py b/neon_minerva/tests/test_skill_resources.py index 60e9e48..6a95321 100644 --- a/neon_minerva/tests/test_skill_resources.py +++ b/neon_minerva/tests/test_skill_resources.py @@ -81,17 +81,10 @@ def _on_message(cls, message): def test_skill_setup(self): self.assertEqual(self.skill.skill_id, self.test_skill_id) - if hasattr(self.skill, "_core_lang"): - # ovos-workshop < 0.0.15 - self.assertEqual(set([self.skill._core_lang] + - self.skill._secondary_langs), - set(self.supported_languages), - f"expected={self.supported_languages}") - else: - self.assertEqual(set([self.skill.core_lang] + - self.skill.secondary_langs), - set(self.supported_languages), - f"expected={self.supported_languages}") + self.assertEqual(set([self.skill.core_lang] + + self.skill.secondary_langs), + set(self.supported_languages), + f"expected={self.supported_languages}") def test_intent_registration(self): registered_adapt = list() diff --git a/requirements/requirements.txt b/requirements/requirements.txt index b78ae07..e70c9a9 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,7 +1,7 @@ click~=8.0 click-default-group~=1.2 ovos-utils~=0.0, >=0.0.35 -ovos-workshop~=0.0.12 +ovos-workshop~=0.0.15 padacioso~=0.1 pyyaml>=5.4,<7.0 # PyYaml 5.4 support left for ovos-core 0.0.7 compat \ No newline at end of file From d38460c543f0d95ac626f0b5866f5a674823bd31 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Fri, 23 Feb 2024 00:07:54 +0000 Subject: [PATCH 12/14] Increment Version to 0.1.1a7 --- neon_minerva/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_minerva/version.py b/neon_minerva/version.py index dea884d..a41b515 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.1a6" +__version__ = "0.1.1a7" From 866f5340d7af576ac0087644414d4a65f9f0ad91 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Fri, 1 Mar 2024 23:03:45 +0000 Subject: [PATCH 13/14] Increment Version to 0.2.0 --- neon_minerva/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon_minerva/version.py b/neon_minerva/version.py index a41b515..96062fc 100644 --- a/neon_minerva/version.py +++ b/neon_minerva/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__ = "0.1.1a7" +__version__ = "0.2.0" From 312039e0c6c2c3ca7654a290db86776d75860855 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Fri, 1 Mar 2024 23:04:05 +0000 Subject: [PATCH 14/14] Update Changelog --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a032cc1..afc7e83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,52 @@ # Changelog -## [0.0.2a6](https://github.com/NeonGeckoCom/neon-minerva/tree/0.0.2a6) (2023-12-08) +## [0.1.1a7](https://github.com/NeonGeckoCom/neon-minerva/tree/0.1.1a7) (2024-02-23) -[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.0.2a5...0.0.2a6) +[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.1.1a6...0.1.1a7) **Merged pull requests:** -- Move packages with system dependencies to `padatious` extras [\#13](https://github.com/NeonGeckoCom/neon-minerva/pull/13) ([NeonDaniel](https://github.com/NeonDaniel)) +- Update to address review comments [\#21](https://github.com/NeonGeckoCom/neon-minerva/pull/21) ([NeonDaniel](https://github.com/NeonDaniel)) -## [0.0.2a5](https://github.com/NeonGeckoCom/neon-minerva/tree/0.0.2a5) (2023-12-08) +## [0.1.1a6](https://github.com/NeonGeckoCom/neon-minerva/tree/0.1.1a6) (2024-02-01) -[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.0.1...0.0.2a5) +[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.1.1a5...0.1.1a6) **Merged pull requests:** -- Update GHA to publish pre-releases [\#12](https://github.com/NeonGeckoCom/neon-minerva/pull/12) ([NeonDaniel](https://github.com/NeonDaniel)) -- Fix bug causing dialog tests to pass when translations are missing [\#11](https://github.com/NeonGeckoCom/neon-minerva/pull/11) ([NeonDaniel](https://github.com/NeonDaniel)) -- Add support for CBF Submind tests [\#10](https://github.com/NeonGeckoCom/neon-minerva/pull/10) ([NeonDaniel](https://github.com/NeonDaniel)) -- Add compat. reference for `bus.emitter` [\#9](https://github.com/NeonGeckoCom/neon-minerva/pull/9) ([NeonDaniel](https://github.com/NeonDaniel)) -- Skill Test Class [\#5](https://github.com/NeonGeckoCom/neon-minerva/pull/5) ([NeonDaniel](https://github.com/NeonDaniel)) +- Document skill tests and update ovos-utils dependency spec [\#19](https://github.com/NeonGeckoCom/neon-minerva/pull/19) ([NeonDaniel](https://github.com/NeonDaniel)) + +## [0.1.1a5](https://github.com/NeonGeckoCom/neon-minerva/tree/0.1.1a5) (2024-01-15) + +[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.1.1a4...0.1.1a5) + +**Merged pull requests:** + +- Utterance handling bugfixes [\#18](https://github.com/NeonGeckoCom/neon-minerva/pull/18) ([NeonDaniel](https://github.com/NeonDaniel)) + +## [0.1.1a4](https://github.com/NeonGeckoCom/neon-minerva/tree/0.1.1a4) (2024-01-15) + +[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.1.1a3...0.1.1a4) + +**Merged pull requests:** + +- Patch FakeBus object for MessageBusClient compat. [\#17](https://github.com/NeonGeckoCom/neon-minerva/pull/17) ([NeonDaniel](https://github.com/NeonDaniel)) + +## [0.1.1a3](https://github.com/NeonGeckoCom/neon-minerva/tree/0.1.1a3) (2024-01-15) + +[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.1.1a2...0.1.1a3) + +**Merged pull requests:** + +- Add CommonQuery test support [\#16](https://github.com/NeonGeckoCom/neon-minerva/pull/16) ([NeonDaniel](https://github.com/NeonDaniel)) + +## [0.1.1a2](https://github.com/NeonGeckoCom/neon-minerva/tree/0.1.1a2) (2024-01-02) + +[Full Changelog](https://github.com/NeonGeckoCom/neon-minerva/compare/0.1.0...0.1.1a2) + +**Merged pull requests:** + +- Make skill references compatible with ovos-workshop changes [\#15](https://github.com/NeonGeckoCom/neon-minerva/pull/15) ([NeonDaniel](https://github.com/NeonDaniel))