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
6 changes: 3 additions & 3 deletions .github/workflows/publish-micropython-lib.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Publish pure-Python graphics to micropython-lib, MIP index, and TestPyPI (graphics-py).
# Publish pure-Python graphics to micropython-lib, MIP index, and TestPyPI (pydisplay-graphics).
# Native graphics-cmod wheels are published by publish-testpypi.yml on the same tag.
#
# Release trigger: push tag vX.Y.Z (see scripts/publish_release_tag.sh).
Expand All @@ -24,7 +24,7 @@ on:
type: boolean
default: true
upload_testpypi:
description: Upload graphics-py wheels to TestPyPI
description: Upload pydisplay-graphics wheels to TestPyPI
type: boolean
default: false
publish_mip_index:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
VERSION="$(normalize "$TAG")"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Publishing graphics-py / MIP release $VERSION"
echo "Publishing pydisplay-graphics / MIP release $VERSION"

- name: Verify publish secrets
env:
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Native and pure-Python **graphics** (`import graphics`) for MicroPython,
CircuitPython, and CPython. Prefer `graphics-cmod` on desktop/Android when
available; otherwise `graphics-py` / MIP `graphics`.
available; otherwise `pydisplay-graphics` / MIP `graphics`.

## Layout

Expand Down Expand Up @@ -33,7 +33,7 @@ PYTHONPATH=lib .venv/bin/python -c "import graphics; assert graphics.implementat
One tag `vX.Y.Z` publishes:

1. **graphics-cmod** — `publish-testpypi.yml` (cibuildwheel)
2. **graphics-py** + MIP — `publish-micropython-lib.yml` (micropython-lib + TestPyPI + gh-pages)
2. **pydisplay-graphics** + MIP — `publish-micropython-lib.yml` (micropython-lib + TestPyPI + gh-pages)

See `PUBLISHING.md`. Next shared version continues the `graphics-cmod` line
(`v0.0.9` → `v0.0.10`).
Expand Down
14 changes: 9 additions & 5 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ One annotated tag `vX.Y.Z` publishes **both** products at that version:
| Product | Channel | Workflow |
|---------|---------|----------|
| **graphics-cmod** | TestPyPI (platform wheels) | `publish-testpypi.yml` |
| **graphics-py** | TestPyPI (pure Python) + micropython-lib / MIP | `publish-micropython-lib.yml` |
| **pydisplay-graphics** | TestPyPI (pure Python) + micropython-lib / MIP | `publish-micropython-lib.yml` |

## Pipeline

Expand All @@ -18,25 +18,29 @@ graphics (commit on main)
└─► publish-micropython-lib.yml
sync → micropython/graphics/
hatch + twine → graphics-py
hatch + twine → pydisplay-graphics
rebuild mip/PyDevices → gh-pages
remove legacy micropython/pydisplay/graphics/
```

## Version numbers

Continue the **graphics-cmod** line (`v0.0.9` → `v0.0.10`, …). Preview:
Shared tag for **both** products. After reclaiming the historical
`pydisplay-graphics` TestPyPI line (last `0.0.24` from pydisplay), the next
release is **`v0.0.25`** (not `v0.0.11`). Later tags continue from the highest
`v*` tag:

```bash
./scripts/next_release_version.sh --verbose
./scripts/publish_release_tag.sh --dry-run
# first reclaim: ./scripts/publish_release_tag.sh 0.0.25 --push
```

## Secrets

| Secret | Purpose |
|--------|---------|
| `TESTPYPI_API_TOKEN` | TestPyPI upload (cmod + graphics-py) |
| `TESTPYPI_API_TOKEN` | TestPyPI upload (cmod + pydisplay-graphics) |
| `MICROPYTHON_LIB_DEPLOY_TOKEN` | PAT with `contents:write` on PyDevices/micropython-lib |

Grant both secrets to the **graphics** repository (org secret repository access).
Expand All @@ -48,7 +52,7 @@ Grant both secrets to the **graphics** repository (org secret repository access)
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ graphics-cmod

# pure Python
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ graphics-py
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydisplay-graphics
```

```python
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Import as `graphics`.
| Product | Pip / MIP | Role |
|---------|-----------|------|
| **graphics-cmod** | TestPyPI `graphics-cmod` | All-C extension (prefer on desktop/Android when available) |
| **graphics-py** | TestPyPI `graphics-py`, MIP `graphics` | Pure-Python package (same public API) |
| **pydisplay-graphics** | TestPyPI `pydisplay-graphics`, MIP `graphics` | Pure-Python package (same public API) |

One release tag `vX.Y.Z` publishes both products at that version.

Expand All @@ -27,7 +27,7 @@ pip install \
pip install \
-i https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
graphics-py
pydisplay-graphics
```

### MicroPython (MIP)
Expand Down
6 changes: 3 additions & 3 deletions lib/graphics/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# graphics-py
# pydisplay-graphics

Pure-Python `graphics` package — `FrameBuffer`, `Draw`, fonts, shapes, and image
loaders. Import as `graphics`.

> **Pip name:** `graphics-py` · **Import:** `import graphics`
> **Pip name:** `pydisplay-graphics` · **Import:** `import graphics`

On desktop/Android when a native wheel is available, prefer
[`graphics-cmod`](https://test.pypi.org/project/graphics-cmod/) (same import
Expand All @@ -18,7 +18,7 @@ the same release tag / version.
pip install \
-i https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
graphics-py
pydisplay-graphics
```

### MicroPython (MIP)
Expand Down
4 changes: 2 additions & 2 deletions lib/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "graphics-py"
version = "0.0.10"
name = "pydisplay-graphics"
version = "0.0.25"
description = "Pure-Python graphics (FrameBuffer, Draw, fonts); import as graphics"
readme = "graphics/README.md"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_micropython_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ DESCRIPTION_PREFIX="graphics"
AUTHOR="Brad Barnett <contact@pydevices.com>"
LICENSE="MIT"
BASENAME=graphics
PYPI_NAME=graphics-py
PYPI_NAME=pydisplay-graphics
DEST_REPO="${MICROPYTHON_LIB_DIR:-$SOURCE_REPO/../micropython-lib}"
DEST_REPO="$(cd "$DEST_REPO" 2>/dev/null && pwd || echo "$DEST_REPO")"
export MICROPYTHON_LIB_DIR="$DEST_REPO"
Expand Down
Loading