refactor(nest): split _nest into category packages; promote _validation/_network; relocate internal docs#84
Merged
Conversation
added 5 commits
June 16, 2026 22:09
…ticity markers Add the appropriate NEST marker base class and a super().__init__(in_size=1) prologue to the 21 previously-unwired synapse/plasticity spec classes, mirroring the existing gap_junction(NESTSynapse) precedent. Short-term-plasticity specs (tsodyks*, quantal_stp) and static synapses are NESTSynapse; STDP and voltage-based rules are NESTPlasticity. Rule kernels and NEST parameter semantics are unchanged. _base.py taxonomy docstrings updated to match.
…on/_network
Split the flat brainpy_state/_nest package into five focused packages and
promote two subpackages to top level:
- _nest -> _nest_base, _nest_neuron, _nest_synapse,
_nest_plasticity, _nest_device (by NEST model type)
- _nest/_validation -> _nest_validation
- _network -> _nest_network
All intra-package, absolute, and root re-export imports are rewritten to the
new locations. The public brainpy_state / brainpy.state surface is unchanged:
__all__ is byte-for-byte identical (210 names) and every name resolves.
Example scripts that import package internals (gap_junction, hh_psc_alpha_gap,
_clopath_drive, SynapseCollection) are updated to the new paths.
Collection: 2767 tests, 0 errors.
…alidation promotion `_validation` moved from brainpy_state/_nest/_validation (depth 3 under the repo root) to brainpy_state/_nest_validation (depth 2), so the parents[3] walk to the repo root overshot into .claude/worktrees. Use parents[2].
…xamples/nest_like Moves: - examples/nest/ -> examples/nest_like/ - CONTEXT.md -> develop/NEST_PARITY_LEDGER.md - DESIGN_delays_and_missing_features.md -> develop/ - docs/nest-status/internal/ -> develop/nest-status/internal/ Update all textual and import references: dotted `examples.nest` imports (~80 test modules), slash `examples/nest` paths, the brunel_siegert pathlib segment, and the moved-doc paths. Fix the nest-base.rst class-tree annotation (_nest/_base.py -> _nest_base/_base.py). Collection unchanged at 2767 tests; example-coupled tests pass.
|
🎉 Congratulations on opening your first pull request in brainpy.state! Thank you for your contribution! A maintainer will review your changes soon. Please make sure:
We appreciate your effort in making brainpy.state better. If you have any questions, feel free to ask in the comments. Welcome to the brainpy.state community! 🌟 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Large structural refactor of the
brainpy_statepackage. No public API change — thebrainpy_state/brainpy.statesurface is byte-for-byte identical (__all__= 210 names, every name resolves).Package split & promotion
brainpy_state/_nest/→ split by NEST model type into:_nest_base(marker base classes +_utils/_plastic_base)_nest_neuron,_nest_synapse,_nest_plasticity,_nest_device_nest/_validation/→ promoted to top-level_nest_validation_network/→ renamed_nest_networkAll intra-package, absolute, and root re-export imports rewritten to the new locations. File history is preserved (git rename detection).
Marker wiring (pre-move)
NESTSynapse; STDP + voltage-based rules →NESTPlasticity.Docs & examples
examples/nest/→examples/nest_like/(and ~80 coupled test imports updated: dottedexamples.nest, slash paths, and a pathlib segment).develop/:CONTEXT.md→develop/NEST_PARITY_LEDGER.mdDESIGN_delays_and_missing_features.md→develop/docs/nest-status/internal/→develop/nest-status/internal/nest-base.rstclass-tree annotation and thenetwork-api.mdspike_recorderimport path.Verification
import brainpy_stateOK;__all__byte-for-byte identical (210 names).find_packagesauto-discovers all new packages (nopyprojectchange needed)._validationpromotion was found and fixed).brainpy_state/,examples/,docs/) carry zero stale path references.Notes
changelog.mdentries and the relocateddevelop/internal scratch docs intentionally retain old-path mentions (historical record / internal notes).🤖 Generated with Claude Code