Verified Commit 42c807da authored by Sumner Evans's avatar Sumner Evans 💬

Fix package name references

parent 2889c6bd
Pipeline #193126705 failed with stages
in 1 minute and 35 seconds
......@@ -25,7 +25,7 @@ lint:
- poetry run python setup.py check -mrs
- poetry run black --check .
- poetry run flake8
- poetry run mypy sublime tests/**/*.py
- poetry run mypy sublime_music tests/**/*.py
- poetry run cicd/custom_style_check.py
test:
......
......@@ -75,5 +75,5 @@ setup(
# "scripts" keyword. Entry points provide cross-platform support and
# allow pip to create the appropriate form of executable for the target
# platform.
entry_points={"console_scripts": ["sublime-music=sublime.__main__:main"]},
entry_points={"console_scripts": ["sublime-music=sublime_music.__main__:main"]},
)
......@@ -9,8 +9,8 @@ import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk # noqa: F401
import sublime
from sublime.app import SublimeMusicApp
import sublime_music
from .app import SublimeMusicApp
def main():
......@@ -33,7 +33,7 @@ def main():
args, unknown_args = parser.parse_known_args()
if args.version:
print(f"Sublime Music v{sublime.__version__}") # noqa: T001
print(f"Sublime Music v{sublime_music.__version__}") # noqa: T001
return
min_log_level = getattr(logging, args.loglevel.upper(), None)
......
......@@ -252,7 +252,7 @@ class ConfigureServerForm(Gtk.Box):
def _set_verification_status(
self, verifying: bool, is_valid: bool = False, error_text: str = None
):
from sublime.ui import util
from sublime_music.ui import util
if verifying:
if not self.verifying_in_progress:
......@@ -304,7 +304,7 @@ class ConfigureServerForm(Gtk.Box):
def _verify_config(self, ratchet: int):
self.emit("config-valid-changed", False)
from sublime.adapters import Result
from sublime_music.adapters import Result
if self.required_config_parameter_keys.issubset(set(self.config_store.keys())):
if self._verification_status_ratchet != ratchet:
......
......@@ -9,7 +9,7 @@ from typing import Any, cast, Dict, Iterable, Optional, Sequence, Set, Tuple
from gi.repository import Gtk
from peewee import fn, prefetch
from sublime.adapters import api_objects as API
from sublime_music.adapters import api_objects as API
from . import models
from .. import (
......
......@@ -14,7 +14,7 @@ from peewee import (
TextField,
)
from sublime.adapters.adapter_base import CachingAdapter
from sublime_music.adapters.adapter_base import CachingAdapter
# Custom Fields
......
......@@ -30,7 +30,7 @@ from typing import (
import requests
from sublime.config import ProviderConfiguration
from sublime_music.config import ProviderConfiguration
from .adapter_base import (
Adapter,
......@@ -273,7 +273,7 @@ class AdapterManager:
config: Any,
on_song_download_progress: Callable[[Any, str, DownloadProgress], None],
):
from sublime.config import AppConfiguration
from sublime_music.config import AppConfiguration
assert isinstance(config, AppConfiguration)
......
......@@ -27,7 +27,7 @@ import requests
import semver
from gi.repository import Gtk
from sublime.util import resolve_path
from sublime_music.util import resolve_path
from .api_objects import Directory, Response
from .. import (
......
......@@ -8,8 +8,8 @@ from typing import Any, cast, Dict, Optional, Tuple, Type, Union
import dataclasses_json
from dataclasses_json import config, DataClassJsonMixin
from sublime.adapters import ConfigurationStore
from sublime.ui.state import UIState
from .adapters import ConfigurationStore
from .ui.state import UIState
# JSON decoder and encoder translations
......@@ -85,7 +85,7 @@ def encode_providers(
def decode_providers(
providers_dict: Dict[str, Dict[str, Any]]
) -> Dict[str, ProviderConfiguration]:
from sublime.adapters import AdapterManager
from sublime_music.adapters import AdapterManager
def find_adapter_type(type_name: str) -> Type:
for available_adapter in AdapterManager.available_adapters:
......
......@@ -4,7 +4,7 @@ from datetime import timedelta
from enum import Enum
from typing import Callable, Dict, Optional, Set, Tuple, Type, Union
from sublime.adapters.api_objects import Song
from ..adapters.api_objects import Song
@dataclass
......
......@@ -12,8 +12,8 @@ from uuid import UUID
from gi.repository import GLib
from sublime.adapters import AdapterManager
from sublime.adapters.api_objects import Song
from ..adapters import AdapterManager
from ..adapters.api_objects import Song
from .base import Player, PlayerDeviceEvent, PlayerEvent
......
......@@ -2,7 +2,7 @@ import logging
from datetime import timedelta
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from sublime.adapters.api_objects import Song
from ..adapters.api_objects import Song
from .base import PlayerDeviceEvent, PlayerEvent
from .chromecast import ChromecastPlayer # noqa: F401
......@@ -19,7 +19,8 @@ class PlayerManager:
]:
"""
:returns: Dictionary of the name of the player -> option configs (see
:class:`sublime.players.base.Player.get_configuration_options` for details).
:class:`sublime_music.players.base.Player.get_configuration_options` for
details).
"""
return {
p.name: p.get_configuration_options()
......
......@@ -4,7 +4,7 @@ from typing import Callable, cast, Dict, Optional, Tuple, Type, Union
import mpv
from sublime.adapters.api_objects import Song
from ..adapters.api_objects import Song
from .base import Player, PlayerDeviceEvent, PlayerEvent
......
......@@ -6,16 +6,16 @@ from typing import Any, Callable, cast, Iterable, List, Optional, Tuple
from gi.repository import Gdk, Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import (
from ..adapters import (
AdapterManager,
AlbumSearchQuery,
api_objects as API,
CacheMissError,
Result,
)
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
def _to_type(query_type: AlbumSearchQuery.Type) -> str:
......
......@@ -5,15 +5,15 @@ from typing import cast, List, Sequence
from gi.repository import Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import (
from ..adapters import (
AdapterManager,
api_objects as API,
CacheMissError,
SongCacheStatus,
)
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import AlbumWithSongs, IconButton, LoadError, SpinnerImage
class ArtistsPanel(Gtk.Paned):
......
......@@ -3,10 +3,10 @@ from typing import Any, cast, List, Optional, Tuple
from gi.repository import Gdk, Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, api_objects as API, CacheMissError, Result
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import IconButton, LoadError, SongListColumn
from ..adapters import AdapterManager, api_objects as API, CacheMissError, Result
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import IconButton, LoadError, SongListColumn
class BrowsePanel(Gtk.Overlay):
......
......@@ -3,9 +3,9 @@ from typing import Any, cast, List
from gi.repository import Gdk, GLib, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, api_objects as API, Result
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime_music.adapters import AdapterManager, api_objects as API, Result
from sublime_music.config import AppConfiguration
from sublime_music.ui import util
from .icon_button import IconButton
from .load_error import LoadError
......
......@@ -4,9 +4,9 @@ from typing import Any, Optional, Type
from gi.repository import Gio, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, UIInfo
from sublime.adapters.filesystem import FilesystemAdapter
from sublime.config import ConfigurationStore, ProviderConfiguration
from ..adapters import AdapterManager, UIInfo
from ..adapters.filesystem import FilesystemAdapter
from ..config import ConfigurationStore, ProviderConfiguration
class AdapterTypeModel(GObject.GObject):
......
......@@ -3,16 +3,16 @@ from typing import Any, Callable, Dict, Optional, Set, Tuple
from gi.repository import Gdk, GLib, GObject, Gtk, Pango
from sublime.adapters import (
from ..adapters import (
AdapterManager,
api_objects as API,
DownloadProgress,
Result,
)
from sublime.config import AppConfiguration, ProviderConfiguration
from sublime.players import PlayerManager
from sublime.ui import albums, artists, browse, player_controls, playlists, util
from sublime.ui.common import IconButton, IconMenuButton, SpinnerImage
from ..config import AppConfiguration, ProviderConfiguration
from ..players import PlayerManager
from ..ui import albums, artists, browse, player_controls, playlists, util
from ..ui.common import IconButton, IconMenuButton, SpinnerImage
class MainWindow(Gtk.ApplicationWindow):
......
......@@ -6,10 +6,10 @@ from typing import Any, cast, Dict, List, Tuple
from fuzzywuzzy import fuzz
from gi.repository import Gdk, Gio, GLib, GObject, Gtk, Pango
from sublime.adapters import AdapterManager, api_objects as API
from sublime.config import AppConfiguration
from sublime.ui import util
from sublime.ui.common import (
from ..adapters import AdapterManager, api_objects as API
from ..config import AppConfiguration
from ..ui import util
from ..ui.common import (
IconButton,
LoadError,
SongListColumn,
......
......@@ -3,8 +3,8 @@ from datetime import timedelta
from enum import Enum
from typing import Any, Callable, Dict, Optional, Set, Tuple, Type
from sublime.adapters import AlbumSearchQuery
from sublime.adapters.api_objects import Genre, Song
from ..adapters import AlbumSearchQuery
from ..adapters.api_objects import Genre, Song
class RepeatType(Enum):
......@@ -109,7 +109,7 @@ class UIState:
self.playing = False
def __init_available_players__(self):
from sublime.players import PlayerManager
from sublime_music.players import PlayerManager
self.available_players = {
pt: set() for pt in PlayerManager.available_player_types
......@@ -125,7 +125,7 @@ class UIState:
if not self.play_queue or self.current_song_index < 0:
return None
from sublime.adapters import AdapterManager
from sublime_music.adapters import AdapterManager
current_song_id = self.play_queue[self.current_song_index]
......
......@@ -16,9 +16,9 @@ from typing import (
from deepdiff import DeepDiff
from gi.repository import Gdk, GLib, Gtk
from sublime.adapters import AdapterManager, CacheMissError, Result, SongCacheStatus
from sublime.adapters.api_objects import Playlist, Song
from sublime.config import AppConfiguration
from ..adapters import AdapterManager, CacheMissError, Result, SongCacheStatus
from ..adapters.api_objects import Playlist, Song
from ..config import AppConfiguration
def format_song_duration(duration_secs: Union[int, timedelta, None]) -> str:
......
......@@ -3,10 +3,15 @@ from time import sleep
import pytest
from sublime.adapters import AdapterManager, ConfigurationStore, Result, SearchResult
from sublime.adapters.filesystem import FilesystemAdapter
from sublime.adapters.subsonic import api_objects as SubsonicAPI, SubsonicAdapter
from sublime.config import AppConfiguration, ProviderConfiguration
from sublime_music.adapters import (
AdapterManager,
ConfigurationStore,
Result,
SearchResult,
)
from sublime_music.adapters.filesystem import FilesystemAdapter
from sublime_music.adapters.subsonic import api_objects as SubsonicAPI, SubsonicAdapter
from sublime_music.config import AppConfiguration, ProviderConfiguration
@pytest.fixture
......
......@@ -9,14 +9,14 @@ import pytest
from peewee import SelectQuery
from sublime.adapters import (
from sublime_music.adapters import (
AlbumSearchQuery,
api_objects as SublimeAPI,
CacheMissError,
SongCacheStatus,
)
from sublime.adapters.filesystem import FilesystemAdapter
from sublime.adapters.subsonic import api_objects as SubsonicAPI
from sublime_music.adapters.filesystem import FilesystemAdapter
from sublime_music.adapters.subsonic import api_objects as SubsonicAPI
MOCK_DATA_FILES = Path(__file__).parent.joinpath("mock_data")
MOCK_ALBUM_ART = MOCK_DATA_FILES.joinpath("album-art.png")
......
......@@ -8,11 +8,8 @@ from typing import Any, Generator, List, Tuple
import pytest
from dateutil.tz import tzutc
from sublime.adapters import ConfigurationStore
from sublime.adapters.subsonic import (
api_objects as SubsonicAPI,
SubsonicAdapter,
)
from sublime_music.adapters import ConfigurationStore
from sublime_music.adapters.subsonic import api_objects as SubsonicAPI, SubsonicAdapter
MOCK_DATA_FILES = Path(__file__).parent.joinpath("mock_data")
......
......@@ -5,7 +5,7 @@ import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk # noqa: F401
from sublime.ui import common
from sublime_music.ui import common
def test_icon_buttons():
......
......@@ -3,10 +3,10 @@ from pathlib import Path
import pytest
from sublime.adapters import ConfigurationStore
from sublime.adapters.filesystem import FilesystemAdapter
from sublime.adapters.subsonic import SubsonicAdapter
from sublime.config import AppConfiguration, ProviderConfiguration
from sublime_music.adapters import ConfigurationStore
from sublime_music.adapters.filesystem import FilesystemAdapter
from sublime_music.adapters.subsonic import SubsonicAdapter
from sublime_music.config import AppConfiguration, ProviderConfiguration
@pytest.fixture
......
from sublime.players.chromecast import ChromecastPlayer
from sublime_music.players.chromecast import ChromecastPlayer
def test_init():
......
......@@ -3,7 +3,7 @@ from pathlib import Path
# from time import sleep
from sublime.players.mpv import MPVPlayer
from sublime_music.players.mpv import MPVPlayer
MPVPlayer._is_mock = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment