Skip to content

Code formatting and integrating braintools into brainpy#769

Merged
chaoming0625 merged 5 commits into
masterfrom
update
Aug 3, 2025
Merged

Code formatting and integrating braintools into brainpy#769
chaoming0625 merged 5 commits into
masterfrom
update

Conversation

@chaoming0625

@chaoming0625 chaoming0625 commented Aug 3, 2025

Copy link
Copy Markdown
Member

This pull request focuses on improving code organization, readability, and consistency across multiple files in the brainpy library. The changes include reordering imports, removing redundant blank lines, fixing indentation, and restructuring code for better clarity. These updates aim to enhance maintainability without altering functionality.

Import Reorganization and Cleanup:

  • Reordered imports in brainpy/__init__.py to use a consistent alias for visualize ([brainpy/__init__.pyL107-R107](https://github.com/brainpy/BrainPy/pull/769/files#diff-5d974170896c28d12799f3397556cede8d8bf7177677371c3751908f85748c01L107-R107)).
  • Standardized import order and removed unused imports in multiple files, including brainpy/_src/_delay.py, brainpy/_src/analysis/highdim/slow_points.py, and brainpy/_src/analysis/utils/model.py ([[1]](https://github.com/brainpy/BrainPy/pull/769/files#diff-33408bfb0f8807b460049204943ad016f5474e1743c356ef7bb359aa3183eae6R14-L17), [[2]](https://github.com/brainpy/BrainPy/pull/769/files#diff-2dc87b70e930c27c935a62c0e570776cf5dc6558cf82caedc40b4158530b4ae4R9-L25), [[3]](https://github.com/brainpy/BrainPy/pull/769/files#diff-5b4b38e112932aa4b6b6405f53a2b3714c788df70ddddef84fe2b36d5d33198dL4-R13)).

Code Formatting:

  • Fixed inconsistent indentation in brainpy/_src/analysis/highdim/slow_points.py to align function arguments ([brainpy/_src/analysis/highdim/slow_points.pyL425-R425](https://github.com/brainpy/BrainPy/pull/769/files#diff-2dc87b70e930c27c935a62c0e570776cf5dc6558cf82caedc40b4158530b4ae4L425-R425)).
  • Removed redundant blank lines across several files, such as brainpy/_src/analysis/constants.py, brainpy/_src/analysis/stability.py, and brainpy/_src/analysis/plotstyle.py ([[1]](https://github.com/brainpy/BrainPy/pull/769/files#diff-4a6df97870f22683d64e7e2af156e3856d89a95a1a326595f5bad73ad64a20ecL43-L44), [[2]](https://github.com/brainpy/BrainPy/pull/769/files#diff-b60d3dc52110054f767f4d2d4763817dec5155a49df85bdc8cc86962f6d3c205L30-L31), [[3]](https://github.com/brainpy/BrainPy/pull/769/files#diff-04138d21a122138dd4c312396ce6616650fe9718b5a88b5af807adfa7c35b40eL43)).

Test Adjustments:

  • Added a pytest.skip statement in brainpy/_src/analysis/lowdim/tests/test_bifurcation.py to handle tests that fail in GitHub Actions ([brainpy/_src/analysis/lowdim/tests/test_bifurcation.pyR5](https://github.com/brainpy/BrainPy/pull/769/files#diff-d9e9cdbce1f887e5245339b5869fd54f85b707c6050f085545fa2eed05a13884R5)).

Minor Refactoring:

  • Adjusted the order of import statements for clarity in files like brainpy/_src/analysis/lowdim/lowdim_bifurcation.py and brainpy/_src/analysis/lowdim/lowdim_phase_plane.py ([[1]](https://github.com/brainpy/BrainPy/pull/769/files#diff-d511d4d0e97e7bb2dabab171679e12c1931dcaa61b747fe0192afc9832063501R3-R12), [[2]](https://github.com/brainpy/BrainPy/pull/769/files#diff-234a8dd82ae09a0fa925de4db20d494a92635690461799c2e9ef982dd9cae1cdR3-L8)).
  • Improved readability by ensuring consistent code structure, such as in brainpy/_src/analysis/utils/function.py and brainpy/_src/analysis/utils/measurement.py ([[1]](https://github.com/brainpy/BrainPy/pull/769/files#diff-a293896f595d497c454583e2b0848a3a55ed3ed291772a52d9506ed56756b938R30), [[2]](https://github.com/brainpy/BrainPy/pull/769/files#diff-41a1131f73dd3551083fd2ca31ccd8c69fa25a3944c03a94f1e2887d9365971fL119)).

@chaoming0625 chaoming0625 changed the title Update Code formatting and integrating braintools into brainpy Aug 3, 2025
@chaoming0625 chaoming0625 merged commit 5530286 into master Aug 3, 2025
41 of 77 checks passed
@chaoming0625 chaoming0625 deleted the update branch August 3, 2025 02:35
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