Add runtime configuration file #15

Closed
opened 2026-05-05 02:16:20 -04:00 by JackFrostbyte · 1 comment

Title:
Add runtime configuration file

Description:
Add a runtime configuration file for controller options that should not require editing Python code.

Scope:

  • Add config for brightness/speed modifiers if practical.
  • Add config for enabled/disabled logical zones.
  • Add config for default seed behavior.
  • Add config for default shutdown behavior.
  • Keep device mapping separate from runtime animation settings.

Acceptance criteria:

  • Runtime settings are loaded from a config file.
  • Static device mapping remains separate.
  • Invalid config values fail safely with clear errors.
Title: Add runtime configuration file Description: Add a runtime configuration file for controller options that should not require editing Python code. Scope: - Add config for brightness/speed modifiers if practical. - Add config for enabled/disabled logical zones. - Add config for default seed behavior. - Add config for default shutdown behavior. - Keep device mapping separate from runtime animation settings. Acceptance criteria: - Runtime settings are loaded from a config file. - Static device mapping remains separate. - Invalid config values fail safely with clear errors.
Author
Owner

Completed in PR #34 / commit 2e12328.

Implemented a dedicated runtime configuration file for RGB Aura:

  • Added config/runtime_config.json.
  • Added src/rgb_aura/runtime_config.py with safe config loading and validation.
  • Kept static OpenRGB device mapping separate in config/device_map.json.
  • Added config support for:
    • default cycles / duration behavior,
    • default seed behavior,
    • animation speed,
    • shutdown dark-blue restore behavior,
    • scheduler delay ranges,
    • enabled logical zones.
  • Preserved CLI overrides for runtime config values.
  • Added validation failure handling with clear errors.
  • Prevented the reserved ARGB zone from being enabled through runtime config.
  • Preserved issue #13 runtime guardrails.
  • Preserved issue #14 logging behavior.
  • Cleaned public --help output so it no longer exposes local absolute paths.

Validation completed:

  • 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
  • invalid runtime config test
  • reserved-zone runtime config test
  • default runtime test
  • 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.
  • Reserved ARGB zone remains untouched.
Completed in PR #34 / commit `2e12328`. Implemented a dedicated runtime configuration file for RGB Aura: - Added `config/runtime_config.json`. - Added `src/rgb_aura/runtime_config.py` with safe config loading and validation. - Kept static OpenRGB device mapping separate in `config/device_map.json`. - Added config support for: - default cycles / duration behavior, - default seed behavior, - animation speed, - shutdown dark-blue restore behavior, - scheduler delay ranges, - enabled logical zones. - Preserved CLI overrides for runtime config values. - Added validation failure handling with clear errors. - Prevented the reserved ARGB zone from being enabled through runtime config. - Preserved issue #13 runtime guardrails. - Preserved issue #14 logging behavior. - Cleaned public `--help` output so it no longer exposes local absolute paths. Validation completed: - `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` - invalid runtime config test - reserved-zone runtime config test - default runtime test - `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. - Reserved ARGB zone remains untouched.
Sign in to join this conversation.
No labels
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#15
No description provided.