Skip to content

ci: run lint, import, and build checks on PRs#78

Open
dustenhubbard wants to merge 1 commit into
SynapseWeb:mainfrom
dustenhubbard:ci/quality-gate
Open

ci: run lint, import, and build checks on PRs#78
dustenhubbard wants to merge 1 commit into
SynapseWeb:mainfrom
dustenhubbard:ci/quality-gate

Conversation

@dustenhubbard

Copy link
Copy Markdown
Member

Adds a CI quality gate that runs on every PR targeting main and every push to main. It does not build or publish installers; it checks that the tree lints clean on the critical-error set, compiles, imports with a working entry point, and produces a valid wheel.

Jobs

  • lint (ubuntu, py3.11): ruff check . on the critical-error set (syntax + undefined names, blocking) and compileall of the package.
  • build-and-import (ubuntu/macos/windows, py3.11): install from setup.py, verify the package imports and the PyReconstruct console entry point resolves, then python -m build --wheel + twine check.
  • test (ubuntu, py3.11, headless offscreen Qt): backend/geometry unit-test subset.

Notes

  • Wheel-only build. The source tree has no MANIFEST.in, so an sdist round-trip drops required package data. The wheel is what the installers/updater consume, so the gate builds and validates the wheel from the source tree.
  • No ruff format --check step. The tree is not auto-formatted, so a report-only format check would be a guaranteed no-op; omitted rather than manufacture false confidence. Can be added as a blocking step in a dedicated formatting change.
  • Lint scope stays narrow (E9,F63,F7,F82). Enabling F401/F811 was evaluated and deferred: the current tree has 410 unused-import (F401) hits across 68 files (mostly intentional re-export aggregators) and 5 redefinition (F811) hits. A lint gate that is red on its own default branch can't be merged; these can be adopted incrementally behind a dedicated cleanup.
  • Matrix pins Python 3.11 only: the pinned PySide6==6.5.2 has no 3.12 wheel.

Reviewer: Michael

Closes #75

Add a CI quality gate that runs on every pull request targeting main and
every push to main. Three jobs:

- lint: ruff check (critical-error set: syntax + undefined names, blocking)
  and compileall of the package.
- build-and-import (Linux/macOS/Windows, Python 3.11): install from setup.py,
  verify the package imports and the PyReconstruct console entry point
  resolves, then build the wheel and run twine check.
- test (Linux, Python 3.11, headless offscreen Qt): run the backend/geometry
  unit test subset.

The build step builds the wheel only (python -m build --wheel): the source
tree has no MANIFEST.in, so an sdist round-trip would drop required package
data. The wheel is what the installers/updater consume.

Ruff config lives in a standalone ruff.toml (not pyproject.toml) so it stays
independent of the packaging metadata. The lint selection is the narrow
"must-not-merge" set the current tree already passes.

The matrix pins Python 3.11 only: the pinned PySide6==6.5.2 has no 3.12 wheel.
@quasiTriestino

Copy link
Copy Markdown
Collaborator

Will discuss in person.

@quasiTriestino quasiTriestino force-pushed the main branch 2 times, most recently from 4765615 to d975145 Compare July 6, 2026 12:49
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.

Add a CI quality gate on pull requests

2 participants