Skip to content

Add local QA helpers and python 3.13/trixie support#20

Open
dannystaple wants to merge 11 commits into
pimoroni:mainfrom
dannystaple:ci-fixes
Open

Add local QA helpers and python 3.13/trixie support#20
dannystaple wants to merge 11 commits into
pimoroni:mainfrom
dannystaple:ci-fixes

Conversation

@dannystaple
Copy link
Copy Markdown
Contributor

@dannystaple dannystaple commented May 30, 2026

  • Add a docker testing images - for python 3.9, 3.10, 3.11 and 3.13 in trixie.
  • Fix test mocking issue in tox.ini. Tests and functionality unchanged.
  • Add a LOCAL_QA.md guide, showing how to run these checks within the docker env.
  • Minor fix to checks - exporting the TERM settings.

This is a port of pimoroni/inventorhatmini-python#16 to the boilerplate.

A couple of whys

  • Why dockerfile? Because on a desktop, I don't have GitHub's setup python, and this would be a reasonable way to get to the matrix of versions. Plus it's got the other bits it needs (presuming I haven't missed some, we'll find out).
  • Why uv - managing a python setup with lockfiles means fewer package update surprises. It does need to be relocked sometimes though.
  • Why a lockfile - so we get fewer moments of "ahhh... this is no longer compatible with todays build of smbus", at least until we relock because we meant it.
  • Why a local qa doc - so people can run this stuff at desk without having to discover it all again.

Mostly Developer Experience (devx) to make fixing the ci failures a bit easier.

Testing

  • Make check, make shellcheck, make qa and make pytest were ran locally on this - all pythons seem to work.
  • CI Workflows for the rest of the matrix are mostly passing. 3.9 has issues - which looks like hatch support has dropped off for it.

Copilot AI review requested due to automatic review settings May 30, 2026 17:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a Docker-based local QA environment with a pinned dependency lockfile, documentation for running checks in the container, and tweaks the existing tox and check.sh setup to better support isolated testing.

Changes:

  • New Dockerfile.testing + requirements-dev.lock providing a reproducible dev/test image driven by uv.
  • New LOCAL_QA.md documenting how to build and run QA targets inside the container.
  • tox.ini switched to skip_install + manual pip install --no-deps to avoid pulling hardware-specific deps; check.sh exports TERM.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Dockerfile.testing New image: uv + Python 3.11, system tools, non-root appuser, installs from lockfile.
requirements-dev.lock New uv-generated lockfile pinning all dev deps for Python 3.11.
LOCAL_QA.md New docs describing build/run commands and lockfile regeneration.
tox.ini Skips install and instead does pip install --no-deps in commands_pre; also skip_install for qa.
check.sh Exports TERM so subprocesses inherit the value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Dockerfile.testing
Comment thread Dockerfile.testing Outdated
Comment thread Dockerfile.testing Outdated
Comment thread tox.ini Outdated
Comment thread LOCAL_QA.md Outdated
@dannystaple dannystaple marked this pull request as draft May 31, 2026 11:11
@dannystaple dannystaple marked this pull request as ready for review May 31, 2026 11:13
@dannystaple dannystaple changed the title Add local QA helpers Add local QA helpers and python 3.13/trixie support May 31, 2026
@Gadgetoid
Copy link
Copy Markdown
Member

Whew, thank you, might take me a while to get to this since I'm buried in Pico stuff at the moment. I also really ought to play with uv more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants