Define portable device profile schema #96

Merged
JackFrostbyte merged 1 commit from feature/issue-66-device-profile-schema into develop 2026-05-23 01:58:12 -04:00

Closes #66.

Summary

Implemented the minimal portable device_profile.json schema foundation for the v1.1.0 RGB Aura device/profile work.

This PR adds:

  • schemas/device_profile.schema.json

    • Formal JSON Schema contract for portable device profiles.
    • Includes device and zone role, enabled, and zone layout.
    • Supports discovered-but-not-driven devices/zones through ignored, reserved, and unknown roles.
    • Supports the initial layout enum:
      • linear
      • unknown
    • Supports the initial device type enum:
      • fan
      • motherboard
      • gpu
      • keyboard
      • mouse
      • memory
      • unknown
  • config/device_profile.example.json

    • Jack’s example machine profile, derived from the current config/device_map.json.
    • Keeps current controlled internal RGB Aura scope represented:
      • GPU
      • motherboard
      • top Fractal fans
      • Thermaltake/front fans
    • Keeps non-controlled or unsafe scope represented but disabled:
      • reserved ARGB zone as reserved + enabled: false
      • Corsair K70 RGB PRO keyboard as ignored + enabled: false
      • Logitech G502 Hero mouse as ignored + enabled: false
      • memory/static RAM lighting as ignored + enabled: false
  • src/rgb_aura/device_profile.py

    • Adds a non-hardware-touching validation helper.
    • Loads and validates portable device profiles.
    • Returns typed dataclasses.
    • Produces structured diagnostics containing:
      • field path
      • expected
      • got
      • how to fix
      • example
    • Exposes usable_animation_zones, excluding disabled, ignored, reserved, and unknown zones.
  • tests/test_device_profile.py

    • Adds coverage for the issue #66 acceptance criteria.

Safety / scope

This PR targets develop.

This PR does not change runtime behavior.

config/device_map.json remains the current runtime source of truth. No OpenRGB hardware access, writer logic, runtime startup behavior, animation behavior, shutdown restore behavior, systemd ordering, or service behavior is changed.

Ignored/reserved devices and zones are explicitly representable without being treated as controlled animation targets.

Hardware verification is not required for this PR because it only adds schema/profile validation helpers and does not touch runtime hardware behavior.

Verification

Ran:

python -m pytest
python -m ruff format --check src tests scripts
python -m ruff check src tests scripts

Result:

108 passed, 11 skipped
36 files already formatted
All checks passed!
Closes #66. ## Summary Implemented the minimal portable `device_profile.json` schema foundation for the v1.1.0 RGB Aura device/profile work. This PR adds: - `schemas/device_profile.schema.json` - Formal JSON Schema contract for portable device profiles. - Includes device and zone `role`, `enabled`, and zone `layout`. - Supports discovered-but-not-driven devices/zones through `ignored`, `reserved`, and `unknown` roles. - Supports the initial layout enum: - `linear` - `unknown` - Supports the initial device type enum: - `fan` - `motherboard` - `gpu` - `keyboard` - `mouse` - `memory` - `unknown` - `config/device_profile.example.json` - Jack’s example machine profile, derived from the current `config/device_map.json`. - Keeps current controlled internal RGB Aura scope represented: - GPU - motherboard - top Fractal fans - Thermaltake/front fans - Keeps non-controlled or unsafe scope represented but disabled: - reserved ARGB zone as `reserved` + `enabled: false` - Corsair K70 RGB PRO keyboard as `ignored` + `enabled: false` - Logitech G502 Hero mouse as `ignored` + `enabled: false` - memory/static RAM lighting as `ignored` + `enabled: false` - `src/rgb_aura/device_profile.py` - Adds a non-hardware-touching validation helper. - Loads and validates portable device profiles. - Returns typed dataclasses. - Produces structured diagnostics containing: - field path - expected - got - how to fix - example - Exposes `usable_animation_zones`, excluding disabled, ignored, reserved, and unknown zones. - `tests/test_device_profile.py` - Adds coverage for the issue #66 acceptance criteria. ## Safety / scope This PR targets `develop`. This PR does not change runtime behavior. `config/device_map.json` remains the current runtime source of truth. No OpenRGB hardware access, writer logic, runtime startup behavior, animation behavior, shutdown restore behavior, systemd ordering, or service behavior is changed. Ignored/reserved devices and zones are explicitly representable without being treated as controlled animation targets. Hardware verification is not required for this PR because it only adds schema/profile validation helpers and does not touch runtime hardware behavior. ## Verification Ran: ```bash python -m pytest python -m ruff format --check src tests scripts python -m ruff check src tests scripts ``` Result: ```text 108 passed, 11 skipped 36 files already formatted All checks passed! ```
JackFrostbyte deleted branch feature/issue-66-device-profile-schema 2026-05-23 01:58:13 -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!96
No description provided.