Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Set up github actions #289

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Python package

on:
push:
branches: ['**']
pull_request:
branches: ['**']
create:
branches: [main]
tags: ['**']
schedule:
- cron: "0 4 * * *"

jobs:
build:

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

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 stuff for PyQt
run: |
sudo -E apt-get install --no-install-recommends -y \
openmpi-bin lsof \
libfontconfig1 libxext6 libx11-xcb1 libxcb-glx0 \
libxkbcommon-x11-0 libgl1-mesa-glx \
libncurses5 libreadline5 libdbus-1-3 libopenmpi-dev \
libc6-dev libtinfo-dev libncurses5-dev \
libx11-dev libreadline-dev \
libxcb-icccm4 libxcb-util1 libxcb-image0 libxcb-keysyms1 \
libxcb-render0 libxcb-shape0 libxcb-randr0 libxcb-render-util0 \
libxcb-xinerama0 libxcb-xfixes0

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-qt pytest-cov mne
pip install hnn_core

- name: Install HNN
run: |
python setup.py install

- name: Lint with flake8
run: |
flake8 --count hnn
- name: Test with pytest
run: |
python -m py.test . --cov=hnn hnn/tests/ --cov-report=xml
1 change: 1 addition & 0 deletions hnn/qt_psd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
from math import sqrt
from copy import deepcopy

Expand Down
1 change: 0 additions & 1 deletion hnn/qt_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ def plotsimdat(self):
xlim = (first_spec_trial['time'][0],
first_spec_trial['time'][-1])


# set the axes of input histograms to match dipole and spec plots
for ax in hist_axes:
ax.set_xlim(xlim)
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@
packages=find_packages(),
package_data={'hnn':
['../param/*.param']},
install_requires=['hnn-core']
install_requires=['nlopt',
'psutil',
'pyqt5']
)