Skip to content

Release braintools 0.4.0 - #134

Merged
chaoming0625 merged 1 commit into
mainfrom
worktree-release-0.4.0
Oct 20, 2026
Merged

chaoming0625 merged 1 commit into
mainfrom
worktree-release-0.4.0

Conversation

@chaoming0625

@chaoming0625 chaoming0625 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Prepares the braintools 0.4.0 release, which ships all of the roadmap work merged since 0.3.0 (#129–#133): braintools.analysis, braintools.spike, braintools.fit, quad trajectories, scalable conn networks, readout learning, neuroscience data formats, full type checking and doctested examples.

Changes

  • braintools/_version.py: 0.3.0 → 0.4.0.
  • changelog.md: the five unreleased phase sections (0.4–0.8) are merged into one 0.4.0 release note, with highlights, upgrade notes, Added / Changed / Deprecated / Removed / Fixed, and packaging.
  • Docstrings and docs no longer cite unpublished versions: versionchanged:: 0.7.0 → 0.4.0, and comparisons such as "differs from 0.6" → "0.3".
  • Python: requires-python >=3.12, with classifiers for 3.12–3.15. 3.11 is dropped from the CI matrix, and CONTRIBUTING.md is updated to match.
  • scripts/run_doctests.py forces the Agg matplotlib backend, matching conftest.py.

Local verification

  • pytest, one process per subpackage: all passed (≈6.3k tests, 0 failures).
  • mypy: no issues in 148 source files.
  • sphinx-build -W --keep-going: succeeded.
  • Doctests: all modules pass except braintools.file, which needs pynwb, neo and quantities; those weren't installed locally and are covered by the doctest workflow here.
  • python -m build and twine check: passed. The wheel metadata reports Version: 0.4.0 and Requires-Python: >=3.12.

Summary by Sourcery

Prepare braintools 0.4.0 as the consolidated release of the roadmap features and updated Python support.

Enhancements:

  • Consolidate the roadmap work into the braintools 0.4.0 release, including analysis, spike, fitting, trajectory integration, scalable connectivity, learning, and neuroscience data tooling.
  • Update release documentation, migration guidance, API references, and examples to reflect the unified 0.4.0 release.
  • Require Python 3.12 or newer and align contributor guidance and CI support with the new minimum version.

Build:

  • Update package metadata and version information for the 0.4.0 release.

CI:

  • Align CI with supported Python versions and make doctest execution use a non-interactive matplotlib backend.

Documentation:

  • Consolidate unreleased roadmap notes into the 0.4.0 changelog and update version references throughout documentation.

Tests:

  • Finalize the release with the project’s tested, type-checked, documented, and build-validated state.

- Bump the version to 0.4.0.
- Consolidate the unreleased 0.4-0.8 roadmap notes into one 0.4.0 release
  note with highlights, upgrade notes, and the full deprecation table.
- Rewrite docstring and doc references to versions that will never be
  published (0.5-0.8) to 0.4.0 or 0.3.
- Require Python >= 3.12 and declare 3.12-3.15 classifiers; drop 3.11
  from the CI matrix.
- Force the Agg matplotlib backend in scripts/run_doctests.py, as
  conftest.py does for pytest.
@sourcery-ai

sourcery-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Sorry @chaoming0625, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 21 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This release-preparation PR publishes braintools 0.4.0 by updating version and release documentation to consolidate all roadmap work since 0.3.0, documenting the resulting API and behavior changes, raising support to Python 3.12+, and aligning CI and doctest execution with the release configuration.

Flow diagram for braintools 0.4.0 compatibility changes

flowchart TD
    Python312[Python 3.12 or newer] --> CI[CI matrix 3.12 to 3.14]
    CI --> Package[Package metadata requires Python 3.12+]
    Package --> Version[braintools version 0.4.0]
    Version --> Release[Published release]
    Python311[Python 3.11] --> Dropped[Support dropped]
Loading

File-Level Changes

Change Details Files
Promote the package and consolidate roadmap work into the 0.4.0 release.
  • Set the runtime version to 0.4.0.
  • Merged the unreleased 0.4–0.8 notes into a single release note covering features, migrations, fixes, deprecations, and packaging.
  • Updated documentation and doctest references from unpublished roadmap versions to 0.4.0 or the prior 0.3 release.
braintools/_version.py
changelog.md
braintools/_deprecation.py
braintools/analysis/spike/_firings.py
braintools/conn/_biological.py
braintools/conn/_compartment.py
braintools/conn/_kernel.py
braintools/conn/_random.py
braintools/conn/_spatial.py
braintools/conn/_topological.py
braintools/conn/_topological_test.py
docs/analysis/08_analysis_toolbox.ipynb
docs/conn/06_networks_and_scale.ipynb
docs/migration.md
Raise the supported Python baseline and align packaging and CI with the 0.4.0 support policy.
  • Changed package metadata and contributor guidance to require Python 3.12+.
  • Removed Python 3.11 from CI and added the Python 3.15 package classifier.
pyproject.toml
.github/workflows/CI.yml
CONTRIBUTING.md
Make doctest execution use the same headless plotting configuration as the test suite.
  • Set MPLBACKEND to Agg before importing matplotlib or running module doctests.
scripts/run_doctests.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chaoming0625
chaoming0625 merged commit 965db5b into main Oct 20, 2026
10 checks passed
@chaoming0625
chaoming0625 deleted the worktree-release-0.4.0 branch October 20, 2026 12:22
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.

1 participant