Skip to content

Commit

Permalink
version 2.2.0 (#248)
Browse files Browse the repository at this point in the history
version 2.2.0
  • Loading branch information
chaoming0625 authored Aug 12, 2022
2 parents 978ea66 + 7160d65 commit 28f339d
Show file tree
Hide file tree
Showing 340 changed files with 45,230 additions and 30,239 deletions.
4 changes: 0 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
<!--- For example, markdown files should pass markdownlint locally according to the rules -->
<!--- See how your change affects other areas of the code, etc. -->

## Screenshots(optional)
<!--- If Screenshots is not necessary or not available in this pull request, you can delete this section -->
<!--- Changes including html and css are required to have screenshots -->

## Types of changes
<!--- What types of changes does your code introduce? -->
<!--- Only left the line that best describes this pull request -->
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/Linux_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
# python -m pip install https://github.com/google/jax/archive/refs/tags/jax-v0.3.14.tar.gz
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
python setup.py install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest brainpy/
4 changes: 3 additions & 1 deletion .github/workflows/MacOS_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install jax==0.3.14
python -m pip install jaxlib==0.3.14
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
python setup.py install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest brainpy/
4 changes: 2 additions & 2 deletions .github/workflows/Sync_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Merge master -> brainpy-2.x
- name: Merge master -> brainpy-2.2.x
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: brainpy-2.x
target_branch: brainpy-2.2.x
github_token: ${{ github.token }}
7 changes: 4 additions & 3 deletions .github/workflows/Windows_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install numpy==1.21.0
python -m pip install "jax[cpu]==0.3.2" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
python -m pip install numpy>=1.21.0
python -m pip install "jaxlib==0.3.14" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
python -m pip install https://github.com/google/jax/archive/refs/tags/jax-v0.3.14.tar.gz
python -m pip install -r requirements-win.txt
python -m pip install tqdm brainpylib
python setup.py install
Expand All @@ -38,7 +39,7 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest brainpy/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ brainpy/base/tests/io_test_tmp*

development

brainpy/dyn/tests/data
examples/simulation/data
examples/simulation/results
examples/analysis/data
extensions/.idea
extensions/wheelhouse
Expand Down Expand Up @@ -211,3 +213,4 @@ dmypy.json
cython_debug/

/docs/apis/simulation/generated/
!/brainpy/dyn/tests/data/
40 changes: 27 additions & 13 deletions brainpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

__version__ = "2.1.12"
__version__ = "2.2.0"


try:
Expand All @@ -15,7 +15,7 @@


# fundamental modules
from . import errors, tools, check
from . import errors, tools, check, modes


# "base" module
Expand All @@ -29,7 +29,15 @@


# toolboxes
from . import connect, initialize, optimizers, measure, losses, datasets, inputs
from . import (connect, # synaptic connection
initialize, # weight initialization
optimizers, # gradient descent optimizers
losses, # loss functions
measure, # methods for data analysis
datasets, # methods for generating data
inputs, # methods for generating input currents
algorithms, # online or offline training algorithms
)


# numerical integrators
Expand All @@ -45,26 +53,32 @@

# dynamics simulation
from . import dyn
from .dyn import (channels, # channel models
layers, # ANN layers
networks, # network models
neurons, # neuron groups
rates, # rate models
synapses, # synaptic dynamics
synouts, # synaptic output
synplast, # synaptic plasticity
)
from .dyn.runners import *


# neural networks modeling
from . import nn


# running
from . import running
# dynamics training
from . import train


# automatic dynamics analysis
from . import analysis


# "visualization" module, will be removed soon
from .visualization import visualize
# running
from . import running


# compatible interface
from .compat import * # compat
# "visualization" module, will be removed soon
from .visualization import visualize


# convenient access
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

from .offline import *
from .online import *
from . import utils
Loading

0 comments on commit 28f339d

Please sign in to comment.