Skip to content

Commit 04858cb

Browse files
committed
remove windows tests
1 parent e6d6892 commit 04858cb

File tree

4 files changed

+39
-37
lines changed

4 files changed

+39
-37
lines changed

.github/workflows/CI.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -151,40 +151,40 @@ jobs:
151151
#
152152

153153

154-
test_windows:
155-
runs-on: windows-latest
156-
strategy:
157-
fail-fast: false
158-
matrix:
159-
python-version: ["3.8", "3.9", "3.10", "3.11"]
160-
161-
steps:
162-
- uses: actions/checkout@v2
163-
- name: Set up Python ${{ matrix.python-version }}
164-
uses: actions/setup-python@v2
165-
with:
166-
python-version: ${{ matrix.python-version }}
167-
- name: Install dependencies
168-
run: |
169-
python -m pip install --upgrade pip
170-
python -m pip install flake8 pytest
171-
python -m pip install numpy>=1.21.0
172-
python -m pip install "jaxlib==0.4.11" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
173-
python -m pip install jax==0.4.11
174-
python -m pip install -r requirements-dev.txt
175-
python -m pip install tqdm brainpylib
176-
pip uninstall brainpy -y
177-
python setup.py install
178-
- name: Lint with flake8
179-
run: |
180-
# stop the build if there are Python syntax errors or undefined names
181-
flake8 brainpy/ --count --select=E9,F63,F7,F82 --show-source --statistics
182-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
183-
flake8 brainpy/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
184-
- name: Test with pytest
185-
run: |
186-
cd brainpy
187-
pytest _src/
154+
# test_windows:
155+
# runs-on: windows-latest
156+
# strategy:
157+
# fail-fast: false
158+
# matrix:
159+
# python-version: ["3.8", "3.9", "3.10", "3.11"]
160+
#
161+
# steps:
162+
# - uses: actions/checkout@v2
163+
# - name: Set up Python ${{ matrix.python-version }}
164+
# uses: actions/setup-python@v2
165+
# with:
166+
# python-version: ${{ matrix.python-version }}
167+
# - name: Install dependencies
168+
# run: |
169+
# python -m pip install --upgrade pip
170+
# python -m pip install flake8 pytest
171+
# python -m pip install numpy>=1.21.0
172+
# python -m pip install "jaxlib==0.4.11" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
173+
# python -m pip install jax==0.4.11
174+
# python -m pip install -r requirements-dev.txt
175+
# python -m pip install tqdm brainpylib
176+
# pip uninstall brainpy -y
177+
# python setup.py install
178+
# - name: Lint with flake8
179+
# run: |
180+
# # stop the build if there are Python syntax errors or undefined names
181+
# flake8 brainpy/ --count --select=E9,F63,F7,F82 --show-source --statistics
182+
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
183+
# flake8 brainpy/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
184+
# - name: Test with pytest
185+
# run: |
186+
# cd brainpy
187+
# pytest _src/
188188

189189

190190
# test_windows_py37:

brainpy/_src/measure/tests/test_correlation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_vf1(self):
6969
print(bp.measure.voltage_fluctuation(voltages))
7070

7171
bm.enable_x64()
72-
voltages = bm.ones((100, 10)).value
72+
voltages = bm.ones((100, 10))
7373
r1 = bp.measure.voltage_fluctuation(voltages)
7474

7575
jit_f = jit(partial(bp.measure.voltage_fluctuation, numpy=False))

brainpy/_src/optimizers/tests/test_scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import jax.numpy
66
import matplotlib.pyplot as plt
77
from absl.testing import parameterized
8-
import brainpy.math as bm
98

9+
import brainpy.math as bm
1010
from brainpy._src.optimizers import scheduler
1111

1212
show = False

brainpy/_src/running/jax_multiprocessing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ def jax_vectorize_map(
6060
run_f = vmap(func) if clear_buffer else vmap_func
6161
if isinstance(arguments, dict):
6262
r = run_f(**tree_unflatten(tree, [ele[i: i + num_parallel] for ele in elements]))
63-
else:
63+
elif isinstance(arguments, (tuple, list)):
6464
r = run_f(*tree_unflatten(tree, [ele[i: i + num_parallel] for ele in elements]))
65+
else:
66+
raise TypeError
6567
res_values, res_tree = tree_flatten(r, is_leaf=lambda a: isinstance(a, bm.Array))
6668
if results is None:
6769
results = tuple([np.asarray(val) if clear_buffer else val] for val in res_values)

0 commit comments

Comments
 (0)