Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursor/environment.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"github.com/PyDevices/.github",
"github.com/PyDevices/cmods",
"github.com/PyDevices/displayif",
"github.com/PyDevices/graphics",
"github.com/PyDevices/pygraphics",
"github.com/PyDevices/lv_bindings",
"github.com/PyDevices/lv_circuitpython_mod",
"github.com/PyDevices/lv_cpython_mod",
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cmods/
├── micropython/ shallow clone @ latest stable tag (e.g. v1.28.0)
├── circuitpython/ shallow clone @ latest stable tag (e.g. 10.2.1)
├── displayif -> /agent/repos/displayif
├── graphics -> /agent/repos/graphics
├── pygraphics -> /agent/repos/pygraphics
├── lv_bindings -> /agent/repos/lv_bindings
├── lv_circuitpython_mod -> /agent/repos/lv_circuitpython_mod
├── lv_cpython_mod -> /agent/repos/lv_cpython_mod
Expand Down Expand Up @@ -144,7 +144,7 @@ token that can **push** branches into `/agent/repos/*` checkouts, but that
token often **cannot** `createPullRequest` on sibling repos (GraphQL
`Resource not accessible by integration`). `ManagePullRequest` is also bound
to the agent’s primary repo (`.github`), so it will not open PRs on
`graphics`, `pydisplay`, etc.
`pygraphics`, `pydisplay`, etc.

