Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit a1cbed2

Browse files
author
Jaquier Aurélien Tristan
committed
Merge branch 'master' of https://github.com/BlueBrain/BluePyOpt into neuroml-test
2 parents 57c9e5a + 519b2fc commit a1cbed2

37 files changed

+2191
-889
lines changed

.coveragerc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
[run]
2-
omit = */tests/*
2+
omit = */tests/*,bluepyopt/_version.py
3+
[report]
4+
omit=bluepyopt/_version.py

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '[0-9]+.[0-9]+.[0-9]+'
9+
10+
jobs:
11+
call-test-workflow:
12+
uses: BlueBrain/BluePyOpt/.github/workflows/test.yml@master
13+
14+
build-n-publish:
15+
name: Build and publish on PyPI
16+
runs-on: ubuntu-latest
17+
needs: call-test-workflow
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Python 3.7
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: 3.7
27+
28+
- name: Build a source tarball and wheel
29+
run: |
30+
pip install wheel
31+
python setup.py sdist bdist_wheel
32+
33+
- name: Publish package to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
user: __token__
37+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/keep-alive.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Keep-alive
2+
3+
on:
4+
schedule:
5+
# Runs every sunday at 3 a.m.
6+
- cron: '0 3 * * SUN'
7+
8+
jobs:
9+
call-test-workflow:
10+
uses: BlueBrain/BluePyOpt/.github/workflows/test.yml@master
11+
12+
keep-workflow-alive:
13+
name: Keep workflow alive
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
ref: master
19+
20+
- name: Get date from 50 days ago
21+
run: |
22+
datethen=`date -d "-50 days" --utc +%FT%TZ`
23+
echo "datelimit=$datethen" >> $GITHUB_ENV
24+
25+
- name: setup git config
26+
if: github.event.base.repo.updated_at <= env.datelimit
27+
run: |
28+
# setup the username and email.
29+
git config user.name "Github Actions Keepalive Bot"
30+
git config user.email "<>"
31+
32+
- name: commit IF last commit is older than 50 days
33+
if: github.event.base.repo.updated_at <= env.datelimit
34+
run: |
35+
git commit -m "Empty commit to keep the gihub workflows alive" --allow-empty
36+
git push origin master

.github/workflows/main.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
# allows this workflow to be reusable (e.g. by the build workflow)
6+
workflow_call:
7+
8+
jobs:
9+
test:
10+
name: Test for python ${{ matrix.python-version }} on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest]
15+
python-version: ["3.7", "3.8", "3.9", "3.10"]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip setuptools
28+
pip install tox tox-gh-actions
29+
30+
- name: Run tox
31+
run: tox
32+
33+
- name: "Upload coverage to Codecov"
34+
uses: codecov/codecov-action@v2
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
fail_ci_if_error: false

README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ When you use the BluePyOpt software or method for your research, we ask you to c
9797
}
9898
9999
100+
Publications that use or mention BluePyOpt
101+
==========================================
102+
The list of publications that use or mention BluePyOpt can be found on `the github wiki page <https://github.com/BlueBrain/BluePyOpt/wiki/Publications-that-use-or-mention-BluePyOpt>`_.
103+
100104
Support
101105
=======
102106
We are providing support using a chat channel on `Gitter <https://gitter.im/BlueBrain/BluePyOpt>`_, or the `Github discussion page <https://github.com/BlueBrain/BluePyOpt/discussions>`_.
@@ -115,7 +119,7 @@ News
115119
Requirements
116120
============
117121

118-
* `Python 3.6+ <https://www.python.org/downloads/release/python-360/>`_
122+
* `Python 3.7+ <https://www.python.org/downloads/release/python-370/>`_
119123
* `Pip <https://pip.pypa.io>`_ (installed by default in newer versions of Python)
120124
* `Neuron 7.4+ <http://neuron.yale.edu/>`_ (compiled with Python support)
121125
* `eFEL eFeature Extraction Library <https://github.com/BlueBrain/eFEL>`_ (automatically installed by pip)

bluepyopt/deapext/CMA_MO.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def get_hyped(pop, ubound_score=250., threshold_improvement=240.):
7171
ubounds = numpy.max(points, axis=0) + 2.0
7272

7373
hv = hype.hypeIndicatorSampled(
74-
points=points, bounds=ubounds, k=5, nrOfSamples=200000
74+
points=points, bounds=ubounds, k=5, nrOfSamples=1000000
7575
)
7676
return hv
7777

bluepyopt/deapext/algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def eaAlphaMuPlusLambdaCheckpoint(
160160
gen = start_gen + 1
161161
stopping_params = {"gen": gen}
162162
while utils.run_next_gen(
163-
not(_check_stopping_criteria(stopping_criteria, stopping_params)),
163+
not (_check_stopping_criteria(stopping_criteria, stopping_params)),
164164
terminator):
165165
offspring = _get_offspring(parents, toolbox, cxpb, mutpb)
166166

@@ -175,7 +175,7 @@ def eaAlphaMuPlusLambdaCheckpoint(
175175

176176
logger.info(logbook.stream)
177177

178-
if(cp_filename and cp_frequency and
178+
if (cp_filename and cp_frequency and
179179
gen % cp_frequency == 0):
180180
cp = dict(population=population,
181181
generation=gen,

bluepyopt/deapext/optimisations.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ def setup_deap(self):
199199

200200
# Register the evaluation function for the individuals
201201
# import deap_efel_eval1
202-
self.toolbox.register("evaluate", self.evaluator.evaluate_with_lists)
202+
self.toolbox.register(
203+
"evaluate",
204+
self.evaluator.set_neuron_variables_and_evaluate_with_lists
205+
)
203206

204207
# Register the mate operator
205208
self.toolbox.register(

bluepyopt/deapext/optimisationsCMA.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,10 @@ def setup_deap(self):
211211
)
212212

213213
# Register the evaluation function for the individuals
214-
self.toolbox.register("evaluate", self.evaluator.evaluate_with_lists)
214+
self.toolbox.register(
215+
"evaluate",
216+
self.evaluator.set_neuron_variables_and_evaluate_with_lists
217+
)
215218

216219
import copyreg
217220
import types

0 commit comments

Comments
 (0)