diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 6a8a7c0..872fde1 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -32,7 +32,9 @@ jobs: include: - os: ubuntu-latest python-version: "3.11" - - os: macos-latest + - os: macos-13 # Intel Mac + python-version: "3.10" + - os: macos-latest # ARM Mac python-version: "3.10" - os: windows-latest python-version: "3.9" @@ -43,6 +45,9 @@ jobs: with: path: ~/.brainglobe key: bg-atlases + - name: install HDF5 libs on ARM Mac + if: matrix.os == 'macos-latest' + run: brew install hdf5 # Setup pyqt libraries - uses: tlambert03/setup-qt-libs@v1 # Helps set up VTK with a headless display diff --git a/tests/tests/test_unit/test_regions/test_region_analysis.py b/tests/tests/test_unit/test_regions/test_region_analysis.py index 93dd4b5..c9f31f8 100644 --- a/tests/tests/test_unit/test_regions/test_region_analysis.py +++ b/tests/tests/test_unit/test_regions/test_region_analysis.py @@ -99,7 +99,10 @@ def test_summarise_brain_regions_all_not_empty( df = pd.read_csv(filename) assert df.shape == (3, 11) for key, value in previous_world_space_values.items(): - assert df[key].iloc[0] == value + if isinstance(value, (int, float)): + assert np.isclose(df[key].iloc[0], value) + else: + assert df[key].iloc[0] == value def test_summarise_brain_regions_some_empty( @@ -124,7 +127,10 @@ def test_summarise_brain_regions_some_empty( df = pd.read_csv(filename) assert df.shape == (1, 11) for key, value in previous_world_space_values.items(): - assert df[key].iloc[0] == value + if isinstance(value, (int, float)): + assert np.isclose(df[key].iloc[0], value) + else: + assert df[key].iloc[0] == value def test_summarise_brain_regions_all_empty(