feat: major architectural refactor

- Refactor memory system (episodic/STM/LTM with components)
- Implement complete subtitle domain (scanner, matcher, placer)
- Add YAML workflow infrastructure
- Externalize knowledge base (patterns, release groups)
- Add comprehensive testing suite
- Create manual testing CLIs
This commit is contained in:
2026-05-11 21:33:37 +02:00
parent 62b5d0b998
commit 249c5de76a
103 changed files with 8559 additions and 1346 deletions
+41
View File
@@ -0,0 +1,41 @@
"""Fixtures for application-layer tests."""
import shutil
import tempfile
from pathlib import Path
import pytest
from alfred.infrastructure.persistence import Memory, set_memory
@pytest.fixture
def app_temp(tmp_path):
"""Real folder structure: downloads, movies, tv_shows, torrents."""
(tmp_path / "downloads").mkdir()
(tmp_path / "movies").mkdir()
(tmp_path / "tv_shows").mkdir()
(tmp_path / "torrents").mkdir()
return tmp_path
@pytest.fixture
def memory_configured(app_temp, tmp_path):
"""
Fresh Memory with library_paths and workspace configured using the real API.
Replaces the broken memory_with_config from root conftest for these tests.
"""
import tempfile, os
storage = tempfile.mkdtemp()
mem = Memory(storage_dir=storage)
set_memory(mem)
mem.ltm.workspace.download = str(app_temp / "downloads")
mem.ltm.workspace.torrent = str(app_temp / "torrents")
mem.ltm.library_paths.set("movie", str(app_temp / "movies"))
mem.ltm.library_paths.set("tv_show", str(app_temp / "tv_shows"))
mem.save()
yield mem
shutil.rmtree(storage, ignore_errors=True)