Skip to content

Env helpers come from boarddev (follows pydevices#131's hard break) - #183

Merged
bdbarnett merged 2 commits into
mainfrom
env-to-boarddev
Oct 8, 2026
Merged

bdbarnett merged 2 commits into
mainfrom
env-to-boarddev

Conversation

@bdbarnett

Copy link
Copy Markdown
Collaborator

This follows PyDevices/pydevices#131, which moves env_get, env_int, env_float, env_bool and env_set from displaydev to boarddev as a hard break. from displaydev import env_set fails once it merges. Every example, util, tool, test and doc here that imported them from displaydev now imports from boarddev: car_cluster, drum_machine, google_photos, lv_test_timer, roku_remote and roku_sim, spectrum, utils/ps_loader.py, utils/secrets.py, the test wrapper, screenshot and multimer-source preload tools, AGENTS.md, tools/README.md, and the Peter Hinch gallery page, which is hand-written and not generated.

tools/typings is regenerated with scripts/gen_package_pyi.sh against #131's pydevices. The script now writes boarddev.pyi too, which is where the env stubs live now. The rest of the stub diff is old stubs catching up with pydevices main.

Merge order: merge PyDevices/pydevices#131 first, then this, in the same sitting. PyScript pages fetch pydevices from main, so between the two merges the examples on main import names that main no longer has, or the other way round.

Frozen copies: two places run a frozen pydevices and won't follow until the next pin move and rebuild. Nothing here builds them. bin/micropython and the other desktop interpreters can't run the examples that set or read env vars until they're rebuilt. Neither can the gallery on pydevices.github.io, which boots the site's vendored wasm. Those examples are car_cluster, drum_machine, spectrum, roku_remote, lv_test_timer and the Peter Hinch page. A venv with the released TestPyPI pydevices follows at the next pydevices release.

Tested, with #131's lib/ on the path:

  • the unit suite as CI runs it, with audiolive: rack_knob has been heard on the T-Embed #131 checked out as ./pydevices: 97 tests OK
  • ruff check lib tests tools scripts
  • install_refresh_manifests.sh --audit (no differences) and gallery_generator.py --check
  • lv_test_timer.py kit on MicroPython 1.29 and CPython, with PYDEVICES_LV_ROTATION=90 PYDEVICES_REFRESH_MS=50: it rotated to 90, ran at 20.0 fps, and the click test passed
  • spectrum.py with SPECTRUM_SOURCE=fake PYDEVICES_FPS_PRINT=1: still running at the timeout on both, printing its fps line
  • car_cluster.py on MicroPython: started and stayed up. Its core dump on the timeout's SIGTERM happens on main too.

pydevices moves env_get, env_int, env_float, env_bool and env_set from
displaydev to boarddev with no re-export, so every example, util, tool and
doc here that imported them from displaydev imports them from boarddev.
The hand-written Peter Hinch gallery page moves with them.

tools/typings is regenerated with scripts/gen_package_pyi.sh against the
new pydevices, which now writes boarddev.pyi too; the rest of the stub diff
is the stubs catching up with pydevices main.
@bdbarnett
bdbarnett merged commit 94d8b7c into main Oct 8, 2026
4 checks passed
@bdbarnett
bdbarnett deleted the env-to-boarddev branch October 8, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant