Skip to content

Remove ruff-enforced style rules and fix stale references in developer guidelines - #1885

Merged
mstimberg merged 5 commits into
brian-team:masterfrom
AxelNoun:docs/refresh-contribution-guidelines
Oct 9, 2026
Merged

mstimberg merged 5 commits into
brian-team:masterfrom
AxelNoun:docs/refresh-contribution-guidelines

Conversation

@AxelNoun

@AxelNoun AxelNoun commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Part of #1829.

This PR implements the scope that I proposed in #1829 (comment) (items A to C) and also fixes a few stale references that I found while re-checking the pages against master. It does not restructure the guidelines and does not add a CONTRIBUTING.md or templates (see #1830).

style.rst

  • The list of PEP-8 rules (indentation, spaces around operators and in keyword arguments, backslash continuations) is removed. ruff format, which the page already names as the tool that enforces the code style, applies all of them; I checked this with ruff 0.14.2 (the version pinned in .pre-commit-config.yaml) and the repository's pyproject.toml. Apart from the link below, the rest of the page, including the import conventions, is unchanged.
  • The link to Romain Brette's paper (a PDF on briansimulator.org) returns 404. It now points to the DOI of the published article and uses its exact title ("On the design of script languages for neural simulation").

workflow.rst

  • "if a commit not touches any code files" is corrected to "does not touch".
  • https://help.github.com/articles/using-pull-requests is replaced by https://docs.github.com/en/pull-requests (the old URL now only redirects).
  • The coveralls link is still current and is unchanged.

testing.rst

  • numpy.testing.utils was removed in NumPy 1.25, and numpy.testing has no array_equal function. The text now refers to numpy.testing.assert_array_equal, and the two examples import assert_equal from numpy.testing, as the test suite does. I also removed "types" from "comparing types, shapes and content", since assert_array_equal compares dtypes only with strict=True.
  • The doctest documentation link pointed to the Python 2 documentation; it now points to the Python 3 page.

representation.rst

  • The link to the IPython pretty printer documentation on ipython.org returns 404; it now points to the same section on ipython.readthedocs.io.

The code_style anchor is kept, since the release notes refer to it.

Checks: rstcheck reports no issues on the four files (for representation.rst, with Sphinx's doctest directive ignored, since rstcheck does not recognise it). sphinx-build -b html succeeds on master and on this branch with the same set of warnings, and the new NumPy references resolve through intersphinx.

The list of PEP-8 rules (indentation, spaces around operators and
keyword arguments, backslash continuations) is applied automatically
by `ruff format`, which the guide already names as the reference.
The PDF on briansimulator.org returns 404. Link to the published
article instead and use its exact title.
help.github.com/articles/using-pull-requests now only redirects to
docs.github.com.
The numpy.testing.utils module was removed in NumPy 1.25, and
numpy.testing has no `array_equal` function (numpy.array_equal returns a
bool instead of raising): refer to numpy.testing.assert_array_equal and
import from numpy.testing, as the test suite does. assert_array_equal
does not compare dtypes by default, so do not claim that it compares
types.
The doctest link pointed to the Python 2 documentation, and the IPython
pretty printer page on ipython.org returns 404; link to the current
Python 3 and IPython (Read the Docs) pages.

@mstimberg mstimberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, LGTM!

@mstimberg
mstimberg merged commit ef78841 into brian-team:master Oct 9, 2026
9 checks passed
@AxelNoun
AxelNoun deleted the docs/refresh-contribution-guidelines branch October 9, 2026 17:32
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.

2 participants