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

run CI on both types of Mac #174

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
10 changes: 8 additions & 2 deletions tests/tests/test_unit/test_regions/test_region_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
Loading