**Use the workspace secret `PYDEVICES_GH_TOKEN`** (org/admin PAT, injected into
the environment) when creating or updating PRs on any PyDevices sibling:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Repo directory and root-file layout (`src/`, `lib/`, `tests/`,
- **[micropython-hardware](https://github.com/PyDevices/micropython-hardware)** — board configs and hardware drivers (display/touch/bus/…).
- **[mpftp](https://github.com/PyDevices/mpftp)** — VS Code / Cursor board tools (REPL, file transfer, firmware).
- **[lv_bindings](https://github.com/PyDevices/lv_bindings)** — the LVGL binding generator; source of truth for the native LVGL cmods.
- **Native modules** — [displayif](https://github.com/PyDevices/displayif), [graphics](https://github.com/PyDevices/graphics) (also pure-Python `pydisplay-graphics`), [usdl2](https://github.com/PyDevices/usdl2) (also pure-Python `usdl2-py`), [lv_micropython_cmod](https://github.com/PyDevices/lv_micropython_cmod), [lv_circuitpython_mod](https://github.com/PyDevices/lv_circuitpython_mod), [lv_cpython_mod](https://github.com/PyDevices/lv_cpython_mod).
- **Native modules** — [displayif](https://github.com/PyDevices/displayif), [pygraphics](https://github.com/PyDevices/pygraphics) (also pure-Python `pygraphics`), [usdl2](https://github.com/PyDevices/usdl2) (also pure-Python `usdl2-py`), [lv_micropython_cmod](https://github.com/PyDevices/lv_micropython_cmod), [lv_circuitpython_mod](https://github.com/PyDevices/lv_circuitpython_mod), [lv_cpython_mod](https://github.com/PyDevices/lv_cpython_mod).
- **[cmods](https://github.com/PyDevices/cmods)** — workspace wrapper that builds/smoke-tests the native cmods together.
- **[pydisplay_android](https://github.com/PyDevices/pydisplay_android)** — Android packaging (python-for-android/buildozer).

Expand Down
6 changes: 3 additions & 3 deletions docs/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ so it can sync with the org clone without being a product/docs surface.

(Multimer is out of scope for this work.)

- [ ] Optimize `lib/graphics` first, then `graphics_cmod`, for microcontrollers — memory, storage, and speed. Floating point? *(pydisplay, cmods — graphics)*
- [ ] Verify `graphics-cmod` and `src/lib/graphics` parity using an MCU emulator *(cmods — graphics, pydisplay)*
- [ ] Same MCU optimization pass for `eventsys` and `displaysys` (consecutively or concurrently with graphics) *(pydisplay)*
- [ ] Optimize `lib/pygraphics` first, then `pygraphics-cmod`, for microcontrollers — memory, storage, and speed. Floating point? *(pydisplay, cmods — pygraphics)*
- [ ] Verify `pygraphics-cmod` and `src/lib/pygraphics` parity using an MCU emulator *(cmods — pygraphics, pydisplay)*
- [ ] Same MCU optimization pass for `eventsys` and `displaysys` (consecutively or concurrently with pygraphics) *(pydisplay)*

### pdwidgets

Expand Down
10 changes: 5 additions & 5 deletions docs/PLATFORM_FEASIBILITY_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ PyDevices’ stated goal is to run **pydisplay everywhere Python runs with a usa

| Layer | Repos | Role |
|-------|-------|------|
| Application API | `pydisplay` (`displaysys`, `eventsys`, `graphics`, `multimer`) | Portable RGB565 display contract, unified input events, timers |
| Hardware acceleration | `displayif`, `graphics`, `usdl2` | Native C modules for bus/framebuffer interfaces, drawing, SDL2 subset |
| Application API | `pydisplay` (`displaysys`, `eventsys`, `pygraphics`, `multimer`) | Portable RGB565 display contract, unified input events, timers |
| Hardware acceleration | `displayif`, `pygraphics`, `usdl2` | Native C modules for bus/framebuffer interfaces, drawing, SDL2 subset |
| GUI toolkit (optional) | `lv_bindings` + `lv_*_mod` | LVGL bindings for all three Python runtimes |
| Packaging | `pydisplay_android`, TestPyPI wheels, MIP/`installer.py` | APK path and prebuilt packages |
| Build workspace | `cmods` | Optional multi-usermod MicroPython build orchestration |
Expand Down Expand Up @@ -57,7 +57,7 @@ PyDevices’ stated goal is to run **pydisplay everywhere Python runs with a usa

This report is based on:

1. README, platform docs, and source review across **all owned repos**: `pydisplay`, `pydisplay_android`, `displayif`, `graphics`, `usdl2`, `cmods`, `lv_bindings`, `lv_micropython_cmod`, `lv_circuitpython_mod`, `lv_cpython_mod`, `PyDevices.github.io`, `.github`.
1. README, platform docs, and source review across **all owned repos**: `pydisplay`, `pydisplay_android`, `displayif`, `pygraphics`, `usdl2`, `cmods`, `lv_bindings`, `lv_micropython_cmod`, `lv_circuitpython_mod`, `lv_cpython_mod`, `PyDevices.github.io`, `.github`.
2. Mapping each target to existing **display backend contracts**, **runtime availability** (MicroPython / CircuitPython / CPython), and **packaging** paths already in the ecosystem.
3. External platform constraints (store policies, official language runtimes, input modalities) where the codebase has no prior work.
4. **2026-07-15 triage** with Brad — decisions in the summary table above supersede earlier “recommended priority” wording elsewhere in this doc.
Expand Down Expand Up @@ -119,7 +119,7 @@ Embedded Linux kiosks (Raspberry Pi without desktop, industrial HMI, digital sig
| Approach | Reuses existing code | Pros | Cons |
|----------|---------------------|------|------|
| **A. SDL `kmsdrm` video driver** | `SDLDisplay`, `usdl2`, `eventsys`, `multimer._sdl2` | Smallest diff; same Python API | Needs SDL2 with KMS; input via `evdev`/SDL; dependency on SDL behavior |
| **B. New `LinuxFBDisplay` (fbdev mmap)** | `DisplayDriver` contract, `graphics` | No X11/Wayland; true bare metal feel | New C extension or ctypes; rotation/format quirks; deprecated on many distros |
| **B. New `LinuxFBDisplay` (fbdev mmap)** | `DisplayDriver` contract, `pygraphics` | No X11/Wayland; true bare metal feel | New C extension or ctypes; rotation/format quirks; deprecated on many distros |
| **C. New `DRMDisplay` (libdrm/GBM)** | Same | Modern, zero-copy potential with `displayif`-style thinking | Most engineering; buffer management; mode-setting |
| **D. LVGL linux fbdev/drm driver + flush shim** | `lv_cpython_mod` / `lv_micropython_cmod` | LVGL already has drivers | Bypasses pydisplay `show()` path unless integrated as backend |

Expand Down Expand Up @@ -309,7 +309,7 @@ Cloud agents: pick any **Pursue now** stream; do **not** reopen ruled-out target

## Conclusion

PyDevices is **well architected for portability**: the `DisplayDriver` RGB565 contract, `board_config` wiring pattern, and split between pure Python (`pydisplay`) and native acceleration (`displayif`, `graphics`, `usdl2`) make **incremental platform additions** possible without rewriting application code.
PyDevices is **well architected for portability**: the `DisplayDriver` RGB565 contract, `board_config` wiring pattern, and split between pure Python (`pydisplay`) and native acceleration (`displayif`, `pygraphics`, `usdl2`) make **incremental platform additions** possible without rewriting application code.

**Org focus (2026-07-15):**

Expand Down
4 changes: 2 additions & 2 deletions docs/frozen-self-installer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ touches pydisplay + micropython-lib (+ desktop MicroPython freeze).

- [ ] Warn users where downloads come from: PyDevices micropython-lib MIP index (`https://PyDevices.github.io/micropython-lib/mip/PyDevices`), not the [official MicroPython micropython-lib](https://github.com/micropython/micropython-lib) package index — **maintainer-published**, not an endorsed upstream source (show URL on first run / in GUI)
- [ ] Freeze a small bootstrap module into desktop MicroPython builds so `from <xyz> import <clever_install_fn>` works out of the box
- [ ] Install or refresh all 3 core modules (`displaysys`, `eventsys`, `graphics`, `multimer`) via `mip` / `lib_install`-style fetch (skip re-download when up to date?)
- [ ] Install or refresh all 3 core modules (`displaysys`, `eventsys`, `pygraphics`, `multimer`) via `mip` / `lib_install`-style fetch (skip re-download when up to date?)
- [ ] Post-install GUI (TBD: terminal menu vs minimal on-display UI): download more files, system/platform info, `lv_test_timer_*`-style sanity checks, link to `spotapi_remote` / spotapi
- [ ] Flesh out scope, module name, and UX (name the import, entry points, error handling offline)

Expand All @@ -20,7 +20,7 @@ from <xyz> import <clever_install_fn> # name TBD
<clever_install_fn>() # fetch or refresh core libs, then optional GUI
```

**What gets installed first:** The four `src/lib` packages only — `displaysys`, `eventsys`, `graphics`, `multimer`. Add-ons, examples, and board configs stay optional later steps.
**What gets installed first:** The four `src/lib` packages only — `displaysys`, `eventsys`, `pygraphics`, `multimer`. Add-ons, examples, and board configs stay optional later steps.

**Source of truth:** Maintainer-published packages from the PyDevices micropython-lib fork, published via pydisplay [`scripts/publish_sync_packages.sh`](https://github.com/PyDevices/pydisplay/blob/main/scripts/publish_sync_packages.sh) → MIP index at `https://PyDevices.github.io/micropython-lib/mip/PyDevices`. Same channel as [`installer.py`](https://github.com/PyDevices/pydisplay/blob/main/installer.py) `lib_install()` ([installation/mip-micropython-lib.md](https://pydisplay.readthedocs.io/en/latest/installation/mip-micropython-lib.html) on RTD describes the index; this installer should **warn explicitly** that it is not the official MicroPython micropython-lib registry).

Expand Down
4 changes: 2 additions & 2 deletions docs/github-presence.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ landing cards use compact inline icons. Header brand stays on the shared org log
| [lv_bindings](https://github.com/PyDevices/lv_bindings) | LVGL C→binding generator (source of truth for the native cmods) | [pydevices.github.io/lv_bindings](https://pydevices.github.io/lv_bindings/) |
| [cmods](https://github.com/PyDevices/cmods) | Workspace that builds/smoke-tests the native-module matrix together | [pydevices.github.io/cmods](https://pydevices.github.io/cmods/) |
| [displayif](https://github.com/PyDevices/displayif) | Native display bus/framebuffer modules | [pydevices.github.io/displayif](https://pydevices.github.io/displayif/) |
| [graphics](https://github.com/PyDevices/graphics) | Native (`graphics-cmod`) + pure-Python (`pydisplay-graphics`) FrameBuffer/Area | [pydevices.github.io/graphics](https://pydevices.github.io/graphics/) |
| [pygraphics](https://github.com/PyDevices/pygraphics) | Native (`pygraphics-cmod`) + pure-Python (`pygraphics`) FrameBuffer/Area | [pydevices.github.io/pygraphics](https://pydevices.github.io/pygraphics/) |
| [usdl2](https://github.com/PyDevices/usdl2) | Native (`usdl2`) + pure-Python (`usdl2-py`) SDL2 subset for pydisplay's desktop backend | [pydevices.github.io/usdl2](https://pydevices.github.io/usdl2/) |
| [lv_micropython_cmod](https://github.com/PyDevices/lv_micropython_cmod) | MicroPython user C module glue for LVGL | [pydevices.github.io/lv_micropython_cmod](https://pydevices.github.io/lv_micropython_cmod/) |
| [lv_circuitpython_mod](https://github.com/PyDevices/lv_circuitpython_mod) | CircuitPython integration for LVGL | [pydevices.github.io/lv_circuitpython_mod](https://pydevices.github.io/lv_circuitpython_mod/) |
Expand All @@ -87,7 +87,7 @@ All owned repos are **MIT**, using GitHub's standard single-author template
(so it's correctly detected as MIT rather than `NOASSERTION`/`Other`). A
handful of files in **pydisplay** that still carry code from other authors
(`src/add_ons/tft_text.py`, `tft_write.py`, `tft_bitmap.py`, and the
`polygon()` function in `src/lib/graphics/_shapes.py`, tracing back through
`polygon()` function in `lib/pygraphics/_shapes.py`, tracing back through
Russ Hughes' st7789_mpy driver to Ivan Belokobylskiy's st7789py_mpy) keep
their own self-contained MIT header with that attribution — those in-file
notices govern those specific files/functions; the root `LICENSE` governs
Expand Down
2 changes: 1 addition & 1 deletion profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ the desktop and the browser.
- **[palettes](https://github.com/PyDevices/palettes)** / **[pdwidgets](https://github.com/PyDevices/pdwidgets)** — color toolkit and lightweight widgets for pydisplay.
- **[micropython-hardware](https://github.com/PyDevices/micropython-hardware)** — board configs and hardware drivers for MicroPython and CircuitPython.
- **[lv_bindings](https://github.com/PyDevices/lv_bindings)** — generates native [LVGL](https://lvgl.io/) bindings for MicroPython, CircuitPython, and CPython from one source of truth.
- **Native modules** — [displayif](https://github.com/PyDevices/displayif), [graphics](https://github.com/PyDevices/graphics) (also pure-Python `pydisplay-graphics`), [usdl2](https://github.com/PyDevices/usdl2) (also pure-Python `usdl2-py`), [lv_micropython_cmod](https://github.com/PyDevices/lv_micropython_cmod), [lv_circuitpython_mod](https://github.com/PyDevices/lv_circuitpython_mod), and [lv_cpython_mod](https://github.com/PyDevices/lv_cpython_mod).
- **Native modules** — [displayif](https://github.com/PyDevices/displayif), [pygraphics](https://github.com/PyDevices/pygraphics) (also pure-Python `pygraphics`), [usdl2](https://github.com/PyDevices/usdl2) (also pure-Python `usdl2-py`), [lv_micropython_cmod](https://github.com/PyDevices/lv_micropython_cmod), [lv_circuitpython_mod](https://github.com/PyDevices/lv_circuitpython_mod), and [lv_cpython_mod](https://github.com/PyDevices/lv_cpython_mod).
- **[cmods](https://github.com/PyDevices/cmods)** — the workspace that builds and smoke-tests the whole native-module matrix together.
- **[pydisplay_android](https://github.com/PyDevices/pydisplay_android)** — the Android APK path for pydisplay.
- **[mpftp](https://github.com/PyDevices/mpftp)** — VS Code / Cursor board tools (REPL, file transfer, firmware). State under `~/.mpftp/`.
Expand Down
2 changes: 1 addition & 1 deletion scripts/cloud-python-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if bin="$(ensure_venv pydisplay)"; then
sp="$("$bin/python" -c 'import site; print(site.getsitepackages()[0])' 2>/dev/null)"
if [[ -n "${sp:-}" ]]; then
printf '%s\n%s\n%s\n%s\n' \
"$REPOS/palettes/lib" "$REPOS/pdwidgets/lib" "$REPOS/graphics/lib" \
"$REPOS/palettes/lib" "$REPOS/pdwidgets/lib" "$REPOS/pygraphics/lib" \
"$REPOS/usdl2/lib" \
> "$sp/pydevices_siblings.pth"
log "wrote $sp/pydevices_siblings.pth"
Expand Down
6 changes: 3 additions & 3 deletions scripts/cloud-workspace-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ORG="${PYDEVICES_GITHUB_ORG:-PyDevices}"
SIBLINGS=(
cmods
displayif
graphics
pygraphics
lv_bindings
lv_circuitpython_mod
lv_cpython_mod
Expand Down Expand Up @@ -202,7 +202,7 @@ ensure_lv_cpython_lvgl_symlink() {

verify_ready() {
local name missing=0
for name in cmods displayif graphics lv_bindings pydisplay palettes pdwidgets; do
for name in cmods displayif pygraphics lv_bindings pydisplay palettes pdwidgets; do
if [[ ! -d "$REPOS/$name/.git" && ! -L "$REPOS/$name" ]]; then
log "ERROR: required repo missing: $REPOS/$name"
missing=1
Expand Down Expand Up @@ -246,7 +246,7 @@ link_pydevices pydisplay_android "$REPOS/pydisplay_android"
# cmods must exist before interior sibling links
[[ -d "$PD/cmods" ]] || die "cmods missing after link step ($PD/cmods)"

for s in displayif graphics lv_bindings lv_circuitpython_mod lv_cpython_mod \
for s in displayif pygraphics lv_bindings lv_circuitpython_mod lv_cpython_mod \
lv_micropython_cmod usdl2; do
[[ -d "$REPOS/$s" || -L "$REPOS/$s" ]] && link_cmods_sibling "$s"
done
Expand Down