From 8815a3f1f8de5aba83a79a444162d8abaf6a05e4 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:00:22 +0100 Subject: [PATCH 1/3] fix:import for latest workshop (#144) * fix:import for latest workshop import moved * Update __init__.py * Update media.py * Update mpris.py * Update player.py * Update player.py * Update search.py * Update status.py * Update requirements.txt * Update unit_tests.yml --- .github/workflows/unit_tests.yml | 9 +-------- ovos_plugin_common_play/ocp/__init__.py | 2 +- ovos_plugin_common_play/ocp/media.py | 2 +- ovos_plugin_common_play/ocp/mpris.py | 2 +- ovos_plugin_common_play/ocp/player.py | 9 +++------ ovos_plugin_common_play/ocp/search.py | 2 +- ovos_plugin_common_play/ocp/status.py | 4 ++-- requirements/requirements.txt | 2 +- 8 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 5f7c38f..1750a11 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -57,14 +57,7 @@ jobs: - name: Run unittests run: | pytest --cov=ovos_plugin_common_play --cov-report xml test/unittests - # NOTE: additional pytest invocations should also add the --cov-append flag - # or they will overwrite previous invocations' coverage reports - # (for an example, see OVOS Skill Manager's workflow) - - name: Run unittests with ovos-utils 0.0.38 - run: | - pip install ovos-utils==0.0.38 - pytest --cov=ovos_plugin_common_play --cov-report xml test/unittests - name: Upload coverage env: CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - uses: codecov/codecov-action@v2 \ No newline at end of file + uses: codecov/codecov-action@v2 diff --git a/ovos_plugin_common_play/ocp/__init__.py b/ovos_plugin_common_play/ocp/__init__.py index d5c68b5..1a96f04 100644 --- a/ovos_plugin_common_play/ocp/__init__.py +++ b/ovos_plugin_common_play/ocp/__init__.py @@ -11,7 +11,7 @@ from padacioso import IntentContainer -from ovos_workshop import OVOSAbstractApplication +from ovos_workshop.app import OVOSAbstractApplication from ovos_workshop.decorators.ocp import * from ovos_plugin_manager.ocp import load_stream_extractors diff --git a/ovos_plugin_common_play/ocp/media.py b/ovos_plugin_common_play/ocp/media.py index f0b3f1f..6854e77 100644 --- a/ovos_plugin_common_play/ocp/media.py +++ b/ovos_plugin_common_play/ocp/media.py @@ -5,7 +5,7 @@ from ovos_bus_client.message import Message from ovos_utils.json_helper import merge_dict from ovos_utils.log import LOG -from ovos_workshop.backwards_compat import MediaState, TrackState, PlaybackType, MediaType, Playlist, PluginStream, MediaEntry as _ME +from ovos_utils.ocp import MediaState, TrackState, PlaybackType, MediaType, Playlist, PluginStream, MediaEntry as _ME from ovos_plugin_common_play.ocp.constants import OCP_ID from ovos_plugin_common_play.ocp.utils import ocp_plugins diff --git a/ovos_plugin_common_play/ocp/mpris.py b/ovos_plugin_common_play/ocp/mpris.py index e018de2..d3b12fe 100644 --- a/ovos_plugin_common_play/ocp/mpris.py +++ b/ovos_plugin_common_play/ocp/mpris.py @@ -9,7 +9,7 @@ from dbus_next.service import ServiceInterface, method, dbus_property, PropertyAccess from ovos_bus_client.message import Message from ovos_utils.log import LOG -from ovos_workshop.decorators.ocp import TrackState, PlaybackType, PlayerState, LoopState +from ovos_utils.ocp import TrackState, PlaybackType, PlayerState, LoopState class MprisPlayerCtl(Thread): diff --git a/ovos_plugin_common_play/ocp/player.py b/ovos_plugin_common_play/ocp/player.py index 67a2ccb..3a5fee8 100644 --- a/ovos_plugin_common_play/ocp/player.py +++ b/ovos_plugin_common_play/ocp/player.py @@ -6,8 +6,8 @@ from ovos_config import Configuration from ovos_utils.log import LOG from ovos_utils.messagebus import Message -from ovos_workshop import OVOSAbstractApplication -from ovos_workshop.backwards_compat import (PluginStream, LoopState, MediaState, PlayerState, TrackState, +from ovos_workshop.app import OVOSAbstractApplication +from ovos_utils.ocp import (PluginStream, LoopState, MediaState, PlayerState, TrackState, dict2entry, PlaybackType, MediaEntry, PlaybackMode, Playlist) from ovos_plugin_common_play.ocp.constants import OCP_ID @@ -17,10 +17,7 @@ from ovos_bus_client.apis.ocp import ClassicAudioServiceInterface from ovos_plugin_common_play.ocp.search import OCPSearch from ovos_plugin_common_play.ocp.utils import require_native_source -try: - from ovos_utils.ocp import dict2entry -except ImportError: # older utils version - dict2entry = MediaEntry.from_dict + class OCPMediaPlayer(OVOSAbstractApplication): diff --git a/ovos_plugin_common_play/ocp/search.py b/ovos_plugin_common_play/ocp/search.py index 17be31b..ab5f226 100644 --- a/ovos_plugin_common_play/ocp/search.py +++ b/ovos_plugin_common_play/ocp/search.py @@ -3,7 +3,7 @@ from ovos_bus_client.message import Message from ovos_utils.log import LOG -from ovos_workshop.decorators.ocp import MediaType +from ovos_utils.ocp import MediaType from ovos_plugin_common_play.ocp.base import OCPAbstractComponent from ovos_plugin_common_play.ocp.media import Playlist diff --git a/ovos_plugin_common_play/ocp/status.py b/ovos_plugin_common_play/ocp/status.py index ad36991..ff7acc1 100644 --- a/ovos_plugin_common_play/ocp/status.py +++ b/ovos_plugin_common_play/ocp/status.py @@ -1,2 +1,2 @@ -from ovos_workshop.decorators.ocp import * -from ovos_plugin_common_play.ocp.constants import OCP_ID \ No newline at end of file +from ovos_utils.ocp import * +from ovos_plugin_common_play.ocp.constants import OCP_ID diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 5b171f4..1213c96 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,6 +1,6 @@ ovos-plugin-manager>=0.0.26,<1.0.0 ovos_bus_client>=0.0.7,<1.0.0 -ovos-utils>=0.0.38,<1.0.0 +ovos-utils>=0.1.0,<1.0.0 ovos-workshop>=0.0.16,<2.0.0 padacioso>=0.1.1,<1.0.0 dbus-next From 29e96606947f9e360be664cf0d9c59f638f75392 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 15 Oct 2024 17:00:36 +0000 Subject: [PATCH 2/3] Increment Version to 1.1.2a1 --- ovos_plugin_common_play/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovos_plugin_common_play/version.py b/ovos_plugin_common_play/version.py index 701585a..68d8055 100644 --- a/ovos_plugin_common_play/version.py +++ b/ovos_plugin_common_play/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK VERSION_MAJOR = 1 VERSION_MINOR = 1 -VERSION_BUILD = 1 -VERSION_ALPHA = 0 +VERSION_BUILD = 2 +VERSION_ALPHA = 1 # END_VERSION_BLOCK From 6d3b84c556e1f466d8d0db76906c1afd833f039d Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Tue, 15 Oct 2024 17:01:05 +0000 Subject: [PATCH 3/3] Update Changelog --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 585b2ff..e7c62d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,16 @@ # Changelog -## [1.1.1a1](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/tree/1.1.1a1) (2024-10-15) +## [1.1.2a1](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/tree/1.1.2a1) (2024-10-15) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/compare/V1.1.0...1.1.1a1) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/compare/V1.1.1...1.1.2a1) **Merged pull requests:** -- fix: allow latest ovos workshop version [\#142](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/pull/142) ([JarbasAl](https://github.com/JarbasAl)) +- fix:import for latest workshop [\#144](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/pull/144) ([JarbasAl](https://github.com/JarbasAl)) -## [V1.1.0](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/tree/V1.1.0) (2024-09-17) +## [V1.1.1](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/tree/V1.1.1) (2024-10-15) -[Full Changelog](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/compare/1.1.0...V1.1.0) +[Full Changelog](https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/compare/1.1.1...V1.1.1)