1
0
mirror of https://github.com/darkzoul5/YoutubePlaylistSync.git synced 2026-07-03 04:23:59 +03:00

Refactor import paths to use the 'src' directory structure and remove unused workflow inputs

This commit is contained in:
2026-03-18 17:48:54 +02:00
parent c339443fd5
commit 9e5540b89b
11 changed files with 12 additions and 17 deletions
-5
View File
@@ -8,11 +8,6 @@ on:
required: true
default: "v0.1.0"
type: string
workflow_call:
inputs:
tag:
type: string
default: "draft"
permissions:
contents: write
+2 -2
View File
@@ -16,7 +16,7 @@ import shutil
# Make imports robust when running the script directly from different working directories.
# Ensure the repository root and this tests folder are on sys.path so the script can import
# both the package (`ytplaylist`) and local test helpers (`tests.temp_config`).
# both the package (`src`) and local test helpers (`tests.temp_config`).
REPO_ROOT = Path(__file__).resolve().parents[1]
TESTS_DIR = Path(__file__).resolve().parent
if str(REPO_ROOT) not in sys.path:
@@ -46,7 +46,7 @@ if bin_dir.exists():
os.environ.setdefault("ARIA2C_PATH", str(aria2c_path))
print(f"Using local aria2c at: {aria2c_path}")
from ytplaylist.downloader import PlaylistDownloader
from src.downloader import PlaylistDownloader
from tests.dummy_config import DummyConfig
logging.basicConfig(level=logging.INFO, format='%(levelname)s:%(message)s')
+1 -1
View File
@@ -1,5 +1,5 @@
import logging
from ytplaylist.manager import PlaylistManager
from src.manager import PlaylistManager
from tests.dummy_config import DummyConfig
+1 -1
View File
@@ -2,7 +2,7 @@ import logging
import subprocess
from types import SimpleNamespace
import ytplaylist.cli as cli_mod
import src.cli as cli_mod
class DummyCompleted(SimpleNamespace):
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import shutil
from pathlib import Path
from ytplaylist.config import ConfigLoader
from src.config import ConfigLoader
def test_config_loader_reads_properties(tmp_path, monkeypatch):
+1 -1
View File
@@ -2,7 +2,7 @@ import subprocess
import shutil
from pathlib import Path
from ytplaylist.downloader import PlaylistDownloader
from src.downloader import PlaylistDownloader
from tests.dummy_config import DummyConfig
+1 -1
View File
@@ -1,6 +1,6 @@
from pathlib import Path
from ytplaylist.downloader import PlaylistDownloader
from src.downloader import PlaylistDownloader
from tests.dummy_config import DummyConfig
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import subprocess
from types import SimpleNamespace
from ytplaylist.downloader import PlaylistDownloader
from src.downloader import PlaylistDownloader
from tests.dummy_config import DummyConfig
+2 -2
View File
@@ -1,6 +1,6 @@
import logging
from tests.dummy_config import DummyConfig
from ytplaylist.manager import PlaylistManager
from src.manager import PlaylistManager
def test_manager_warns_and_sleeps(monkeypatch, caplog):
@@ -11,7 +11,7 @@ def test_manager_warns_and_sleeps(monkeypatch, caplog):
slept["called"] = True
# monkeypatch the sleep used inside the manager module
monkeypatch.setattr("ytplaylist.manager.time.sleep", fake_sleep)
monkeypatch.setattr("src.manager.time.sleep", fake_sleep)
caplog.set_level(logging.WARNING)
cfg = DummyConfig()
+1 -1
View File
@@ -1,5 +1,5 @@
import logging
from ytplaylist.manager import PlaylistManager
from src.manager import PlaylistManager
from tests.dummy_config import DummyConfig
+1 -1
View File
@@ -1,7 +1,7 @@
import shutil
from pathlib import Path
from ytplaylist.downloader import PlaylistDownloader
from src.downloader import PlaylistDownloader
from tests.dummy_config import DummyConfig