diff --git a/.github/workflows/macos_unit_tests.yml b/.github/workflows/macos_unit_tests.yml index 88b61d0900..fac63e14b8 100644 --- a/.github/workflows/macos_unit_tests.yml +++ b/.github/workflows/macos_unit_tests.yml @@ -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 \ No newline at end of file diff --git a/hnn_core/gui/gui.py b/hnn_core/gui/gui.py index e0698b4ff7..55d18a5825 100644 --- a/hnn_core/gui/gui.py +++ b/hnn_core/gui/gui.py @@ -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 @@ -1227,7 +1226,9 @@ def add_connectivity_tab(params, connectivity_out, return net -def add_drive_tab(params, drives_out, drive_widgets, drive_boxes, tstop, +def add_drive_tab(params, drives_out, drive_widgets, + drive_boxes, + tstop, layout): net = jones_2009_model(params) drive_specs = _extract_drive_specs_from_hnn_params( @@ -1274,7 +1275,8 @@ def load_drive_and_connectivity(params, log_out, drives_out, log_out.clear_output() 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, drives_out, drive_widgets, drive_boxes, tstop, layout)