Skip to content

Commit

Permalink
Merge pull request #1077 from UXARRAY/philipc2/disable-numba-for-tests
Browse files Browse the repository at this point in the history
Disable `numba` for code coverage
  • Loading branch information
rajeeja authored Nov 18, 2024
2 parents 8fc8d52 + dfd9c76 commit 93309d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,16 @@ jobs:
run: |
conda list
- name: Run Namespace Tests
run: |
python -m pytest test
- name: Run Coverage Tests
run: |
python -m pytest test -v --cov=./uxarray --cov-report=xml
env:
NUMBA_DISABLE_JIT: 1

- name: Upload code coverage to Codecov
if: github.repository == 'UXARRAY/uxarray'
Expand Down
13 changes: 6 additions & 7 deletions uxarray/grid/coordinates.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import xarray as xr
import numpy as np
import math
import warnings

from uxarray.conventions import ugrid
Expand Down Expand Up @@ -53,8 +52,8 @@ def _xyz_to_lonlat_rad_no_norm(
Latitude in radians
"""

lon = math.atan2(y, x)
lat = math.asin(z)
lon = np.atan2(y, x)
lat = np.asin(z)

# set longitude range to [0, pi]
lon = np.mod(lon, 2 * np.pi)
Expand Down Expand Up @@ -102,8 +101,8 @@ def _xyz_to_lonlat_rad_scalar(
y /= denom
z /= denom

lon = math.atan2(y, x)
lat = math.asin(z)
lon = np.atan2(y, x)
lat = np.asin(z)

# set longitude range to [0, pi]
lon = np.mod(lon, 2 * np.pi)
Expand Down Expand Up @@ -790,8 +789,8 @@ def _xyz_to_lonlat_rad_no_norm(
Latitude in radians
"""

lon = math.atan2(y, x)
lat = math.asin(z)
lon = np.atan2(y, x)
lat = np.asin(z)

# set longitude range to [0, pi]
lon = np.mod(lon, 2 * np.pi)
Expand Down

0 comments on commit 93309d2

Please sign in to comment.