refactor: rename project to LedGrab, split HA integration into separate repo
Lint & Test / test (push) Successful in 1m56s

- Rename Python package: wled_controller -> ledgrab
- Rename env var prefix: WLED_ -> LEDGRAB_ (with auto-migration for old vars)
- Rename localStorage key: wled_api_key -> ledgrab_api_key (with migration)
- Rename HA integration domain: wled_screen_controller -> ledgrab
- Update all imports, build scripts, Docker, installer, config, docs
- Remove HA integration (moved to ledgrab-haos-integration repo)
- Remove hacs.json (belongs in HA repo now)
- Add startup warning for users with old WLED_ env vars
- All tests pass (715/715), ruff clean, tsc clean, frontend builds
This commit is contained in:
2026-04-12 22:45:28 +03:00
parent 38f73badbf
commit 02cd9d519c
548 changed files with 3502 additions and 5180 deletions
+8 -6
View File
@@ -14,7 +14,7 @@ import pytest
# ---------------------------------------------------------------------------
# Isolate e2e tests from production data.
#
# We must set the config singleton BEFORE wled_controller.main is imported,
# We must set the config singleton BEFORE ledgrab.main is imported,
# because main.py reads get_config() at module level to create the DB and
# all stores. By forcing the singleton here we guarantee the app opens a
# throwaway SQLite file in a temp directory.
@@ -24,7 +24,7 @@ _e2e_tmp = Path(tempfile.mkdtemp(prefix="wled_e2e_"))
_test_db_path = str(_e2e_tmp / "test_ledgrab.db")
_test_assets_dir = str(_e2e_tmp / "test_assets")
import wled_controller.config as _config_mod # noqa: E402
import ledgrab.config as _config_mod # noqa: E402
# Build a Config that mirrors production settings but with isolated paths.
_original_config = _config_mod.Config.load()
@@ -54,7 +54,7 @@ def _test_client():
tests complete. The app uses the isolated test database set above.
"""
from fastapi.testclient import TestClient
from wled_controller.main import app
from ledgrab.main import app
with TestClient(app, raise_server_exceptions=False) as c:
yield c
@@ -80,12 +80,14 @@ def _clear_stores():
"""Remove all entities from all stores for test isolation."""
# Reset frozen-writes flags that restore flows set.
# Without this, subsequent tests can't persist data.
from wled_controller.storage.base_store import unfreeze_saves
from ledgrab.storage.base_store import unfreeze_saves
unfreeze_saves()
import wled_controller.storage.database as _db_mod
import ledgrab.storage.database as _db_mod
_db_mod._writes_frozen = False
from wled_controller.api import dependencies as deps
from ledgrab.api import dependencies as deps
store_clearers = [
(deps.get_device_store, "get_all_devices", "delete_device"),