Skip to content

Commit 28f339d

Browse files
authored
version 2.2.0 (#248)
version 2.2.0
2 parents 978ea66 + 7160d65 commit 28f339d

File tree

340 files changed

+45230
-30239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+45230
-30239
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
<!--- For example, markdown files should pass markdownlint locally according to the rules -->
1515
<!--- See how your change affects other areas of the code, etc. -->
1616

17-
## Screenshots(optional)
18-
<!--- If Screenshots is not necessary or not available in this pull request, you can delete this section -->
19-
<!--- Changes including html and css are required to have screenshots -->
20-
2117
## Types of changes
2218
<!--- What types of changes does your code introduce? -->
2319
<!--- Only left the line that best describes this pull request -->

.github/workflows/Linux_CI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip
3030
python -m pip install flake8 pytest
31+
# python -m pip install https://github.com/google/jax/archive/refs/tags/jax-v0.3.14.tar.gz
3132
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
3233
python setup.py install
3334
- name: Lint with flake8
3435
run: |
3536
# stop the build if there are Python syntax errors or undefined names
3637
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3738
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3940
- name: Test with pytest
4041
run: |
4142
pytest brainpy/

.github/workflows/MacOS_CI.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip
3030
python -m pip install flake8 pytest
31+
python -m pip install jax==0.3.14
32+
python -m pip install jaxlib==0.3.14
3133
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
3234
python setup.py install
3335
- name: Lint with flake8
3436
run: |
3537
# stop the build if there are Python syntax errors or undefined names
3638
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3739
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
40+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3941
- name: Test with pytest
4042
run: |
4143
pytest brainpy/

.github/workflows/Sync_branches.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
steps:
1010
- uses: actions/checkout@master
1111

12-
- name: Merge master -> brainpy-2.x
12+
- name: Merge master -> brainpy-2.2.x
1313
uses: devmasx/merge-branch@master
1414
with:
1515
type: now
1616
from_branch: master
17-
target_branch: brainpy-2.x
17+
target_branch: brainpy-2.2.x
1818
github_token: ${{ github.token }}

.github/workflows/Windows_CI.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip
3030
python -m pip install flake8 pytest
31-
python -m pip install numpy==1.21.0
32-
python -m pip install "jax[cpu]==0.3.2" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
31+
python -m pip install numpy>=1.21.0
32+
python -m pip install "jaxlib==0.3.14" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
33+
python -m pip install https://github.com/google/jax/archive/refs/tags/jax-v0.3.14.tar.gz
3334
python -m pip install -r requirements-win.txt
3435
python -m pip install tqdm brainpylib
3536
python setup.py install
@@ -38,7 +39,7 @@ jobs:
3839
# stop the build if there are Python syntax errors or undefined names
3940
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4041
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
41-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
42+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4243
- name: Test with pytest
4344
run: |
4445
pytest brainpy/

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ brainpy/base/tests/io_test_tmp*
77

88
development
99

10+
brainpy/dyn/tests/data
1011
examples/simulation/data
12+
examples/simulation/results
1113
examples/analysis/data
1214
extensions/.idea
1315
extensions/wheelhouse
@@ -211,3 +213,4 @@ dmypy.json
211213
cython_debug/
212214

213215
/docs/apis/simulation/generated/
216+
!/brainpy/dyn/tests/data/

brainpy/__init__.py

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
__version__ = "2.1.12"
3+
__version__ = "2.2.0"
44

55

66
try:
@@ -15,7 +15,7 @@
1515

1616

1717
# fundamental modules
18-
from . import errors, tools, check
18+
from . import errors, tools, check, modes
1919

2020

2121
# "base" module
@@ -29,7 +29,15 @@
2929

3030

3131
# toolboxes
32-
from . import connect, initialize, optimizers, measure, losses, datasets, inputs
32+
from . import (connect, # synaptic connection
33+
initialize, # weight initialization
34+
optimizers, # gradient descent optimizers
35+
losses, # loss functions
36+
measure, # methods for data analysis
37+
datasets, # methods for generating data
38+
inputs, # methods for generating input currents
39+
algorithms, # online or offline training algorithms
40+
)
3341

3442

3543
# numerical integrators
@@ -45,26 +53,32 @@
4553

4654
# dynamics simulation
4755
from . import dyn
56+
from .dyn import (channels, # channel models
57+
layers, # ANN layers
58+
networks, # network models
59+
neurons, # neuron groups
60+
rates, # rate models
61+
synapses, # synaptic dynamics
62+
synouts, # synaptic output
63+
synplast, # synaptic plasticity
64+
)
65+
from .dyn.runners import *
4866

4967

50-
# neural networks modeling
51-
from . import nn
52-
53-
54-
# running
55-
from . import running
68+
# dynamics training
69+
from . import train
5670

5771

5872
# automatic dynamics analysis
5973
from . import analysis
6074

6175

62-
# "visualization" module, will be removed soon
63-
from .visualization import visualize
76+
# running
77+
from . import running
6478

6579

66-
# compatible interface
67-
from .compat import * # compat
80+
# "visualization" module, will be removed soon
81+
from .visualization import visualize
6882

6983

7084
# convenient access

brainpy/nn/algorithms/__init__.py renamed to brainpy/algorithms/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
from .offline import *
44
from .online import *
5+
from . import utils

0 commit comments

Comments
 (0)