Skip to content

Commit

Permalink
STY: fixed flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilo9999 committed Jun 14, 2024
1 parent 927905c commit 862fb41
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/macos_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,42 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04,macos-14]
python-version: [3.8,3.9]
os: [macos-latest]
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: cp310
with:
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
python-version: ${{ matrix.python-version }}
fetch-depth: 2
- name: Install ubuntu dependencies
if: contains(matrix.os, 'ubuntu')
shell: bash -el {0}
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install libopenmpi-dev openmpi-bin
- name: Install MacOs dependencies
if: contains(matrix.os, 'macos')
shell: bash -el {0}
run: |
brew install open-mpi
echo "MPI_LIB_NRN_PATH=/opt/homebrew/lib/libmpi.dylib" >> $GITHUB_ENV
fi;
- name: Install dependencies
shell: bash -el {0}
run: |
'${{ steps.cp310.outputs.python-path }}' -m pip install --upgrade pip
'${{ steps.cp310.outputs.python-path }}' -m pip install mpi4py openmpi
python -m pip install --upgrade pip
conda install --yes -c conda-forge mpi4py openmpi
- name: Install HNN-core
shell: bash -el {0}
run: |
'${{ steps.cp310.outputs.python-path }}' -m pip install --verbose '.[opt, parallel, test, gui]'
pip install --verbose '.[opt, parallel, test, gui]'
- name: Lint with flake8
shell: bash -el {0}
run: |
flake8 --count hnn_core
- name: Test with pytest
shell: bash -el {0}
run: |
'${{ steps.cp310.outputs.python-path }}' -m pytest ./hnn_core/tests/ --cov=hnn_core --cov-report=xml
python -m pytest ./hnn_core/tests/ --cov=hnn_core --cov-report=xml
- name: Upload coverage to Codecov
shell: bash -el {0}
run: |
bash <(curl -s https://codecov.io/bash) -f ./coverage.xml
bash <(curl -s https://codecov.io/bash) -f ./coverage.xml
6 changes: 3 additions & 3 deletions hnn_core/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
from hnn_core.gui._logging import logger
from hnn_core.gui._viz_manager import _VizManager, _idx2figname
from hnn_core.network import pick_connection
from hnn_core.params import (_extract_drive_specs_from_hnn_params, _read_json,
_read_legacy_params)
from hnn_core.params import (_extract_drive_specs_from_hnn_params)
from hnn_core.dipole import _read_dipole_txt

import base64
Expand Down Expand Up @@ -1275,7 +1274,8 @@ def load_drive_and_connectivity(params, log_out, drives_out,
"""Add drive and connectivity ipywidgets from params."""
with log_out:
# Add connectivity
add_connectivity_tab(params, connectivity_out, connectivity_textfields)
add_connectivity_tab(params, connectivity_out,
connectivity_textfields)
# Add drives
add_drive_tab(params, log_out, drives_out, drive_widgets, drive_boxes, tstop,
layout)
Expand Down

0 comments on commit 862fb41

Please sign in to comment.