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 .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:

jobs:
release-pr:
uses: PyDevices/.github/.github/workflows/reusable-prepare-release-pr.yml@publishing-v13
uses: PyDevices/.github/.github/workflows/reusable-prepare-release-pr.yml@publishing-v26
with:
version: ${{ inputs.version }}
secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/publish-release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ permissions:

jobs:
publish:
uses: PyDevices/.github/.github/workflows/reusable-publish-release-packages.yml@publishing-v21
uses: PyDevices/.github/.github/workflows/reusable-publish-release-packages.yml@publishing-v26
with:
build-kind: native-and-wasm
distribution-name: pydevices-pygraphics
wheel-filename-prefix: pydevices_pygraphics
distribution-name: omnipython-pygraphics
wheel-filename-prefix: omnipython_pygraphics
linux-aarch64: true
mip-profile: pygraphics
release-ref: ${{ inputs.release-ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ permissions:

jobs:
style:
uses: PyDevices/.github/.github/workflows/reusable-style-check.yml@publishing-v20
uses: PyDevices/.github/.github/workflows/reusable-style-check.yml@publishing-v26
2 changes: 1 addition & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ permissions:

jobs:
tag:
uses: PyDevices/.github/.github/workflows/reusable-tag-on-release-merge.yml@publishing-v6
uses: PyDevices/.github/.github/workflows/reusable-tag-on-release-merge.yml@publishing-v26
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/validate-pyscript-filesystem-toml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:

jobs:
validate-pyscript-filesystem-toml:
uses: PyDevices/.github/.github/workflows/reusable-validate-pyscript-filesystem-toml.yml@publishing-v6
uses: PyDevices/.github/.github/workflows/reusable-validate-pyscript-filesystem-toml.yml@publishing-v26
with:
config-path: pygraphics.toml
source-mappings: lib=/lib
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ directory to the modules you want. CI builds the unix port of MicroPython

MicroPython's [manifest reference](https://docs.micropython.org/en/v1.29.0/reference/manifest.html)
has more on `c_module()` and `include()`.
[micropython-pydevices](https://github.com/PyDevices/micropython-pydevices)
[omnipython-builds](https://github.com/PyDevices/omnipython-builds)
keeps ready-made manifests and boards for building several PyDevices modules
at once.

Expand Down Expand Up @@ -157,5 +157,5 @@ gradients, text) over bare method lists.
## Releases

Each release tag `vX.Y.Z` publishes the compiled wheels to TestPyPI as
`pydevices-pygraphics` and the pure package to the mip index as `pygraphics`,
`omnipython-pygraphics` and the pure package to the mip index as `pygraphics`,
both at that version.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ a framebuffer, with the same code on MicroPython-compatible boards,
CircuitPython-compatible boards and CPython.

```bash
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-pygraphics
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ omnipython-pygraphics
```

```python
Expand All @@ -16,7 +16,7 @@ omip.install("pygraphics")
```

`omip` comes with OmniPython firmware. On other MicroPython firmware, run
`mip.install("github:PyDevices/pydevices/lib/omip.py")` once to put it on the board.
`mip.install("github:PyDevices/omnipython/lib/omip.py")` once to put it on the board.

```python
import pygraphics
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.6
0.1.7.dev0
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""Sphinx configuration for the pygraphics documentation.

Everything shared by the PyDevices documentation projects (theme, top bar,
Markdown and docstring setup, the reference map) comes from pydevices-docs.
Markdown and docstring setup, the reference map) comes from omnipython-docs.

The Reference section is written from ``pygraphics.pyi``, the stub that lists
every name the compiled module and the pure-Python package share, so the
Expand All @@ -17,7 +17,7 @@
import sys
from pathlib import Path

from pydevices_docs import configure
from omnipython_docs import configure

globals().update(configure(
"pygraphics", __file__,
Expand Down
8 changes: 4 additions & 4 deletions docs/get-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ between them.
## On a desktop (CPython)

```bash
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-pygraphics
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ omnipython-pygraphics
```

The package is called `pydevices-pygraphics` and you import `pygraphics`.
The package is called `omnipython-pygraphics` and you import `pygraphics`.
Releases are on TestPyPI for now, which is why the command names it. There
are compiled wheels for Linux on x86_64 and ARM64, Windows, Android and Pyodide;
[Platforms](../reference/platforms.md) has the list and what to do on a Mac.
Expand All @@ -25,7 +25,7 @@ omip.install("pygraphics")
```

`omip` comes with OmniPython firmware. On other MicroPython firmware, run
`mip.install("github:PyDevices/pydevices/lib/omip.py")` once to put it on the board.
`mip.install("github:PyDevices/omnipython/lib/omip.py")` once to put it on the board.

## On a CircuitPython-compatible board

Expand All @@ -36,7 +36,7 @@ Copy the [`lib/pygraphics/`](https://github.com/PyDevices/pygraphics/tree/main/l

```python
import micropip
await micropip.install("pydevices-pygraphics", index_urls="https://test.pypi.org/simple/")
await micropip.install("omnipython-pygraphics", index_urls="https://test.pypi.org/simple/")
```

micropip picks the wheel that matches your Pyodide version.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/load-and-save-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ list of formats and file types is under [Formats](../reference/formats.md#which-

A name ending in `.png` saves an `RGB565`, `GS8` or `MONO_HLSB` picture as
PNG. PNG needs the `pngio` module: PyDevices firmware has it built in, and on
CPython it comes with the `pydevices-desktop` package and needs Pillow.
CPython it comes with the `omnipython-desktop` package and needs Pillow.
Without it, saving a PNG raises an `ImportError` that says what to install.

## Load a picture
Expand Down
2 changes: 1 addition & 1 deletion docs/how-it-works/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Milliseconds per call, drawing into a 160 × 128 `RGB565` framebuffer:
| `blit`, a 64 × 64 sprite | 0.024 | 3.57 | 0.021 | 4.40 |

Measured on one laptop (Intel Core Ultra 7 155H, Linux): CPython 3.12.3 with
pydevices-pygraphics 0.1.1, and MicroPython 1.30 preview unix builds, one
omnipython-pygraphics 0.1.1, and MicroPython 1.30 preview unix builds, one
with the compiled module built in and one without. Neither pure run had numpy
or ulab to call on. A board is far slower than a laptop; the ratio between
the columns is what carries over.
Expand Down
2 changes: 1 addition & 1 deletion docs/how-it-works/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ your shapes, text and images

The same `import pygraphics` comes in two forms.

The compiled package is C. It's what the `pydevices-pygraphics` wheels
The compiled package is C. It's what the `omnipython-pygraphics` wheels
contain, and it can be built into MicroPython or CircuitPython firmware.
`pygraphics.implementation()` returns `native_cmod`.

Expand Down
6 changes: 3 additions & 3 deletions docs/reference/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Where | Package | How it's tested |
|---|---|---|
| CPython 3.11–3.14 on Linux x86_64 (manylinux_2_28) | compiled wheel, `pydevices-pygraphics` | the full tests run on every change, against both packages |
| CPython 3.11–3.14 on Linux x86_64 (manylinux_2_28) | compiled wheel, `omnipython-pygraphics` | the full tests run on every change, against both packages |
| CPython 3.11–3.14 on Linux aarch64 (manylinux_2_28), such as 64-bit Raspberry Pi OS | compiled wheel | each release checks the wheel loads its compiled module |
| CPython 3.11–3.14 on Windows x86_64 | compiled wheel | each release checks the wheel loads its compiled module |
| CPython 3.13–3.14 on Android, arm64-v8a and x86_64 | compiled wheel | the wheel builds; it isn't run on a device |
Expand All @@ -27,7 +27,7 @@ has the steps. `pygraphics.implementation()` tells you which one you have:

Releases go to TestPyPI, which is why the install command names it. PyPI
holds one old release, 0.0.37, kept to reserve the name, so
`pip install pydevices-pygraphics` without the TestPyPI index succeeds and
`pip install omnipython-pygraphics` without the TestPyPI index succeeds and
gives you that old version.

## Names only the pure-Python package has
Expand All @@ -50,5 +50,5 @@ the current one.
| | Now | Earlier |
|---|---|---|
| Import | `pygraphics` | `graphics` |
| pip (compiled) | `pydevices-pygraphics` | `pygraphics`, `graphics-cmod` |
| pip (compiled) | `omnipython-pygraphics` | `pygraphics`, `graphics-cmod` |
| mip | `pygraphics` | `graphics` |
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Local preview: use the checkout of .github next to this repository,
# pip install -e ../.github/docs-config
# Read the Docs and CI install the tagged release:
pydevices-docs @ git+https://github.com/PyDevices/.github@docs-v0.3.1#subdirectory=docs-config
omnipython-docs @ git+https://github.com/PyDevices/.github@docs-v0.4.0#subdirectory=docs-config
2 changes: 1 addition & 1 deletion examples/bmp565_scroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
the whole picture in memory.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, appdev and pygraphics.
package or omnipython-desktop provides, appdev and pygraphics.

Run it from the repository's root:
python examples/bmp565_scroll.py
Expand Down
2 changes: 1 addition & 1 deletion examples/bmp565_scroll_sprite.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
the bottom left to jump, and the bottom right to shoot.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, appdev and pygraphics.
package or omnipython-desktop provides, appdev and pygraphics.

Run it from the repository's root:
python examples/bmp565_scroll_sprite.py
Expand Down
2 changes: 1 addition & 1 deletion examples/bmp565_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
bmp565_scroll_sprite.py for reading a picture a line at a time instead.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, and pygraphics.
package or omnipython-desktop provides, and pygraphics.

Run it from the repository's root:
python examples/bmp565_simpletest.py
Expand Down
2 changes: 1 addition & 1 deletion examples/bmp565_sprite.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
stopping at the edges.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, appdev and pygraphics.
package or omnipython-desktop provides, appdev and pygraphics.

Run it from the repository's root:
python examples/bmp565_sprite.py
Expand Down
2 changes: 1 addition & 1 deletion examples/font_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
EXPORT to True to also save each font as a .py module.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, and pygraphics.
package or omnipython-desktop provides, and pygraphics.

Run it from the repository's root:
python examples/font_list.py
Expand Down
2 changes: 1 addition & 1 deletion examples/framebuf_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
memory of its own.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, and pygraphics.
package or omnipython-desktop provides, and pygraphics.

Run it from the repository's root:
python examples/framebuf_simpletest.py
Expand Down
2 changes: 1 addition & 1 deletion examples/graphics_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
the display itself, with colours from palettes.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, and pygraphics, and palettes.
package or omnipython-desktop provides, and pygraphics, and palettes.

Run it from the repository's root:
python examples/graphics_simpletest.py
Expand Down
2 changes: 1 addition & 1 deletion examples/pbm_create_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
display as it is and with its background left transparent.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, and pygraphics.
package or omnipython-desktop provides, and pygraphics.

Run it from the repository's root:
python examples/pbm_create_new.py
Expand Down
2 changes: 1 addition & 1 deletion examples/pbm_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
once with its background left transparent.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, and pygraphics.
package or omnipython-desktop provides, and pygraphics.

Run it from the repository's root:
python examples/pbm_simpletest.py
Expand Down
2 changes: 1 addition & 1 deletion examples/pygraphics_landscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
copied to the display before the next one.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, appdev and pygraphics, and multimer.
package or omnipython-desktop provides, appdev and pygraphics, and multimer.

Run it from the repository's root:
python examples/pygraphics_landscape.py
Expand Down
2 changes: 1 addition & 1 deletion examples/rotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
board_config's rotation settings put the picture the right way up.

Needs: a board_config with a display_drv, which a PyDevices board
package or pydevices-desktop provides, appdev and pygraphics, and palettes.
package or omnipython-desktop provides, appdev and pygraphics, and palettes.

Run it from the repository's root:
python examples/rotations.py
Expand Down
4 changes: 2 additions & 2 deletions lib/pygraphics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ omip.install("pygraphics")
```

`omip` comes with OmniPython firmware. On other MicroPython firmware, run
`mip.install("github:PyDevices/pydevices/lib/omip.py")` once to put it on the board.
`mip.install("github:PyDevices/omnipython/lib/omip.py")` once to put it on the board.

On a CircuitPython-compatible board, copy this folder to `CIRCUITPY/lib/`.
On CPython, install the compiled package instead:

```bash
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-pygraphics
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ omnipython-pygraphics
```

```python
Expand Down
4 changes: 2 additions & 2 deletions lib/pygraphics/_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ def load_image(filename):

def _save_png(fb, filename):
"""PNG through pngio: MicroPython's built-in module, or on CPython
pydevices-desktop's, over Pillow. pygraphics has no PNG encoder of its own."""
omnipython-desktop's, over Pillow. pygraphics has no PNG encoder of its own."""
try:
import pngio
except ImportError:
raise ImportError(
"saving PNG needs pngio: PyDevices MicroPython firmware has it built in; "
"on CPython install pydevices-desktop and Pillow (pip install pillow)"
"on CPython install omnipython-desktop and Pillow (pip install pillow)"
) from None
w, h = fb.width, fb.height
if fb.format == RGB565:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "pydevices-pygraphics"
name = "omnipython-pygraphics"
dynamic = ["version"]
description = "Native graphics cmod for CPython (FrameBuffer, Area); import as pygraphics"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion scripts/bundle_pyscript_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def bundle_assets(repo_root: Path) -> Path:

# Known sibling repositories and their library paths
workspace_root = repo_root.parent
repos_to_bundle = ["pydevices", "palettes", "pdwidgets", "pygraphics"]
repos_to_bundle = ["omnipython", "palettes", "pdwidgets", "pygraphics"]

print(f"Bundling PyDevices packages into {bundle_zip}...")
with zipfile.ZipFile(bundle_zip, "w", zipfile.ZIP_DEFLATED) as zf:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def run(self):


setup(
name="pydevices-pygraphics",
name="omnipython-pygraphics",
packages=[],
cmdclass={"build_ext": build_ext_with_stub},
py_modules=[],
Expand Down
4 changes: 2 additions & 2 deletions src/gfx_module_cpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ static PyObject *framebuffer_scroll(GfxFrameBufferObject *self, PyObject *args)
return area_from_gfx(&area);
}

/* Save fb to path: PNG through pngio (pydevices-desktop's, over Pillow) for a
/* Save fb to path: PNG through pngio (omnipython-desktop's, over Pillow) for a
* ".png" name or an RGB888 framebuffer, the rest through gfx_files.c. NULL on
* failure, with the error set. */
static PyObject *cpy_save(const gfx_fb_t *fb, const char *path) {
Expand Down Expand Up @@ -1248,7 +1248,7 @@ static PyObject *cpy_save(const gfx_fb_t *fb, const char *path) {
gfx_png_release(owned);
if (PyErr_ExceptionMatches(PyExc_ImportError)) {
PyErr_SetString(PyExc_ImportError,
"saving PNG needs pngio: install pydevices-desktop and Pillow (pip install pillow)");
"saving PNG needs pngio: install omnipython-desktop and Pillow (pip install pillow)");
}
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gfx_module_mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static mp_obj_t gfxmp_png_bytes(const gfx_fb_t *fb) {
} else {
gfx_png_release(owned);
if (mp_obj_exception_match(MP_OBJ_FROM_PTR(nlr.ret_val), MP_OBJ_FROM_PTR(&mp_type_ImportError))) {
mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("saving PNG needs pngio (micropython-pydevices modules/pngio)"));
mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("saving PNG needs pngio (omnipython-builds modules/pngio)"));
}
nlr_jump(nlr.ret_val);
}
Expand Down
4 changes: 2 additions & 2 deletions src/gfx_png.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <stddef.h>
#include <stdint.h>

/* pygraphics has no PNG encoder: PNG is pngio's (micropython-pydevices'
* modules/pngio, or pydevices-desktop's pngio.py over Pillow on CPython).
/* pygraphics has no PNG encoder: PNG is pngio's (omnipython-builds'
* modules/pngio, or omnipython-desktop's pngio.py over Pillow on CPython).
* What is here is the rule for when a save is PNG, and the pixels pngio is
* handed. */

Expand Down
2 changes: 1 addition & 1 deletion tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def test_bmp565_matches_framebuffer_save(self):

def _pngio():
try:
import pngio # noqa: F401 (MicroPython's built-in, or pydevices-desktop's over Pillow)
import pngio # noqa: F401 (MicroPython's built-in, or omnipython-desktop's over Pillow)

return True
except ImportError:
Expand Down
Loading
Loading