Files
shawn c38a7b0fd8 Add main entry point + systemd services + integration tests
New files:
  main.py                   - PedalApp: boots all subsystems in order,
                              wires MIDI/footswitch callbacks, graceful
                              teardown reverses boot order
  src/system/config.py      - YAML config loader with deep-merge
                              (separated to avoid hardware deps)
  src/system/services.py    - systemd unit generator for pedal.service
                              + multi-fx-pedal.target
  scripts/install_service.sh - copies project, creates venv, installs
                              + enables service units
  tests/test_integration.py - 41 tests: boot, routing, display sync,
                              teardown, systemd content, CLI, edge cases

Modified:
  tests/conftest.py         - add project root to sys.path
2026-06-07 23:39:50 -04:00

14 lines
464 B
Python

"""Pytest configuration — add src and project root to sys.path for imports."""
import sys
from pathlib import Path
# Add both the src dir and project root so tests can import from
# both package-style (from src.midi.handler import ...) and
# entry-point-style (from main import ...)
PROJECT_ROOT = Path(__file__).resolve().parent.parent
SRC = PROJECT_ROOT / "src"
for p in [SRC, PROJECT_ROOT]:
if str(p) not in sys.path:
sys.path.insert(0, str(p))