Skip to content

[codex] Add Microchip USB PID supplement#868

Merged
zackees merged 1 commit into
mainfrom
codex/microchip-usb-pids
Jun 30, 2026
Merged

[codex] Add Microchip USB PID supplement#868
zackees merged 1 commit into
mainfrom
codex/microchip-usb-pids

Conversation

@zackees

@zackees zackees commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

Adds Microchip / Atmel USB PID ingestion for the online-data refresh.

  • adds fetch_microchip_usb_pids.py with explicit --tier first-party, --tier supplemental, and --tier all modes
  • first-party tier parses Microchip-maintained pyedbglib and pykitinfo
  • weak supplemental tier parses AVRDUDE plus selected Arduino/LowPowerLab board package rows after stronger sources
  • wires both tiers into the nightly workflow and documents the source priority/caveats

Notes

Third-party SDK/package data is intentionally weak: it fills gaps after Microchip first-party and generic USB-ID data, but does not override them.

The README also records the LowPowerLab current_ranger mismatch: the current external package maps CurrentRanger to 04d8:ee44/ee48/ee4c, while local FastLED board JSON carries current_ranger as 04d8:eee5.

Closes #728.

Validation

  • uv run --no-project --with pytest pytest online-data-tools/test_microchip_usb_pids.py -v
  • uv run --no-project --with ruff ruff check online-data-tools/fetch_microchip_usb_pids.py online-data-tools/test_microchip_usb_pids.py
  • uv run --no-project --with pytest pytest online-data-tools/test_espressif_usb_pids.py online-data-tools/test_raspberrypi_usb_pids.py online-data-tools/test_nordic_usb_pids.py online-data-tools/test_microchip_usb_pids.py online-data-tools/test_ftdi_usb_pids.py online-data-tools/test_wch_usb_pids.py online-data-tools/test_teensy_usb_pids.py online-data-tools/test_stm_usb_pids.py online-data-tools/test_nxp_usb_pids.py online-data-tools/test_silabs_usb_pids.py -v
  • actionlint .github/workflows/update-data.yml
  • git diff --check
  • live first-party and supplemental fetch smoke
  • merge smoke with first-party before linux-usb.org and weak supplemental after it

Summary by CodeRabbit

  • New Features
    • Added support for collecting and merging additional Microchip USB PID data into the aggregated USB device catalog.
    • Added a new data-fetching utility for Microchip USB VID:PID records with tiered output options.
  • Bug Fixes
    • Improved handling of partial data updates so available sources can still be included when some fetches fail.
  • Tests
    • Added coverage for Microchip USB PID parsing, merging, and command-line output.
  • Documentation
    • Updated the tool documentation to include the new Microchip data source and usage details.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9a9801d9-bcca-483c-8bd6-1f86664efb37

📥 Commits

Reviewing files that changed from the base of the PR and between 8513b4d and ff57d14.

📒 Files selected for processing (4)
  • .github/workflows/update-data.yml
  • online-data-tools/README.md
  • online-data-tools/fetch_microchip_usb_pids.py
  • online-data-tools/test_microchip_usb_pids.py

📝 Walkthrough

Walkthrough

Adds fetch_microchip_usb_pids.py, a new Python script that fetches Microchip/Atmel USB VID:PID data from pyedbglib, pykitinfo, AVRDUDE, Arduino boards, and LowPowerLab sources across two tiers (first-party and supplemental). Both tiers are wired into the update-data.yml workflow. A pytest suite validates all parsers using network-free fixtures. README is updated accordingly.

Changes

Microchip USB PID Ingest

Layer / File(s) Summary
Constants, data shapes, and regex patterns
online-data-tools/fetch_microchip_usb_pids.py
Defines VID constants, upstream URLs, PYEDBGLIB_PRODUCTS mapping, AvrdudeEntry dataclass, AVRDUDE_PRODUCTS table, and compile-time regex patterns for all parsers.
HTTP fetch helpers and mapping utilities
online-data-tools/fetch_microchip_usb_pids.py
Implements _fetch_text/_fetch_bytes, _vendor_for_vid, PID-to-entry converters, supplemental merge helper, and product name normalization.
First-party parsers: pyedbglib and pykitinfo
online-data-tools/fetch_microchip_usb_pids.py
Implements parse_pyedbglib_toolinfo (regex with validation) and parse_pykitinfo_tools (AST-based resolver with CDC/name normalization), plus _literal_with_names.
Supplemental parsers: AVRDUDE, Arduino boards, LowPowerLab
online-data-tools/fetch_microchip_usb_pids.py
Implements parse_avrdude_usbdevs, _collapse_board_products, parse_arduino_boards, and parse_lowpowerlab_package with ZIP extraction.
Tier dispatch, collect functions, and CLI main
online-data-tools/fetch_microchip_usb_pids.py
Implements collect_first_party, collect_supplemental, collect tier dispatcher, main() CLI with argparse and JSON output.
Test fixtures and pytest suite
online-data-tools/test_microchip_usb_pids.py
Network-free string/zip fixtures and pytest tests covering all parsers, collect tier precedence, and main() via monkeypatching.
Workflow wiring and README docs
.github/workflows/update-data.yml, online-data-tools/README.md
Adds two continue-on-error fetch steps (first-party and supplemental) to the workflow, conditionally merges their outputs, updates the summary table, and documents the script in README.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐇 Hop hop, the PIDs align,
From pyedbglib's constants so fine,
AVRDUDE, Arduino too,
Each tier fills gaps right on cue,
No duplicate shall override,
With JSON sorted, test-verified! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/microchip-usb-pids

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit 1a9e912 into main Jun 30, 2026
5 of 14 checks passed
@zackees
zackees deleted the codex/microchip-usb-pids branch June 30, 2026 16:57
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

vid-ingest: Microchip / Atmel (0x03EB, 0x04D8 — AVR + SAMD)

1 participant