Skip to content

Commit 1cbd06e

Browse files
committed
chore(release): 2.8.0
Bump __version__ to 2.8.0 and add the 2.8.0 changelog section: a library-wide audited correctness sweep (neuron/synapse dynamics, integrators, math/object-transform layer, dnn, optim/losses, analysis, runners) backed by regression tests, static typing with a mypy CI gate, test coverage raised to 92%+, test co-location, braintools/brainstate reuse, and documentation/example repairs.
1 parent bc9e23c commit 1cbd06e

2 files changed

Lines changed: 71 additions & 1 deletion

File tree

brainpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
# ==============================================================================
1616

17-
__version__ = "2.7.8"
17+
__version__ = "2.8.0"
1818
__version_info__ = tuple(map(int, __version__.split(".")))
1919

2020
from brainpy import _errors as errors

changelog.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,75 @@
11
# Changelog
22

3+
## Version 2.8.0
4+
5+
**Release Date:** June 19, 2026
6+
7+
Version 2.8.0 is a broad correctness, quality, and maintainability release. It bundles an audited, library-wide bug-fix sweep — neuron and synapse dynamics, ODE/SDE/FDE integrators, the math and object-transform layer, `dnn` layers, optimizers and losses, analysis tooling, and the simulation runners — each accompanied by new regression tests. Alongside the fixes, the release introduces static typing with a `mypy` CI gate, raises test coverage from roughly 84% to over 92%, co-locates tests with the modules they cover, and removes duplicated internals by reusing the shared `braintools` and `brainstate` implementations. Documentation and the bundled examples were repaired and refreshed.
8+
9+
### Highlights
10+
11+
- **Audited correctness sweep** across the whole library, each fix backed by regression tests.
12+
- **Static typing**: type annotations for core utilities, PEP 561 (`py.typed`), and a new `mypy` continuous-integration gate (#834).
13+
- **Test-suite overhaul**: coverage raised from ~84% to 92%+ (#836), with tests co-located as `<module>_test.py` (#832).
14+
- **Reduced duplication**: reuse `braintools` (init, metric, surrogate) and `brainstate` transforms instead of maintaining forked copies (#835, #833, #831).
15+
16+
### Bug Fixes
17+
18+
#### Neuron and synapse dynamics
19+
- `CondNeuGroup`: corrected synaptic-current scaling that attenuated currents by ~1000× (#842).
20+
- `DualExp`: correct handling of equal time constants, plus per-neuron STP reset (#847).
21+
- `dynold`: fixed STP construction, sparse-synapse drift, plasticity decay, and Bellec initialization (#848).
22+
- Rate models: fixed `RNNCell.reset_state` crash and `ThresholdLinearModel` noise `dt`-scaling (#850).
23+
24+
#### Integrators
25+
- `RKF45` node handling and Kl/Pl SRK diffusion weights (#841).
26+
- Fractional integrators: `CaputoEuler.reset` state desynchronization and `set_default_fdeint` (#846).
27+
- Prevented a `MilsteinGradFree` out-of-memory crash (#837).
28+
29+
#### Math, sparse, and object transforms
30+
- `coo_to_csr` bounds checking, plus a sparse/event/delay regression suite (#845).
31+
- Compatibility fixes: `gelu` integer input, `unflatten` negative dimension, `segment_mean` on `Array` (#844).
32+
- Object transforms: `cond`/`ifelse`, collectors, and `VariableView` edge cases (#840).
33+
- `ShardedArray` pytree flattening and `remove_diag` guard (#839).
34+
35+
#### Neural-network layers
36+
- `BatchNorm` running-variance bias, pooling `channel_axis`, and `LayerNorm` error handling (#843).
37+
38+
#### Optimizers and losses
39+
- Audited correctness fixes for `Adan`, `SM3`, and several loss functions (#838).
40+
41+
#### Analysis
42+
- Fixed-point classification, nullcline selection, gradient-descent batching, and plotting keyword handling (#849).
43+
44+
#### Runtime and runners
45+
- `DSRunner`: `memory_efficient` output/monitors and eager bound-validation checks (#851).
46+
- `IntegratorRunner`: dict-monitor regression (#854).
47+
- Runners: jit-dict mutation, dict string monitors, and multi-device parallel concatenation (#852).
48+
- Inputs / algorithms / connectivity: deprecation aliases, regression fits, CSR guard, and dtype handling (#853).
49+
- Earlier audited correctness, API-drift, and edge-case fixes with a regression and coverage suite (#830).
50+
51+
### Quality and Tooling
52+
53+
- Added typing for core utilities, enabled PEP 561, and added a `mypy` CI job (#834).
54+
- Comprehensive coverage tests, raising coverage from ~84% to 92%+ (#836).
55+
- Co-located tests as `<module>_test.py` and removed the legacy `tests/` trees (#832).
56+
- Reused `braintools.init` / `braintools.metric` in `brainpy.initialize` and losses (#835).
57+
- Reused `braintools.surrogate` and removed the duplicate `brainpy.math.surrogate` (#833).
58+
- CI: replaced `remove_vmap` with `brainstate.transform.unvmap` and resolved `brainstate` 0.5.1 API drift (#831); green-lighted the Dense fit-flag tracer, buffer-donation test pollution, and L1 loss contract, and restored the Codecov token (#855).
59+
60+
### Documentation and Examples
61+
62+
- Converted public-API docstrings to NumPy style and enforced the convention (#856).
63+
- Repaired documentation notebooks and fixed Hz-input and `RNNCell.reset(batch_size)` bugs (#857).
64+
- Repaired six broken example scripts — API drift, data paths, and channel handling (#858).
65+
- Updated documentation links and the Python-version requirement in `README.md`; added `.gitattributes` for line endings.
66+
- Served the project logo as WebP from `brainx.chaobrain.com`.
67+
68+
### Dependencies
69+
70+
- Bumped `sphinx` to `>=9.0.4,<9.1.0` (#827), `sphinx-book-theme` to `>=1.2.0` (#826), and `jupyter-sphinx` to `>=0.5.3` (#825).
71+
72+
373
## Version 2.7.8
474

575
**Release Date:** April 18, 2026

0 commit comments

Comments
 (0)