From 935f396771b6e66e0ba85aaf0bda22337c96ada6 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 3 Nov 2026 20:07:13 -0600 Subject: [PATCH 1/2] SPDX header: copyright, a bare # and the licence on the CPython port's tests --- ports/cpython/tests/test_callback_lifetime.py | 2 ++ ports/cpython/tests/test_callback_references.py | 2 ++ ports/cpython/tests/test_free_threading.py | 2 ++ ports/cpython/tests/test_jpeg_decoder.py | 2 ++ ports/cpython/tests/test_lvgl_init.py | 2 ++ ports/cpython/tests/test_runtime_references.py | 2 ++ ports/cpython/tests/test_struct_callback_lifetime.py | 2 ++ 7 files changed, 14 insertions(+) diff --git a/ports/cpython/tests/test_callback_lifetime.py b/ports/cpython/tests/test_callback_lifetime.py index 996e08f..fb354c3 100644 --- a/ports/cpython/tests/test_callback_lifetime.py +++ b/ports/cpython/tests/test_callback_lifetime.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """Lifetime of Python callbacks registered with add_event_cb. diff --git a/ports/cpython/tests/test_callback_references.py b/ports/cpython/tests/test_callback_references.py index 0669f61..3bc1246 100644 --- a/ports/cpython/tests/test_callback_references.py +++ b/ports/cpython/tests/test_callback_references.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """References a callback trampoline holds while LVGL calls into Python. diff --git a/ports/cpython/tests/test_free_threading.py b/ports/cpython/tests/test_free_threading.py index db4da58..858b91b 100644 --- a/ports/cpython/tests/test_free_threading.py +++ b/ports/cpython/tests/test_free_threading.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """lvgl on a free-threaded Python (3.13t and later). diff --git a/ports/cpython/tests/test_jpeg_decoder.py b/ports/cpython/tests/test_jpeg_decoder.py index b0938ec..e7d1b43 100644 --- a/ports/cpython/tests/test_jpeg_decoder.py +++ b/ports/cpython/tests/test_jpeg_decoder.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """JPEG images draw scaled and contained, as they do on MicroPython. diff --git a/ports/cpython/tests/test_lvgl_init.py b/ports/cpython/tests/test_lvgl_init.py index 28b2372..e2cfd7f 100644 --- a/ports/cpython/tests/test_lvgl_init.py +++ b/ports/cpython/tests/test_lvgl_init.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """Unit tests for the native lvgl CPython extension.""" diff --git a/ports/cpython/tests/test_runtime_references.py b/ports/cpython/tests/test_runtime_references.py index 02cf056..e614245 100644 --- a/ports/cpython/tests/test_runtime_references.py +++ b/ports/cpython/tests/test_runtime_references.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """Reference counts and buffer exports the runtime hands across to LVGL. diff --git a/ports/cpython/tests/test_struct_callback_lifetime.py b/ports/cpython/tests/test_struct_callback_lifetime.py index 4641321..0a17929 100644 --- a/ports/cpython/tests/test_struct_callback_lifetime.py +++ b/ports/cpython/tests/test_struct_callback_lifetime.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """Lifetime of Python callbacks set on animations and timers. From 07c8b9f9f18a44697c3892592d75bfc68486d452 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 3 Nov 2026 20:07:13 -0600 Subject: [PATCH 2/2] Style check: fail a pull request on the mechanical style rules --- .github/workflows/style.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/style.yml diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..ab9fc31 --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,16 @@ +# The mechanical house-style rules: SPDX header, no Sphinx roles in +# docstrings, no link to the .github repo from a page, no README badges or +# status banner. Pull requests check the changed files; a manual run checks +# every file. Paths that aren't ours go in .style-exclude. +name: Style + +on: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + style: + uses: PyDevices/.github/.github/workflows/reusable-style-check.yml@publishing-v20