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

Notebook tests and Cache FITS #193

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 12 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,18 @@ jobs:
- run: pip install -c .github/test-constraints.txt '.[test]'
- run: pytest --cov=heracles --cov-report=lcov
- uses: coverallsapp/github-action@v2

- name: Cache data for Notebook tests
id: cache-data
uses: actions/cache@v4
with:
path: ./examples
key: ${{ runner.os }}-data-${{ github.run_number }}-${{ hashFiles('catalog.fits') }}
restore-keys: |
${{ runner.os }}-data
- run: pip install jupyter pipx
- run: pipx runpip install numpy matplotlib ducc0 healpy
- run: pipx run jupyter execute examples/example.ipynb

build:
name: Build
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion heracles/healpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def wrapper(*args):
newargs = []
for arr in args:
if arr.dtype.byteorder != "=":
arr = arr.newbyteorder("=").byteswap()
arr = arr.view(arr.dtype.newbyteorder('=')).byteswap()
newargs.append(arr)
return fn(*newargs)

Expand Down
Loading