Skip to content

Commit 972c0e3

Browse files
authored
Merge pull request #320 from OpenVoiceOS/release-3.3.1a2
Release 3.3.1a2
2 parents 9fdc036 + ea45181 commit 972c0e3

File tree

14 files changed

+93
-22
lines changed

14 files changed

+93
-22
lines changed

.github/workflows/publish_stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Python
2727
uses: actions/setup-python@v1
2828
with:
29-
python-version: 3.8
29+
python-version: '3.11'
3030
- name: Install Build Tools
3131
run: |
3232
python -m pip install build wheel

.github/workflows/release_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Setup Python
4747
uses: actions/setup-python@v1
4848
with:
49-
python-version: 3.8
49+
python-version: '3.11'
5050
- name: Install Build Tools
5151
run: |
5252
python -m pip install build wheel

CHANGELOG.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
# Changelog
22

3-
## [3.3.0a1](https://github.com/OpenVoiceOS/OVOS-workshop/tree/3.3.0a1) (2024-12-31)
3+
## [3.3.1a2](https://github.com/OpenVoiceOS/OVOS-workshop/tree/3.3.1a2) (2025-01-04)
44

5-
[Full Changelog](https://github.com/OpenVoiceOS/OVOS-workshop/compare/3.2.2a1...3.3.0a1)
6-
7-
**Closed issues:**
8-
9-
- refactor: simplify common query [\#314](https://github.com/OpenVoiceOS/OVOS-workshop/issues/314)
5+
[Full Changelog](https://github.com/OpenVoiceOS/OVOS-workshop/compare/3.3.1a1...3.3.1a2)
106

117
**Merged pull requests:**
128

13-
- feat:common\_query\_decorator [\#315](https://github.com/OpenVoiceOS/OVOS-workshop/pull/315) ([JarbasAl](https://github.com/JarbasAl))
9+
- refactor: simplify cq messages [\#319](https://github.com/OpenVoiceOS/OVOS-workshop/pull/319) ([JarbasAl](https://github.com/JarbasAl))
1410

15-
## [3.2.2a1](https://github.com/OpenVoiceOS/OVOS-workshop/tree/3.2.2a1) (2024-12-26)
11+
## [3.3.1a1](https://github.com/OpenVoiceOS/OVOS-workshop/tree/3.3.1a1) (2025-01-04)
1612

17-
[Full Changelog](https://github.com/OpenVoiceOS/OVOS-workshop/compare/3.2.1...3.2.2a1)
13+
[Full Changelog](https://github.com/OpenVoiceOS/OVOS-workshop/compare/3.3.0...3.3.1a1)
1814

1915
**Merged pull requests:**
2016

21-
- fix: voc\_match ignore case [\#312](https://github.com/OpenVoiceOS/OVOS-workshop/pull/312) ([JarbasAl](https://github.com/JarbasAl))
17+
- chore: add warnings [\#317](https://github.com/OpenVoiceOS/OVOS-workshop/pull/317) ([JarbasAl](https://github.com/JarbasAl))
2218

2319

2420

ovos_workshop/backwards_compat.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import warnings
2+
warnings.warn(
3+
"will be removed soon",
4+
DeprecationWarning,
5+
stacklevel=2,
6+
)
7+
18
try: # TODO - remove this file in next stable release
29
from ovos_utils.ocp import *
310
except ImportError:

ovos_workshop/decorators/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from functools import wraps
22
from typing import Optional, Callable
33
from ovos_utils.log import log_deprecation
4-
4+
import warnings
55
from ovos_workshop.decorators.killable import killable_intent, killable_event
66
from ovos_workshop.decorators.layers import enables_layer, \
77
disables_layer, layer_intent, removes_layer, resets_layers, replaces_layer
@@ -75,6 +75,11 @@ def intent_file_handler(intent_file: str):
7575
"""
7676
Deprecated decorator for adding a method as an intent file handler.
7777
"""
78+
warnings.warn(
79+
"Use `@intent_handler' instead",
80+
DeprecationWarning,
81+
stacklevel=2,
82+
)
7883

7984
def real_decorator(func):
8085
# Store the intent_file inside the function

ovos_workshop/decorators/converse.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
from ovos_utils.log import log_deprecation
2+
import warnings
3+
4+
warnings.warn(
5+
"Import from `ovos_workshop.decorators`",
6+
DeprecationWarning,
7+
stacklevel=2,
8+
)
29

310

411
def converse_handler(func):

ovos_workshop/decorators/fallback_handler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
from ovos_utils.log import log_deprecation
22

3+
import warnings
4+
5+
warnings.warn(
6+
"Import from `ovos_workshop.decorators`",
7+
DeprecationWarning,
8+
stacklevel=2,
9+
)
310

411
def fallback_handler(priority=50):
512
log_deprecation("Import from `ovos_workshop.decorators`", "0.1.0")

ovos_workshop/intents.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from os.path import exists
44
from threading import RLock
55
from typing import List, Tuple, Optional
6-
6+
import warnings
77
from ovos_bus_client.message import Message, dig_for_message
88
from ovos_bus_client.util import get_mycroft_bus
99
from ovos_utils.log import LOG, log_deprecation
@@ -500,6 +500,11 @@ class expect intent_name; this was the weird one expecting the internal
500500
name = intent_name.split(':')[1]
501501
log_deprecation(f"Update to `self.remove_intent({name})",
502502
"0.1.0")
503+
warnings.warn(
504+
"use `self.remove_intent' instead",
505+
DeprecationWarning,
506+
stacklevel=2,
507+
)
503508
self.remove_intent(name)
504509

505510
def remove_intent(self, intent_name: str):
@@ -614,6 +619,11 @@ def register_padatious_entity(self, entity_name: str, filename: str,
614619

615620
def get_intent_names(self):
616621
log_deprecation("Reference `intent_names` directly", "0.1.0")
622+
warnings.warn(
623+
"use `self.intent_names' property instead",
624+
DeprecationWarning,
625+
stacklevel=2,
626+
)
617627
return self.intent_names
618628

619629
def detach_all(self):

ovos_workshop/skill_launcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from ovos_plugin_manager.skills import find_skill_plugins, get_skill_directories
1414
from ovos_utils import wait_for_exit_signal
1515
from ovos_utils.file_utils import FileWatcher
16-
from ovos_utils.log import LOG, deprecated, log_deprecation
16+
from ovos_utils.log import LOG, log_deprecation
1717
from ovos_utils.process_utils import RuntimeRequirements
1818

1919
from ovos_workshop.skills.active import ActiveSkill

ovos_workshop/skills/common_query_skill.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from ovos_bus_client import Message
1919
from ovos_utils.file_utils import resolve_resource_file
2020
from ovos_utils.log import LOG, log_deprecation
21-
21+
import warnings
2222
from ovos_workshop.skills.ovos import OVOSSkill
2323

2424

@@ -60,6 +60,11 @@ class CommonQuerySkill(OVOSSkill):
6060

6161
def __init__(self, *args, **kwargs):
6262
log_deprecation("'CommonQuerySkill' class has been deprecated, use @common_query decorator with regular OVOSSkill instead", "4.0.0")
63+
warnings.warn(
64+
"use '@common_query' decorator with regular OVOSSkill instead",
65+
DeprecationWarning,
66+
stacklevel=2,
67+
)
6368
# these should probably be configurable
6469
self.level_confidence = {
6570
CQSMatchLevel.EXACT: 0.9,
@@ -120,7 +125,7 @@ def bind(self, bus):
120125
# announce skill to ovos-core
121126
def __handle_common_query_ping(self, message):
122127
self.bus.emit(message.reply("ovos.common_query.pong",
123-
{"skill_id": self.skill_id},
128+
{"skill_id": self.skill_id, "is_classic_cq": True},
124129
{"skill_id": self.skill_id}))
125130

126131
def __handle_question_query(self, message: Message):

ovos_workshop/skills/intent_provider.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@
44
from ovos_bus_client.message import Message
55
from ovos_workshop.skills.fallback import FallbackSkill
66
from ovos_config.config import read_mycroft_config, update_mycroft_config
7+
import warnings
78

9+
warnings.warn(
10+
"use pipeline plugins instead",
11+
DeprecationWarning,
12+
stacklevel=2,
13+
)
814

915
class BaseIntentEngine:
1016
def __init__(self, name, config=None):
17+
warnings.warn(
18+
"make a pipeline plugin instead",
19+
DeprecationWarning,
20+
stacklevel=2,
21+
)
1122
log_deprecation("This base class is not supported", "0.1.0")
1223
self.name = name.lower()
1324
config = config or read_mycroft_config()
@@ -51,6 +62,11 @@ def calc_intent(self, query):
5162

5263
class IntentEngineSkill(FallbackSkill):
5364
def __init__(self, *args, **kwargs):
65+
warnings.warn(
66+
"make a pipeline plugin instead",
67+
DeprecationWarning,
68+
stacklevel=2,
69+
)
5470
log_deprecation("This base class is not supported", "0.1.0")
5571
super().__init__(*args, **kwargs)
5672
self.engine = None

ovos_workshop/skills/layers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
from ovos_workshop.decorators.layers import IntentLayers
22
from ovos_utils.log import log_deprecation
33
log_deprecation("Import from `ovos_workshop.decorators.layers`", "0.1.0")
4+
import warnings
5+
6+
warnings.warn(
7+
"Import from `ovos_workshop.decorators.layers`",
8+
DeprecationWarning,
9+
stacklevel=2,
10+
)

ovos_workshop/skills/ovos.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ def __handle_common_query_ping(self, message):
10401040
if self._cq_handler:
10411041
# announce skill to common query pipeline
10421042
self.bus.emit(message.reply("ovos.common_query.pong",
1043-
{"skill_id": self.skill_id},
1043+
{"skill_id": self.skill_id, "is_classic_cq": False},
10441044
{"skill_id": self.skill_id}))
10451045

10461046
def __handle_query_action(self, message: Message):
@@ -1049,9 +1049,19 @@ def __handle_query_action(self, message: Message):
10491049
10501050
@param message: `question:action` message
10511051
"""
1052+
# backwards compat, for older common query pipeline versions
10521053
if not self._cq_callback or message.data["skill_id"] != self.skill_id:
10531054
# Not for this skill!
10541055
return
1056+
# call the correct handler as if cq was updated
1057+
message.msg_type += f".{self.skill_id}"
1058+
self.bus.emit(message)
1059+
1060+
def __handle_skill_query_action(self, message: Message):
1061+
if not self._cq_callback:
1062+
LOG.debug(f"no common query callback registered for: {self.skill_id}")
1063+
return # nothing to do
1064+
10551065
LOG.debug(f"common query callback for: {self.skill_id}")
10561066
lang = get_message_lang(message)
10571067
answer = message.data.get("answer") or message.data.get("callback_data", {}).get("answer")
@@ -1175,8 +1185,9 @@ def _register_system_event_handlers(self):
11751185

11761186
self.add_event('question:query', self.__handle_question_query, speak_errors=False)
11771187
self.add_event("ovos.common_query.ping", self.__handle_common_query_ping, speak_errors=False)
1178-
self.add_event('question:action', self.__handle_query_action,
1179-
handler_info='mycroft.skill.handler', is_intent=True, speak_errors=False)
1188+
self.add_event(f'question:action.{self.skill_id}', self.__handle_skill_query_action,
1189+
handler_info='mycroft.skill.handler', is_intent=True, speak_errors=False)
1190+
self.add_event('question:action', self.__handle_query_action, speak_errors=False)
11801191

11811192
# homescreen might load after this skill and miss the original events
11821193
self.add_event("homescreen.metadata.get", self.handle_homescreen_loaded, speak_errors=False)

ovos_workshop/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# START_VERSION_BLOCK
22
VERSION_MAJOR = 3
33
VERSION_MINOR = 3
4-
VERSION_BUILD = 0
5-
VERSION_ALPHA = 0
4+
VERSION_BUILD = 1
5+
VERSION_ALPHA = 2
66
# END_VERSION_BLOCK

0 commit comments

Comments
 (0)