Skip to content

Commit

Permalink
only run relevant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-p committed Aug 23, 2024
1 parent a7ee427 commit 9e7f1c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 41 deletions.
42 changes: 1 addition & 41 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,52 +28,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies in Linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt install -y python3-tk libboost-all-dev libopenblas-dev libfftw3-dev libsuitesparse-dev
# Do not need to do this if not installing S4
- name: Install system dependencies in MacOS
if: matrix.os == 'macos-latest'
run: |
brew install fftw suite-sparse openblas lapack boost
- name: Install python dependencies
run: |
python -m pip install uv
uv pip install --system .
uv pip install --system numpy wheel setuptools
- name: Install S4 in Linux
if: matrix.os == 'ubuntu-latest'
run: |
git clone https://github.com/phoebe-p/S4
cd S4
make S4_pyext
cd ..
rm -rf S4
# Not working as of March 2024. Cannot find cholmod.h header file. Reason unclear.
- name: Install S4 in MacOS
if: matrix.os == 'macos-latest'
run: |
git clone https://github.com/phoebe-p/S4
cd S4
make S4_pyext --file="Makefile.m1"
cd ..
rm -rf S4
# - name: Install on Linux and MacOS
# if: matrix.os != 'windows-latest'
# run: pip install .
# uv pip install --system numpy wheel setuptools

# - name: Install on Windows
# if: matrix.os == 'windows-latest'
# run: |
# pip install .
# shell: powershell

- name: Test with pytest
run: |
Expand Down
2 changes: 2 additions & 0 deletions rayflare/ray_tracing/rt_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ def RT_wl(
A_mat[np.isnan(A_mat)] = 0

if np.any(out_mat < 0):
print(out_mat)
print('min in outmat:', np.min(out_mat))
raise ValueError("Negative values in out_mat")

out_mat = COO.from_numpy(out_mat) # sparse matrix
Expand Down

0 comments on commit 9e7f1c9

Please sign in to comment.