Skip to content

Commit

Permalink
Merge branch 'master' into ap-end
Browse files Browse the repository at this point in the history
  • Loading branch information
wvangeit authored Jan 21, 2021
2 parents fe441ee + fee2a0b commit 12fab4b
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 65 deletions.
119 changes: 119 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Build

on:
schedule:
# Runs every sunday at 3 a.m.
- cron: '0 3 * * SUN'
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install tox tox-gh-actions
- name: Run tox
run: tox

wheels:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: test
name: Build wheels for ${{ matrix.python }} ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [cp27, cp36, cp37, cp38, cp39]
arch: [x86_64, i686]
exclude:
- os: macos-latest
arch: i686
env:
CIBW_BUILD: ${{ matrix.python }}*${{ matrix.arch }}
CIBW_TEST_REQUIRES: nose neo[neomatlabio]>=0.5.1
CIBW_TEST_COMMAND: nosetests -s -v -x -w {project}/efel/tests
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install cibuildwheel
run: pip install cibuildwheel
- name: Build wheels
run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.arch }}
path: ./wheelhouse/*.whl

tarball:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
name: Build tarball
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Build a source tarball
run:
python setup.py sdist
- uses: actions/upload-artifact@v2
with:
name: tarball
path: dist


publish:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
name: Publish on PyPI
runs-on: ubuntu-latest
needs: [test, wheels, tarball]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Download all artifacts
uses: actions/download-artifact@v2
with:
path: artifacts

- name: Put artifacts into dist directory
run: |
mkdir -p dist
find artifacts -type f \( -iname \*.whl -o -iname \*.tar.gz \) -exec mv {} dist \;
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
23 changes: 0 additions & 23 deletions .github/workflows/run-tox.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .jenkins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -e
set -x

git config --global http.proxy http://bbpproxy.epfl.ch:80/
git config --global https.proxy http://bbpproxy.epfl.ch:80/

tox_args='-v --recreate'
tox_args="${tox_args} -e py3-test"

if [ "${os}" = "bb5" ]
then
. /opt/rh/rh-python36/enable
fi

cd $WORKSPACE

#########
# Virtualenv
#########

if [ ! -d "${WORKSPACE}/env" ]; then
python -m venv env
fi

. ${WORKSPACE}/env/bin/activate
pip install pip --upgrade
pip install tox --upgrade


#####
# Tests
#####

cd ${WORKSPACE}/eFEL

tox ${tox_args}
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ git:
cache:
directories:
- $HOME/.cache/pip
deploy:
provider: pypi
user: wvangeit
password:
secure: c9fJz1IliA0Scg4MS1HBAFbyGHnTOViYbF0I0WhrspqeNyyF4WKBx2kQzvMguc6JVm8MrcqdrM2P/me7WiD9vO4geqO/kXsjeg8kE2JnlGtAgX8PpOaR0P/IFdVcmfIc//05QS8PyovVZMxqlOrya1CN9cO4NMDRM9LS2dAaih0=
distributions: sdist
skip_existing: true
before_install:
- pip install pip --upgrade
- pip install tox --upgrade
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<tr>
<td>Build Status</td>
<td>
<a href="https://travis-ci.com/BlueBrain/eFEL">
<img src="https://travis-ci.com/BlueBrain/eFEL.svg?branch=master" alt="travis build status" />
<a href="https://github.com/BlueBrain/eFEL/actions">
<img src="https://github.com/BlueBrain/eFEL/workflows/Build/badge.svg?branch=master" alt="actions build status" />
</a>
</td>
</tr>
Expand Down
47 changes: 25 additions & 22 deletions docs/source/eFeatures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,29 @@ The voltage deflection between voltage base and steady-state voltage at stimend

voltage_deflection_vb_ssse = steady_state_voltage_stimend - voltage_base

LibV1: minimum_voltage
~~~~~~~~~~~~~~~~~~~~~~

The minimum of the voltage during the stimulus

- **Required features**: t, V, stim_start, stim_end
- **Units**: mV
- **Pseudocode**: ::

minimum_voltage = min(voltage[numpy.where((t >= stim_start) & (t <= stim_end))])

LibV1: maximum_voltage
~~~~~~~~~~~~~~~~~~~~~~

The maximum of the voltage during the stimulus

- **Required features**: t, V, stim_start, stim_end
- **Units**: mV
- **Pseudocode**: ::

maximum_voltage = max(voltage[numpy.where((t >= stim_start) & (t <= stim_end))])



Requested eFeatures
===================
Expand Down Expand Up @@ -458,34 +481,14 @@ The average voltage during the last 90% of the stimulus duration realtive to vol
steady_state_voltage_stimend_from_voltage_base = steady_state_voltage_stimend - voltage_base


**LibV5 : min_duringstim**
The minimum voltage during stimulus

- **Required features**:
- **Units**: mV
- **Pseudocode**: ::

min_duringstim = [numpy.min(voltage[numpy.where((t <= stim_end[0]) & (t >= stim_start[0]))])]


**LibV5 : min_duringstim_from_voltage_base**
The minimum voltage during stimulus

- **Required features**: LibV5: min_duringstim (mV), LibV5: voltage_base (mV)
- **Units**: mV
- **Pseudocode**: ::

min_duringstim_from_voltage_base = min_duringstim - voltage_base


**LibV5 : max_duringstim**
The minimum voltage during stimulus

- **Required features**:
- **Units**: mV
- **Pseudocode**: ::

min_duringstim = [numpy.max(voltage[numpy.where((t <= stim_end[0]) & (t >= stim_start[0]))])]
min_duringstim_from_voltage_base = minimum_voltage - voltage_base


**LibV5 : max_duringstim_from_voltage_base**
Expand All @@ -495,7 +498,7 @@ The minimum voltage during stimulus
- **Units**: mV
- **Pseudocode**: ::

max_duringstim_from_voltage_base = max_duringstim - voltage_base
max_duringstim_from_voltage_base = maximum_voltage - voltage_base

**LibV5 : diff_max_duringstim**
Difference between maximum and steady state during stimulation
Expand Down
19 changes: 8 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
[tox]
envlist = py{27,35,36,37,38}-{style, test}
envlist = py{27,3}-{style,test}
[gh-actions]
python =
2.7: py27{,-style}
3.5: py35{,-style}
3.6: py36{,-style}
3.7: py37{,-style}
3.8: py38{,-style}
2.7: py27
3.6: py3
3.7: py3
3.8: py3
3.9: py3
[testenv]
envdir =
py27{,-style}: {toxworkdir}/py27
py35{,-style}: {toxworkdir}/py35
py36{,-style}: {toxworkdir}/py36
py37{,-style}: {toxworkdir}/py37
py38{,-style}: {toxworkdir}/py38
py27{,-style,-test}: {toxworkdir}/py27
py3{6,7,8,9,}{,-style,-test}: {toxworkdir}/py3
deps =
nose
coverage
Expand Down

0 comments on commit 12fab4b

Please sign in to comment.