Skip to content

ci+docs: run pytest-substrate in primary CI and surface Python onboarding (#366) - #376

Merged
scttfrdmn merged 1 commit into
mainfrom
ci/366-python-tests-work
Jul 26, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
ci/366-python-tests-work

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Third PR of the v0.76.0 milestone. The pytest-substrate package (python/) was a real, functional package — session-scoped server fixture, per-test state reset, boto3 wiring — but primary CI never ran it and it was nearly invisible in the docs.

CI

New Python (pytest-substrate) job: builds the substrate binary, installs the package, and runs ruff + pytest (32 tests) + a wheel build on every PR. A published package is now exercised by CI.

Lint

Added an explicit [tool.ruff] config (line-length 120 — matching the code's actual style — with E/F/I/SIM/BLE/UP) and cleared the pre-existing findings it surfaced: import ordering, unused imports, nested with statements, and an intentional blind-except in the health-poll loop (kept, with a # noqa: BLE001 explaining why). No behavior change.

Docs

  • Getting Started gains a First Python test (pytest) section with a runnable example and fixture explanation.
  • README lists the pytest plugin as a third usage mode.
  • A language-agnostic pointer sits under the Go example ("Not using Go?").

Verified locally: 32 pytest pass, ruff clean, wheel builds.

Closes #366. Part of v0.76.0.

…ding (#366)

The pytest-substrate package (python/) was real but never exercised by CI and
nearly invisible in the docs.

- New CI 'Python (pytest-substrate)' job: builds the substrate binary, installs
  the package, and runs ruff + pytest (32 tests) + wheel build on every PR.
- Add an explicit [tool.ruff] config (line-length 120; E/F/I/SIM/BLE/UP) and
  clear the pre-existing lint findings it surfaced (import order, unused imports,
  nested with-statements, a blind-except noqa on the intentional health-poll).
- Docs: Getting Started gains a 'First Python test' section; README lists the
  pytest plugin as a third usage mode; a language-agnostic pointer sits under
  the Go example.

Closes #366.
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit cdee3ff into main Jul 26, 2026
12 checks passed
@scttfrdmn
scttfrdmn deleted the ci/366-python-tests-work branch July 26, 2026 06:25
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.

ci+docs: run pytest-substrate in primary CI and surface Python onboarding

1 participant