Add runtime configuration file #34

Merged
JackFrostbyte merged 1 commit from feature/v0.6-issue-15-runtime-config into main 2026-05-09 20:10:09 -04:00

Summary

Adds a dedicated runtime configuration file for RGB Aura settings that should not require editing Python code.

Changes

  • Added config/runtime_config.json for runtime animation settings.
  • Added src/rgb_aura/runtime_config.py to load and validate runtime config safely.
  • Kept static OpenRGB device mapping separate in config/device_map.json.
  • Updated CLI handling so runtime config provides defaults.
  • Kept CLI arguments able to override runtime config values.
  • Added enabled logical zone filtering from runtime config.
  • Preserved the reserved ARGB zone safety guard.
  • Logged runtime config validation success and loaded config path.
  • Kept logging behavior from issue #14 intact.
  • Kept runtime guardrails from issue #13 intact.

Runtime config supports

  • Default cycles / duration mode values.
  • Default seed behavior.
  • Animation speed.
  • Shutdown dark-blue restore behavior.
  • Scheduler delay ranges.
  • Enabled/disabled logical zones.

Validation

  • ruff format src/rgb_aura scripts tests
  • ruff check src/rgb_aura scripts tests
  • PYTHONPATH=src python -m rgb_aura.main --help
  • PYTHONPATH=src python -m rgb_aura.main --cycles 1 --duration 5
  • PYTHONPATH=src python -m rgb_aura.main --runtime-config reports/dev/bad-runtime-config.json
  • PYTHONPATH=src python -m rgb_aura.main --runtime-config reports/dev/bad-runtime-config-reserved-zone.json
  • PYTHONPATH=src python -m rgb_aura.main
  • PYTHONPATH=src python -m rgb_aura.main --animation-speed 1.25

Result

  • Default runtime config runs successfully.
  • CLI override for --animation-speed 1.25 works.
  • Invalid config values fail safely with clear errors.
  • Reserved ARGB zone cannot be enabled from runtime config.
  • Public --help output no longer exposes local absolute paths.
## Summary Adds a dedicated runtime configuration file for RGB Aura settings that should not require editing Python code. ## Changes - Added `config/runtime_config.json` for runtime animation settings. - Added `src/rgb_aura/runtime_config.py` to load and validate runtime config safely. - Kept static OpenRGB device mapping separate in `config/device_map.json`. - Updated CLI handling so runtime config provides defaults. - Kept CLI arguments able to override runtime config values. - Added enabled logical zone filtering from runtime config. - Preserved the reserved ARGB zone safety guard. - Logged runtime config validation success and loaded config path. - Kept logging behavior from issue #14 intact. - Kept runtime guardrails from issue #13 intact. ## Runtime config supports - Default cycles / duration mode values. - Default seed behavior. - Animation speed. - Shutdown dark-blue restore behavior. - Scheduler delay ranges. - Enabled/disabled logical zones. ## Validation - `ruff format src/rgb_aura scripts tests` - `ruff check src/rgb_aura scripts tests` - `PYTHONPATH=src python -m rgb_aura.main --help` - `PYTHONPATH=src python -m rgb_aura.main --cycles 1 --duration 5` - `PYTHONPATH=src python -m rgb_aura.main --runtime-config reports/dev/bad-runtime-config.json` - `PYTHONPATH=src python -m rgb_aura.main --runtime-config reports/dev/bad-runtime-config-reserved-zone.json` - `PYTHONPATH=src python -m rgb_aura.main` - `PYTHONPATH=src python -m rgb_aura.main --animation-speed 1.25` ## Result - Default runtime config runs successfully. - CLI override for `--animation-speed 1.25` works. - Invalid config values fail safely with clear errors. - Reserved ARGB zone cannot be enabled from runtime config. - Public `--help` output no longer exposes local absolute paths.
JackFrostbyte deleted branch feature/v0.6-issue-15-runtime-config 2026-05-09 20:10:10 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JackFrostbyte/rgb-aura!34
No description provided.