# Dry run: two-commit plan ## Current state - **Staged:** 9 deleted files under old `src/` (boot, dma, main, patterns, settings, static/main.css, web, wifi, ws2812). - **Tracked elsewhere:** `pico/lib/`, `pico/test/leds.py`, `pico/test/rainbow.py` (already in repo). - **Unstaged / untracked:** Rest of restructure (more deletions, new `pico/src/`, `esp32/`, `main.py`, etc.). --- ## Commit 1: Folder restructure **Goal:** Remove old flat layout; no new code from led-driver yet. ### 1. Unstage current changes (so we can stage only restructure) ```bash git restore --staged . ``` ### 2. Stage only restructure changes **Deletions (remove old layout):** ```bash # Old top-level src/ (already partially staged; include all) git add -u src/ # Old lib (microdot, utemplate) git add -u lib/microdot/ git add -u lib/utemplate/ # Old box + test git rm box.scad box.stl test.py 2>/dev/null || true git add -u box.scad box.stl test.py ``` Or in one go (stage all deletions under src/, lib/, and the files): ```bash git restore --staged . git add -u src/ lib/ box.scad box.stl test.py ``` **Optional for restructure:** If you want commit 1 to also introduce the new tree shape (empty or minimal), you could add only the new directories with a single placeholder each—but Git doesn’t track empty dirs, so the “restructure” commit is usually just the removals. **Files that would be in commit 1 (deletions only):** | Path | Change | |------|--------| | `src/boot.py` | deleted | | `src/dma.py` | deleted | | `src/main.py` | deleted | | `src/patterns.py` | deleted | | `src/settings.py` | deleted | | `src/static/main.css` | deleted | | `src/static/main.js` | deleted | | `src/templates/index.html` | deleted | | `src/templates/index_html.py` | deleted | | `src/web.py` | deleted | | `src/wifi.py` | deleted | | `src/ws2812.py` | deleted | | `lib/microdot/__init__.py` | deleted | | `lib/microdot/helpers.py` | deleted | | `lib/microdot/microdot.py` | deleted | | `lib/microdot/utemplate.py` | deleted | | `lib/microdot/websocket.py` | deleted | | `lib/utemplate/__init__.py` | deleted | | `lib/utemplate/compiled.py` | deleted | | `lib/utemplate/recompile.py` | deleted | | `lib/utemplate/source.py` | deleted | | `box.scad` | deleted | | `box.stl` | deleted | | `test.py` | deleted | **Suggested commit message:** ``` Restructure: remove old flat src/lib layout - Remove src/, lib/microdot, lib/utemplate, box.*, test.py - Pico/ESP32 layout and led-driver code in follow-up commit ``` ### 3. (Dry run) Show what would be committed ```bash git status git diff --cached --stat ``` --- ## Commit 2: Import code from led-driver **Goal:** Add pico/ and esp32/ app code and top-level entrypoint (from led-driver). ### 1. Stage new and modified files ```bash # New layout: pico app and tests git add pico/src/ git add pico/test/patterns/ git add pico/test/test_espnow_receive.py git add -u pico/test/leds.py git add -u pico/test/rainbow.py # ESP32 app and tests git add esp32/ # Top-level entrypoint git add main.py # Tooling / docs (if you want them in this commit) git add dev.py README.md # Optional git add Pipfile Pipfile.lock ``` ### 2. Files that would be in commit 2 **New files (led-driver / app):** | Path | |------| | `main.py` | | `pico/src/main.py` | | `pico/src/p2p.py` | | `pico/src/preset.py` | | `pico/src/presets.py` | | `pico/src/settings.py` | | `pico/src/utils.py` | | `pico/src/patterns/__init__.py` | | `pico/src/patterns/blink.py` | | `pico/src/patterns/chase.py` | | `pico/src/patterns/circle.py` | | `pico/src/patterns/pulse.py` | | `pico/src/patterns/rainbow.py` | | `pico/src/patterns/transition.py` | | `esp32/src/main.py` | | `esp32/test/test_uart_send_json.py` | | `esp32/test/test_uart_tx.py` | | `pico/test/patterns/auto_manual.py` | | `pico/test/patterns/blink.py` | | … (other pico/test/patterns/*) | **Modified:** | Path | |------| | `pico/test/leds.py` | | `pico/test/rainbow.py` | | `dev.py` | | `README.md` (optional) | **Optional (tooling):** | Path | |------| | `Pipfile` | | `Pipfile.lock` | **Suggested commit message:** ``` Import led-driver app: pico/ and esp32/ layout - pico/src: main, presets, settings, patterns (UART JSON) - esp32/src: main (UART sender) - main.py top-level entrypoint - pico/test: pattern tests, test_espnow_receive - dev.py: deploy by device (pico | esp32) ``` ### 3. (Dry run) Show what would be committed ```bash git status git diff --cached --stat ``` --- ## Summary | Step | Action | Commit message | |------|--------|----------------| | 1 | `git restore --staged .` then stage only `src/` `lib/` `box.scad` `box.stl` `test.py` deletions | Restructure: remove old flat src/lib layout | | 2 | Commit | (above) | | 3 | Stage `pico/src/`, `pico/test/` changes, `esp32/`, `main.py`, optionally `dev.py` `README.md` `Pipfile*` | Import led-driver app: pico/ and esp32/ layout | | 4 | Commit | (above) | No commits are made in this dry run; run the `git add` and `git status` / `git diff --cached --stat` commands to confirm before running `git commit`.