diff --git a/.github/workflows/release-interpreters.yml b/.github/workflows/release-interpreters.yml index e1d37cfd..8a2089cc 100644 --- a/.github/workflows/release-interpreters.yml +++ b/.github/workflows/release-interpreters.yml @@ -7,7 +7,7 @@ # # A final release (vX.Y.Z) builds and attaches them. A dev, a, b or rc release # gets none. Every build comes from the release's own tag, with the -# micropython-pydevices and lvgl-circuitpython commits that +# micropython-pydevices and omnipython-lvgl commits that # scripts/release_interpreters/sources.lock pins, and the manifest lists every # source commit that went in. Move the pins before a final with # scripts/release_interpreters/sources.py bump (CONTRIBUTING.md). @@ -16,7 +16,7 @@ # interpreter from the branch or tag you name and keeps them as a run artifact, # attaching nothing. Tick "attach" with a final tag to (re)attach to that # release; that always uses the pins. To try another micropython-pydevices or -# lvgl-circuitpython, name it in the two inputs below, and the run attaches +# omnipython-lvgl, name it in the two inputs below, and the run attaches # nothing. Changes to this recipe run the same builds on their pull request. name: Release interpreters @@ -38,8 +38,8 @@ on: description: micropython-pydevices branch, tag or commit to build with (empty uses the pin in sources.lock; never attached) default: "" type: string - lvgl-circuitpython-ref: - description: lvgl-circuitpython branch, tag or commit for the CircuitPython build (empty uses the pin in sources.lock; never attached) + omnipython-lvgl-ref: + description: omnipython-lvgl branch, tag or commit for the CircuitPython build (empty uses the pin in sources.lock; never attached) default: "" type: string pull_request: @@ -66,7 +66,7 @@ jobs: tag: ${{ steps.gate.outputs.tag }} ref: ${{ steps.ref.outputs.ref }} mpp: ${{ steps.gate.outputs.mpp }} - lvgl_cp: ${{ steps.gate.outputs.lvgl_cp }} + lvgl: ${{ steps.gate.outputs.lvgl }} steps: - uses: actions/checkout@v7 - name: Decide whether this run builds and whether it attaches @@ -77,7 +77,7 @@ jobs: INPUT_REF: ${{ inputs.ref }} INPUT_ATTACH: ${{ inputs.attach }} INPUT_MPP: ${{ inputs.micropython-pydevices-ref }} - INPUT_LVGL: ${{ inputs.lvgl-circuitpython-ref }} + INPUT_LVGL: ${{ inputs.omnipython-lvgl-ref }} run: | case "$EVENT" in release) ref="$RELEASE_TAG" ;; @@ -145,12 +145,12 @@ jobs: - name: CircuitPython's LVGL helpers if: matrix.target == 'cp-unix' env: - LVGL_CP_REF: ${{ inputs.lvgl-circuitpython-ref }} + LVGL_REF: ${{ inputs.omnipython-lvgl-ref }} run: | - # lvgl-circuitpython at its pin; pdwidgets and palettes are frozen + # omnipython-lvgl at its pin; pdwidgets and palettes are frozen # from this release's own library. mkdir -p ws && cd ws - ../recipe/scripts/release_interpreters.sh fetch lvgl-circuitpython lvgl-circuitpython "$LVGL_CP_REF" + ../recipe/scripts/release_interpreters.sh fetch omnipython-lvgl omnipython-lvgl "$LVGL_REF" ls - name: Build ${{ matrix.target }} @@ -186,9 +186,9 @@ jobs: path: micropython-pydevices - uses: actions/checkout@v7 with: - repository: PyDevices/lvgl-circuitpython - ref: ${{ inputs.lvgl-circuitpython-ref || needs.gate.outputs.lvgl_cp }} - path: lvgl-circuitpython + repository: PyDevices/omnipython-lvgl + ref: ${{ inputs.omnipython-lvgl-ref || needs.gate.outputs.lvgl }} + path: omnipython-lvgl - uses: actions/download-artifact@v8 with: pattern: interpreter-* @@ -226,7 +226,7 @@ jobs: SOURCES_JSON=$RUNNER_TEMP/sources.json export SOURCES_JSON python3 scripts/release_interpreters/sources.py record --mpp micropython-pydevices \ - --lvgl-circuitpython lvgl-circuitpython --pydevices pydevices \ + --omnipython-lvgl omnipython-lvgl --pydevices pydevices \ --pydevices-ref "${TAG#unreleased}" | tee "$SOURCES_JSON" # An attached set is made only from the pins. if [[ "$DRY_RUN" == 0 ]]; then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 510d3489..dbe6bd56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -216,11 +216,11 @@ interpreters are made from fixed commits, never from a branch tip. [`scripts/release_interpreters/sources.lock`](scripts/release_interpreters/sources.lock) names the commit of `micropython-pydevices` (the build script, its patches, and its own locks for MicroPython, the toolchains and every module) and of -`lvgl-circuitpython`. `interpreters.json` records every commit that went in: +`omnipython-lvgl`. `interpreters.json` records every commit that went in: this release's `pydevices`, the two pins, the MicroPython commit, the CircuitPython version and each module's commit, with `"pinned": true` when the build used exactly the pins. A run that attaches always does; to try another -`micropython-pydevices` or `lvgl-circuitpython`, name it in the two inputs of a +`micropython-pydevices` or `omnipython-lvgl`, name it in the two inputs of a manual run, which then attaches nothing. **Before you cut a final, move the pins:** diff --git a/docs/boards/display-boards.md b/docs/boards/display-boards.md index 250b58dc..c54c1840 100644 --- a/docs/boards/display-boards.md +++ b/docs/boards/display-boards.md @@ -288,10 +288,10 @@ variant (`C6_WIFI`). (6, 3, 0, 5)`. Heap ~**450 KiB** free at idle; Simon / LVGL fit with appdev + multimer + `display_driver` (~370 KiB free while running). - **Firmware:** custom `NUCLEO_H743ZI2` with **displayif** (stm32 port: spibus - + notimpl stubs), **graphics**, **lvgl** (`lvgl-micropython`). Flash via + + notimpl stubs), **graphics**, **lvgl** ([omnipython-lvgl](https://github.com/PyDevices/omnipython-lvgl)). Flash via ST-Link MSD (`NOD_H743ZI2` / `firmware.bin`). - **Demos verified:** RGB stripes; [`simon.py`](https://github.com/PyDevices/gallery/blob/main/lib/examples/simon.py) (graphics + appdev); headless - [`lvgl-bindings/tools/test_lvgl_smoke.py`](https://github.com/PyDevices/lvgl-bindings/blob/main/tools/test_lvgl_smoke.py); `lvgl_test.py` (tap-count button on real + [`omnipython-lvgl/tools/test_lvgl_smoke.py`](https://github.com/PyDevices/omnipython-lvgl/blob/main/tools/test_lvgl_smoke.py); `lvgl_test.py` (tap-count button on real panel via `display_driver`). **`main.py`** boots `lvgl_test.py`. - **Setup:** copy over serial the board_config + `displaydev/{__init__,busdisplay}.py` + `appdev` + `multimer` + `display_driver.py` + `ili9341`/`ft6x36` + examples diff --git a/docs/guides/bring-up-a-board.md b/docs/guides/bring-up-a-board.md index c665c9d6..6614157f 100644 --- a/docs/guides/bring-up-a-board.md +++ b/docs/guides/bring-up-a-board.md @@ -18,10 +18,10 @@ into an afternoon. Check before installing anything. On an image built with the PyDevices C modules (micropython-pydevices' `build_mp.py --modules -displayif,lvgl-micropython,usbhost,pygraphics,audiodsp,ulab`, say) the following +displayif,lvgl,usbhost,pygraphics,audiodsp,ulab`, say) the following are **frozen or built in** — installing them is wasted effort: -- `lvgl` (from lvgl-micropython) +- `lvgl` (from [omnipython-lvgl](https://github.com/PyDevices/omnipython-lvgl)) - `dotclockframebuffer` (from displayif) — the RGB panel interface - `_usbhost`, the USB host's C module (usbhost). The USB packages that use it (`usb.core`, `usb.host.*`, `usb.device.*`, from this repository's @@ -58,7 +58,7 @@ text so you can see which module is really absent; a frozen module that reports `MISS` with somebody else's name in the message is present and fine. Install `pydevices` (which carries `events`, `appdev` and `display_driver`), then re-probe. Firmware built before display_driver moved to pydevices -froze it from lvgl-micropython, where it showed the same trap with +froze it from the LVGL module, where it showed the same trap with `appdev`. ## 2. Installing, over Wi-Fi diff --git a/docs/guides/lvgl.md b/docs/guides/lvgl.md index e50897bb..85690732 100644 --- a/docs/guides/lvgl.md +++ b/docs/guides/lvgl.md @@ -3,25 +3,24 @@ How to run [LVGL](https://lvgl.io/) on the PyDevices display, input, and timing packages, and what [`display_driver.py`](https://github.com/PyDevices/pydevices/blob/main/lib/display_driver.py) does for you. -## The three sister projects +## One binding for three interpreters -The PyDevices LVGL family bundles this integration for each interpreter: +[omnipython-lvgl](https://github.com/PyDevices/omnipython-lvgl) bundles this +integration for each interpreter, from one generated binding: -| Repository | Interpreter | +| Port | Interpreter | |---|---| -| [lvgl-micropython](https://github.com/PyDevices/lvgl-micropython) | MicroPython firmware | -| [lvgl-circuitpython](https://github.com/PyDevices/lvgl-circuitpython) | CircuitPython firmware | -| [lvgl-python](https://github.com/PyDevices/lvgl-python) | CPython (`pydevices-lvgl` wheels on TestPyPI) | - -All three consume the bindings generated by -[lvgl-bindings](https://github.com/PyDevices/lvgl-bindings), and all three share `displaydev`, -neutral board capabilities, and `multimer` — so the same LVGL Python code is -portable across them. You can even develop it interactively in +| [`ports/micropython`](https://github.com/PyDevices/omnipython-lvgl/tree/main/ports/micropython) | MicroPython firmware | +| [`ports/circuitpython`](https://github.com/PyDevices/omnipython-lvgl/tree/main/ports/circuitpython) | CircuitPython firmware | +| [`ports/cpython`](https://github.com/PyDevices/omnipython-lvgl/tree/main/ports/cpython) | CPython (`pydevices-lvgl` wheels on TestPyPI) | + +All three share `displaydev`, neutral board capabilities, and `multimer`, so +the same LVGL Python code is portable across them. You can even develop it interactively in [Jupyter](run-in-jupyter.md). The rest of this page covers wiring LVGL up by hand, which is what you need with -upstream [lv_micropython](https://github.com/lvgl/lv_micropython) rather than one -of the sister projects. +upstream [lv_micropython](https://github.com/lvgl/lv_micropython) rather than +omnipython-lvgl. ## 1. Install the minimum PyDevices packages @@ -67,7 +66,7 @@ lives in this repository's `lib/` and ships with `pydevices` (the mip package, the wheel, and the frozen module in a micropython-pydevices build), beside the `board_config` idiom, `appdev`, `events`, `keys` and `multimer` it needs. The sister projects carry only `lvgl` and `fs_driver` -([loading fonts at runtime](https://github.com/PyDevices/lvgl-bindings/blob/main/docs/reference/fonts.md)). +([loading fonts at runtime](https://github.com/PyDevices/omnipython-lvgl/blob/main/docs/reference/fonts.md)). With `display_driver`, LVGL input is wired automatically through its own `app` (an `appdev.App`) and virtual touch / encoder / keypad devices. @@ -152,5 +151,5 @@ interpreter, use the harnesses documented in - [displaydev](displays.md) - [multimer](timers.md) - [appdev](the-app-loop.md) -- [lvgl-bindings](https://github.com/PyDevices/lvgl-bindings) — the generator, - and [loading fonts at runtime](https://github.com/PyDevices/lvgl-bindings/blob/main/docs/reference/fonts.md) +- [omnipython-lvgl](https://github.com/PyDevices/omnipython-lvgl) — the generator and the three ports, + and [loading fonts at runtime](https://github.com/PyDevices/omnipython-lvgl/blob/main/docs/reference/fonts.md) diff --git a/docs/how-it-works/architecture.md b/docs/how-it-works/architecture.md index ae24dbb6..6a4fa5e6 100644 --- a/docs/how-it-works/architecture.md +++ b/docs/how-it-works/architecture.md @@ -85,7 +85,7 @@ what you can compile: |---|---|---| | **Raw graphics / canvas** | Direct pixel, line, and shape drawing | [`displaydev`](../guides/displays.md) with [`pygraphics`](https://github.com/PyDevices/pygraphics) | | **Pure-Python GUI** | Portable buttons, lists, themes, and screen management with nothing to compile | [`pdwidgets`](https://github.com/PyDevices/pydevices/tree/main/pdwidgets) | -| **C-native GUI** | Complex vector widgets and a C-accelerated animation engine | [`lvgl`](https://github.com/PyDevices/lvgl-bindings) — see [using LVGL with PyDevices](../guides/lvgl.md) | +| **C-native GUI** | Complex vector widgets and a C-accelerated animation engine | [`lvgl`](https://github.com/PyDevices/omnipython-lvgl) — see [using LVGL with PyDevices](../guides/lvgl.md) | All three sit on the same board contract, so the choice does not change how your hardware is configured. diff --git a/docs/how-it-works/ecosystem.md b/docs/how-it-works/ecosystem.md index df65022e..4e12ebdc 100644 --- a/docs/how-it-works/ecosystem.md +++ b/docs/how-it-works/ecosystem.md @@ -36,10 +36,7 @@ Pure Python on any Python 3 host; pygraphics adds native wheels for Linux x86_64 Single-source LVGL C header binding generator and native interpreter modules. -- [`lvgl-bindings`](https://github.com/PyDevices/lvgl-bindings) — Automated binding generator parsing LVGL C headers into native CPython extensions, MicroPython usermods, and CircuitPython modules. -- [`lvgl-micropython`](https://github.com/PyDevices/lvgl-micropython) — Native MicroPython C module integrating LVGL v9 graphics engine with displayif bus drivers on ESP32 targets. -- [`lvgl-python`](https://github.com/PyDevices/lvgl-python) — Pre-built CPython extension wheels and Pyodide WASM packages bringing LVGL v9 to Linux, Windows, Android, and web browsers. -- [`lvgl-circuitpython`](https://github.com/PyDevices/lvgl-circuitpython) — CircuitPython native C module providing LVGL v9 bindings and displayif integration for the Adafruit Feather RP2040 and ESP32 boards. +- [`omnipython-lvgl`](https://github.com/PyDevices/omnipython-lvgl) — LVGL v9 for MicroPython, CircuitPython and CPython from one binding generator, which parses LVGL's C headers into a MicroPython user C module, a CircuitPython module and a CPython extension (the `pydevices-lvgl` wheels). ### Tier 4: App Hosts & Mobile diff --git a/scripts/release_interpreters.sh b/scripts/release_interpreters.sh index 30ce0c48..ca18723a 100755 --- a/scripts/release_interpreters.sh +++ b/scripts/release_interpreters.sh @@ -3,7 +3,7 @@ # .github/workflows/release-interpreters.yml calls this; every step also runs # by hand on Linux or WSL. # -# release_interpreters.sh gate [ ] +# release_interpreters.sh gate [ ] # Decide what a run does. is "release", "workflow_dispatch" or # "pull_request"; # is the release tag, or for a dispatch the branch or tag to @@ -12,12 +12,13 @@ # $GITHUB_OUTPUT. Only a final tag (vX.Y.Z) is ever attached: a dev, a, # b or rc release gets no interpreters, and a branch is only ever built. # The optional refs override the commits release_interpreters/sources.lock -# pins for micropython-pydevices and lvgl-circuitpython; a run that -# overrides one never attaches. Also prints mpp= and lvgl_cp=, the pins. +# pins for micropython-pydevices and omnipython-lvgl; a run that +# overrides one never attaches. Also prints mpp= and lvgl=, the pins. # # release_interpreters.sh fetch [] -# Check out lvgl-circuitpython (or another source in sources.lock) into -# at its pinned commit, or at when one is given. +# Check out omnipython-lvgl (or another source in sources.lock) into +# at its pinned commit, or at when one is given, with its +# submodules (omnipython-lvgl's LVGL). # # release_interpreters.sh build # Build one interpreter with micropython-pydevices' build_mp.py and put @@ -31,7 +32,7 @@ # PYD_DIR the pydevices tree to build into the interpreters # (default: the one this script lives in) # WS_DIR cp-unix only: a directory holding a checkout of -# lvgl-circuitpython +# omnipython-lvgl # JOBS make parallelism (default: nproc) # # Every interpreter carries every module, the way the desktop builds are @@ -68,7 +69,7 @@ gate() { ;; esac if [[ "$do_attach" == "true" && ( -n "$mpp_ref" || -n "$lvgl_ref" ) ]]; then - echo "error: will not attach interpreters built from another micropython-pydevices or lvgl-circuitpython than sources.lock pins" >&2 + echo "error: will not attach interpreters built from another micropython-pydevices or omnipython-lvgl than sources.lock pins" >&2 return 1 fi echo "build=$build" @@ -96,6 +97,9 @@ fetch() { git -C "$dir" fetch --quiet "$url" '+refs/heads/*:refs/remotes/origin/*' '+refs/tags/*:refs/tags/*' git -C "$dir" checkout --quiet "$ref" fi + if [[ -f "$dir/.gitmodules" ]]; then + git -C "$dir" submodule update --quiet --init --depth 1 + fi } build() { @@ -133,16 +137,16 @@ build() { install -m 755 builds/webassembly/pydevices/micropython.wasm "$out/micropython.wasm" ;; cp-unix) - : "${WS_DIR:?set WS_DIR to a directory with a checkout of lvgl-circuitpython}" + : "${WS_DIR:?set WS_DIR to a directory with a checkout of omnipython-lvgl}" local ws cp_dir ws=$(cd "$WS_DIR" && pwd) cp_dir="$HERE/release_interpreters/circuitpython" - [[ -f "$ws/lvgl-circuitpython/manifest.py" ]] || { echo "error: $ws/lvgl-circuitpython is not a checkout" >&2; return 1; } + [[ -f "$ws/omnipython-lvgl/ports/circuitpython/manifest.py" ]] || { echo "error: $ws/omnipython-lvgl is not a checkout" >&2; return 1; } # pydevices, pdwidgets and palettes are frozen from the library, by build_mp.py. # pydevices must be named: pdwidgets imports its events module. JOBS="$jobs" python3 build_mp.py \ --interpreter circuitpython --port unix \ - --modules "audiodsp,displayif,pygraphics,pydevices,pdwidgets,palettes,$ws/lvgl-circuitpython,$cp_dir/unix-extras" + --modules "audiodsp,displayif,pygraphics,pydevices,pdwidgets,palettes,$ws/omnipython-lvgl/ports/circuitpython,$cp_dir/unix-extras" install -m 755 builds/circuitpython/unix/coverage/micropython "$out/circuitpython" ;; *) diff --git a/scripts/release_interpreters/sources.lock b/scripts/release_interpreters/sources.lock index 183ee0ce..87da7605 100644 --- a/scripts/release_interpreters/sources.lock +++ b/scripts/release_interpreters/sources.lock @@ -7,10 +7,11 @@ # MicroPython commit, the toolchains, and every module; # the library (pydevices, palettes, pdwidgets) is the # release's tag -# lvgl-circuitpython the LVGL bindings the CircuitPython build compiles +# omnipython-lvgl LVGL and its bindings, whose ports/circuitpython the +# CircuitPython build compiles # # To move them to the current tips of their default branches, run # python3 scripts/release_interpreters/sources.py bump # and commit the result. docs/publishing.md has the rest. micropython-pydevices https://github.com/PyDevices/micropython-pydevices.git 348da7a435876d2c74371ac5c2744cfa148497cb -lvgl-circuitpython https://github.com/PyDevices/lvgl-circuitpython.git 7fb257a5f3d0d5c2f28c27c235e6239714e740c4 +omnipython-lvgl https://github.com/PyDevices/omnipython-lvgl.git 84d1de375b014c7d49b4ccbd3be551813091f9ef diff --git a/scripts/release_interpreters/sources.py b/scripts/release_interpreters/sources.py index 17e5eabd..e096be66 100644 --- a/scripts/release_interpreters/sources.py +++ b/scripts/release_interpreters/sources.py @@ -2,17 +2,17 @@ """The pins behind a final release's interpreters. scripts/release_interpreters/sources.lock names the commits of -micropython-pydevices and lvgl-circuitpython that the interpreters are built +micropython-pydevices and omnipython-lvgl that the interpreters are built from. This reads that file for .github/workflows/release-interpreters.yml and bin/upload_interpreters.sh, moves it forward, and writes the "sources" record that goes into the attached interpreters.json. - sources.py pins print mpp= and lvgl_cp= lines + sources.py pins print mpp= and lvgl= lines (the workflow appends them to $GITHUB_OUTPUT) sources.py bump [--dry-run] move both pins to the tips of their default branches sources.py stale print a ::warning:: for each pin behind its default branch sources.py verify fail unless 's HEAD is 's pinned commit - sources.py record --mpp DIR --lvgl-circuitpython DIR --pydevices DIR [--pydevices-ref TAG] + sources.py record --mpp DIR --omnipython-lvgl DIR --pydevices DIR [--pydevices-ref TAG] print the "sources" JSON for those checkouts Every command takes --lock FILE to read another lock file. @@ -26,7 +26,7 @@ HERE = Path(__file__).resolve().parent LOCK = HERE / "sources.lock" -NAMES = ("micropython-pydevices", "lvgl-circuitpython") +NAMES = ("micropython-pydevices", "omnipython-lvgl") FULL_SHA = re.compile(r"[0-9a-f]{40}") @@ -121,7 +121,7 @@ def record(mpp_dir, lvgl_dir, pydevices_dir, pydevices_ref, path=LOCK): lvgl_commit = git_head(lvgl_dir) pydevices_commit = git_head(pydevices_dir) want = pins(path) - pinned = (mpp_commit == want["micropython-pydevices"][1] and lvgl_commit == want["lvgl-circuitpython"][1]) + pinned = (mpp_commit == want["micropython-pydevices"][1] and lvgl_commit == want["omnipython-lvgl"][1]) modules = {} for name, (_, commit) in read_lock(mpp_dir / "modules.lock").items(): modules[name] = commit @@ -137,7 +137,7 @@ def record(mpp_dir, lvgl_dir, pydevices_dir, pydevices_ref, path=LOCK): "pinned": pinned, "pydevices": pydevices, "micropython-pydevices": {"commit": mpp_commit}, - "lvgl-circuitpython": {"commit": lvgl_commit}, + "omnipython-lvgl": {"commit": lvgl_commit}, "micropython": {"commit": (mpp_dir / "UPSTREAM").read_text().strip()}, "circuitpython": {"version": deps.get("circuitpython", "")}, "modules": modules, @@ -157,14 +157,14 @@ def main(argv=None): v.add_argument("directory") r = sub.add_parser("record") r.add_argument("--mpp", required=True) - r.add_argument("--lvgl-circuitpython", required=True) + r.add_argument("--omnipython-lvgl", required=True) r.add_argument("--pydevices", required=True) r.add_argument("--pydevices-ref", default="") a = ap.parse_args(argv) if a.cmd == "pins": p = pins(a.lock) print(f"mpp={p['micropython-pydevices'][1]}") - print(f"lvgl_cp={p['lvgl-circuitpython'][1]}") + print(f"lvgl={p['omnipython-lvgl'][1]}") return 0 if a.cmd == "bump": return bump(a.lock, a.dry_run) @@ -172,7 +172,7 @@ def main(argv=None): return stale(a.lock) if a.cmd == "verify": return verify(a.name, a.directory, a.lock) - print(json.dumps(record(a.mpp, a.lvgl_circuitpython, a.pydevices, a.pydevices_ref, a.lock), indent=2)) + print(json.dumps(record(a.mpp, a.omnipython_lvgl, a.pydevices, a.pydevices_ref, a.lock), indent=2)) return 0 diff --git a/tests/test_lvgl_display_driver.py b/tests/test_lvgl_display_driver.py index bcb7d64f..dd265e73 100644 --- a/tests/test_lvgl_display_driver.py +++ b/tests/test_lvgl_display_driver.py @@ -5,7 +5,7 @@ Importing the module needs ``lvgl`` and a live ``appdev.App``, so these tests extract one class from the real source and execute it against stand-ins, the -way they did in lvgl-bindings before the file moved here. Four things are held: +way they did in the LVGL bindings before the file moved here. Four things are held: * **Pacing.** ``event_loop`` runs ``lv.timer_handler()`` from one ``multimer`` ONE_SHOT timer and re-arms it to what LVGL asked for. After a pass longer @@ -17,7 +17,7 @@ * **The nesting gate.** On MicroPython and CircuitPython the binding exports ``lv._nesting`` and ``task_handler`` gates re-entrant passes on it. CPython exports nothing (a C ContextVar guards re-entrancy), and the gate must stand - down rather than raise. lvgl-bindings keeps the other half of this contract: + down rather than raise. omnipython-lvgl keeps the other half of this contract: its tests fail if the generated C stops exporting ``_nesting``. * **Direct panels.** On a DIRECT panel LVGL calls the flush once per dirty area; the frame's last area is one present, by ``show()`` when diff --git a/tests/test_release_interpreters.py b/tests/test_release_interpreters.py index f4335d6d..f61b6692 100644 --- a/tests/test_release_interpreters.py +++ b/tests/test_release_interpreters.py @@ -58,14 +58,14 @@ def setUp(self): def lock(self, mpp, lvgl, comment="# pins\n"): path = self.dir / "sources.lock" path.write_text(f"{comment}micropython-pydevices {self.dir}/mpp {mpp}\n" - f"lvgl-circuitpython {self.dir}/lvgl {lvgl} # trailing note\n") + f"omnipython-lvgl {self.dir}/lvgl {lvgl} # trailing note\n") return path class TheShippedLock(unittest.TestCase): def test_pins_both_sources_at_full_commits(self): pins = sources.pins() - self.assertEqual(set(pins), {"micropython-pydevices", "lvgl-circuitpython"}) + self.assertEqual(set(pins), {"micropython-pydevices", "omnipython-lvgl"}) for name, (url, commit) in pins.items(): self.assertRegex(commit, r"^[0-9a-f]{40}$", name) self.assertTrue(url.startswith("https://github.com/PyDevices/"), name) @@ -76,7 +76,7 @@ def test_pins_prints_the_workflow_outputs(self): lock = self.lock("a" * 40, "b" * 40) out = subprocess.run([sys.executable, str(SOURCES_PY), "--lock", str(lock), "pins"], check=True, capture_output=True, text=True).stdout.split() - self.assertEqual(out, ["mpp=" + "a" * 40, "lvgl_cp=" + "b" * 40]) + self.assertEqual(out, ["mpp=" + "a" * 40, "lvgl=" + "b" * 40]) def test_a_short_commit_is_refused(self): with self.assertRaises(SystemExit) as cm: @@ -92,7 +92,7 @@ def test_a_missing_source_is_refused(self): path.write_text(f"micropython-pydevices https://example.com/x.git {'a' * 40}\n") with self.assertRaises(SystemExit) as cm: sources.pins(path) - self.assertIn("lvgl-circuitpython", str(cm.exception)) + self.assertIn("omnipython-lvgl", str(cm.exception)) def test_a_row_of_the_wrong_shape_is_refused(self): path = self.dir / "sources.lock" @@ -114,7 +114,7 @@ def test_moves_a_pin_to_the_tip_and_keeps_the_comments(self): sources.bump(self.path) pins = sources.pins(self.path) self.assertEqual(pins["micropython-pydevices"][1], self.mpp_new) - self.assertEqual(pins["lvgl-circuitpython"][1], self.lvgl_old) + self.assertEqual(pins["omnipython-lvgl"][1], self.lvgl_old) text = self.path.read_text() self.assertTrue(text.startswith("# pins\n")) self.assertIn("# trailing note", text) @@ -131,7 +131,7 @@ def test_stale_names_the_pin_that_is_behind(self): with contextlib.redirect_stdout(buf): sources.stale(self.path) self.assertIn("micropython-pydevices pin is behind", buf.getvalue()) - self.assertNotIn("lvgl-circuitpython pin", buf.getvalue()) + self.assertNotIn("omnipython-lvgl pin", buf.getvalue()) @unittest.skipUnless(HAVE_BASH, "needs git") @@ -157,7 +157,7 @@ def test_lists_every_commit_the_build_used(self): self.assertTrue(rec["pinned"]) self.assertEqual(rec["pydevices"], {"commit": self.pyd, "ref": "v1.2.3"}) self.assertEqual(rec["micropython-pydevices"], {"commit": self.mpp}) - self.assertEqual(rec["lvgl-circuitpython"], {"commit": self.lvgl}) + self.assertEqual(rec["omnipython-lvgl"], {"commit": self.lvgl}) self.assertEqual(rec["micropython"], {"commit": "c" * 40}) self.assertEqual(rec["circuitpython"], {"version": "11.0.0-alpha.1"}) @@ -175,7 +175,7 @@ def test_verify_fails_on_the_wrong_commit(self): lock = self.lock("d" * 40, self.lvgl) with self.assertRaises(SystemExit): sources.verify("micropython-pydevices", self.dir / "mpp", lock) - sources.verify("lvgl-circuitpython", self.dir / "lvgl", lock) + sources.verify("omnipython-lvgl", self.dir / "lvgl", lock) @unittest.skipUnless(HAVE_BASH, "needs bash and git") @@ -191,7 +191,7 @@ def setUp(self): ignore=shutil.ignore_patterns("__pycache__")) shutil.copy(SCRIPTS / "release_interpreters.sh", self.tree) (self.tree / "release_interpreters" / "sources.lock").write_text( - f"micropython-pydevices {self.dir}/mpp {self.mpp}\nlvgl-circuitpython {self.dir}/lvgl {self.lvgl}\n") + f"micropython-pydevices {self.dir}/mpp {self.mpp}\nomnipython-lvgl {self.dir}/lvgl {self.lvgl}\n") def sh(self, *args, check=True): return subprocess.run(["bash", str(self.tree / "release_interpreters.sh"), *args], @@ -202,7 +202,7 @@ def test_gate_prints_the_pins_for_the_workflow(self): self.assertEqual(out["build"], "true") self.assertEqual(out["attach"], "true") self.assertEqual(out["mpp"], self.mpp) - self.assertEqual(out["lvgl_cp"], self.lvgl) + self.assertEqual(out["lvgl"], self.lvgl) def test_gate_refuses_to_attach_a_build_of_another_source(self): for mpp_ref, lvgl_ref in (("main", ""), ("", "feature")): @@ -222,19 +222,19 @@ def test_fetch_checks_out_the_pinned_commit_not_the_tip(self): make_repo(self.dir / "lvgl", {"a": "2"}) # The pin is no longer the tip; a fetch by commit needs the server to allow it. git(self.dir / "lvgl", "config", "uploadpack.allowAnySHA1InWant", "true") - self.sh("fetch", "lvgl-circuitpython", str(self.dir / "out")) + self.sh("fetch", "omnipython-lvgl", str(self.dir / "out")) self.assertEqual(git(self.dir / "out", "rev-parse", "HEAD"), self.lvgl) self.assertEqual((self.dir / "out" / "a").read_text(), "1") def test_fetch_stops_when_the_pinned_commit_is_gone(self): lock = self.tree / "release_interpreters" / "sources.lock" lock.write_text(lock.read_text().replace(self.lvgl, "e" * 40)) - r = self.sh("fetch", "lvgl-circuitpython", str(self.dir / "out"), check=False) + r = self.sh("fetch", "omnipython-lvgl", str(self.dir / "out"), check=False) self.assertNotEqual(r.returncode, 0) def test_fetch_takes_another_ref_when_asked(self): new = make_repo(self.dir / "lvgl", {"a": "2"}) - self.sh("fetch", "lvgl-circuitpython", str(self.dir / "out"), "main") + self.sh("fetch", "omnipython-lvgl", str(self.dir / "out"), "main") self.assertEqual(git(self.dir / "out", "rev-parse", "HEAD"), new)