Files
ledgrab/CONTRIBUTING.md
alexei.dolgolyov 02cd9d519c
Lint & Test / test (push) Successful in 1m56s
refactor: rename project to LedGrab, split HA integration into separate repo
- 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
2026-04-12 22:45:28 +03:00

1.6 KiB

Contributing

Prerequisites

  • Python 3.11+
  • Node.js 20+ (for frontend bundle)
  • Git

Development Setup

git clone https://git.dolgolyov-family.by/alexei.dolgolyov/ledgrab.git
cd ledgrab/server

# Python environment
python -m venv venv
source venv/bin/activate   # Linux/Mac
# venv\Scripts\activate    # Windows
pip install -e ".[dev]"

# Frontend dependencies
npm install
npm run build

Running the Server

cd server
export PYTHONPATH=$(pwd)/src   # Linux/Mac
# set PYTHONPATH=%CD%\src      # Windows
python -m ledgrab.main

Open http://localhost:8080 to access the dashboard.

Running Tests

cd server
pytest

Tests use pytest with pytest-asyncio. Coverage reports are generated automatically.

Code Style

This project uses black for formatting and ruff for linting (both configured in pyproject.toml with a line length of 100).

cd server
black src/ tests/
ruff check src/ tests/

Frontend Changes

After modifying any file under server/src/ledgrab/static/js/ or static/css/, rebuild the bundle:

cd server
npm run build

The browser loads the esbuild bundle (static/dist/), not the source files directly.

Commit Messages

Follow the Conventional Commits format:

feat: add new capture engine
fix: correct LED color mapping
refactor: extract filter pipeline
docs: update API reference
test: add audio source tests
chore: update dependencies

Pull Requests

  1. Create a feature branch from master
  2. Make your changes with tests
  3. Ensure ruff check and pytest pass
  4. Open a PR with a clear description of the change