refactor(nest): drop leading underscore from module files in _nest_network/_nest_spatial/_nest_base#85
Merged
Conversation
…ST packages Rename 65 private module files `_<name>.py` -> `<name>.py` in _nest_network/, _nest_spatial/, and _nest_base/ (the packages keep their underscore), and rewrite all import statements and Sphinx-docstring cross-references in lockstep (415 absolute + 19 relative). Pure structural rename — import smoke test and the non-NEST test slice pass. Also bundled (pre-existing working-tree changes, committed together by request): - Drop `platform='cpu'` from `brainstate.environ.set(...)` across the test suite. - Add a cross-platform .gitattributes (LF in the repo and working tree on Linux, macOS, and Windows; CRLF only for Windows .bat/.cmd/.ps1) and renormalize all tracked files to LF.
|
🎉 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! 🌟 |
chaoming0625
pushed a commit
that referenced
this pull request
Jun 16, 2026
Brings in #85: drop the leading underscore from module files in _nest_network/, _nest_spatial/, _nest_base/, plus the cross-platform .gitattributes and LF renormalization. Conflict resolutions: - .gitattributes: kept the cross-platform version from origin/main. - .gitignore, docs/conf.py, docs/apis/nest-base.rst: kept local main's content (origin/main differed only in line endings). - _nest_network/event_plastic.py, _nest_network/event_proj.py: combined origin/main's module rename + nest-import rewrites with local main's `_brainpy._delay` -> `_brainpy.delay` delay-module rename. - Updated 3 stale `_brainpy._delay` docstring refs (plastic_base.py, bernoulli_synapse.py, static_synapse.py) to `_brainpy.delay` so the merged tree references the renamed delay module consistently.
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
De-underscores the module files in three NEST sub-packages so modules read
base.py,simulator.py,kernels.py, … instead of_base.py,_simulator.py,_kernels.py. The packages themselves keep their leading underscore — only filesinside them are renamed. Pure structural rename, no behavior change.
git mv, history preserved): 46 in_nest_network/, 15 in_nest_spatial/, 4 in_nest_base/.:class:/:meth:docstring refs across sibling packages) + 19 relative same-dir imports.__init__.pyfiles and the top-level package imports are unchanged.Cross-platform
.gitattributesReplaces the 3-line file with a comprehensive policy: LF in the repo and working
tree on Linux/macOS/Windows for all source/text; CRLF only for Windows scripts
(
.bat/.cmd/.ps1); binaries never normalized; plus Linguist +export-ignorerules. All tracked files renormalized to LF (
git add --renormalize).Also bundled
Pre-existing working-tree change: drops
platform='cpu'frombrainstate.environ.set(...)across the test suite (makes tests device-agnostic).Verification
from ._in the 3 dirs.Out of scope
Sibling packages
_nest_device,_nest_neuron,_nest_plasticity,_nest_synapsekeep underscored module files.
🤖 Generated with Claude Code