Skip to content

[codex] ingest Espressif USB PID registry - #856

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

zackees merged 1 commit into
mainfrom
codex/espressif-usb-pids

Conversation

@zackees

@zackees zackees commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds an Espressif USB PID registry fetcher for the online-data refresh pipeline.

  • Parses the official espressif/usb-pids customer and devboard PID lists.
  • Emits merge-compatible vvvv:pppp JSON so product names land in usb-vid.json and the www SQLite vidpid table.
  • Wires the fetch into update-data.yml as a fault-tolerant USB source and documents the source/caveat in online-data-tools/README.md.

Validation

  • git diff --check
  • uv run --no-project --with pytest pytest online-data-tools/test_espressif_usb_pids.py -v
  • Live smoke: fetch_espressif_usb_pids.py fetched 929 entries and confirmed 303a:8001 = Unexpected Maker TinyS2 - Arduino and 303a:1001 = USB JTAG/serial debug unit.

Refs #723
Part of #722

Summary by CodeRabbit

  • New Features

    • Added support for importing an additional Espressif USB PID source into the data update process.
    • Expanded USB VID:PID documentation with a new supplement section and updated test instructions.
  • Bug Fixes

    • Improved handling of duplicate and malformed PID entries to keep merged USB data consistent.
    • Preserved existing product names when upstream registry data repeats an existing PID.
  • Tests

    • Added coverage for PID parsing, merge behavior, and JSON output generation.

@zackees
zackees merged commit 7cc15ab into main Jun 30, 2026
5 of 13 checks passed
@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: c8a02bc0-40b3-4bed-8d49-9b6c0cda1de7

📥 Commits

Reviewing files that changed from the base of the PR and between a53f651 and b2003ce.

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

📝 Walkthrough

Walkthrough

Adds fetch_espressif_usb_pids.py, a script that downloads Espressif's USB PID registry, parses it into 303a:<pid> keyed JSON, and merges it with built-in entries. The update-data.yml workflow gains a non-fatal fetch step and conditionally passes the output to the USB-VID merge. Tests and README docs are included.

Changes

Espressif USB PID fetch/merge pipeline

Layer / File(s) Summary
Script: constants, parsing, collect, main
online-data-tools/fetch_espressif_usb_pids.py
Defines upstream registry URLs, built-in PID→product map, _fetch/_clean_product_name helpers, parse_pid_registry (with duplicate rejection), collect (built-in authority, URL merging), and main (writes sorted indented JSON).
Tests
online-data-tools/test_espressif_usb_pids.py
Five pytest tests cover normalization/noise-skipping, ValueError on conflicting duplicates, collect merging with mocked fetchers, built-in name preservation, and main JSON output wiring.
Workflow integration and docs
.github/workflows/update-data.yml, online-data-tools/README.md
Adds fetch-espressif-pids step (non-fatal), conditional --json argument in the USB-VID merge step, summary table row for the new step, and README documentation with test command.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Poem

🐰 Hop, hop, hooray for PIDs galore,
The Espressif registry knocks at my door!
I parse every row with a flick of my paw,
Merge built-ins first — that's the law!
Now 303a keys line up neat,
USB device names, oh what a treat! 🎉

✨ 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/espressif-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 deleted the codex/espressif-usb-pids branch June 30, 2026 15:45
@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.

1 participant