Skip to content

Add formatting, docs-build and wheel-install checks to CI; drop Python 3.9 - #162

Merged
apdavison merged 2 commits into
HumanBrainProject:masterfrom
apdavison:ci-checks
Oct 17, 2026
Merged

apdavison merged 2 commits into
HumanBrainProject:masterfrom
apdavison:ci-checks

Conversation

@apdavison

Copy link
Copy Markdown
Member

Fixes #124.

Currently, CI runs flake8 (syntax errors and undefined names only) and pytest, always against an editable install. This PR adds three jobs alongside the test matrix:

  • format: black --check --diff ., with black pinned to major version 26, so that the new stable style that black introduces each January doesn't make every pull request fail. Updating black then means bumping the pin in a commit that also reformats the code.
  • docs: builds the documentation with Sphinx on Python 3.11, as ReadTheDocs does, with -W --keep-going, so that a broken reference or malformed markup fails the pull request rather than surfacing later on ReadTheDocs. The documentation currently builds with no warnings.
  • package: builds the wheel, installs it in a clean virtual environment and imports every fairgraph module from it, outside the source tree, so that a packaging error (e.g., a subpackage missing from [tool.setuptools.packages.find]) cannot reach PyPI. This check found the broken fairgraph.fields module removed in Remove deprecated aliases from the renaming of fields to properties #161.

The contributing guide now gives the black and sphinx-build commands, so these checks can be run locally.

A second commit drops support for Python 3.9, which has reached end of life, and adds Python 3.15 to the test matrix. requires-python becomes >=3.10, and black's target version becomes py310 (which does not change the formatting). The latest releases of requests and tabulate already require Python 3.10. The 0.16.0 release notes mention the change.

Add three jobs alongside the test matrix: "format" runs black --check; "docs" builds the documentation with Sphinx on Python 3.11, as ReadTheDocs does, treating warnings as errors; and "package" builds the wheel, installs it in a clean virtual environment and imports every fairgraph module from it, outside the source tree. The format job pins black to major version 26, so that a new year's stable style doesn't make every pull request fail. The contributing guide now gives the black and sphinx-build commands, so these checks can be run locally.
Python 3.9 has reached end of life, and the latest releases of requests and tabulate already require Python 3.10.
@apdavison
apdavison marked this pull request as ready for review October 17, 2026 22:41
@apdavison
apdavison merged commit aa32a59 into HumanBrainProject:master Oct 17, 2026
9 checks passed
@apdavison
apdavison deleted the ci-checks branch October 17, 2026 22:42
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 formatting, docs-build and wheel-install checks to CI

1 participant