Skip to content

Commit 9807fa8

Browse files
committed
allow numba to be not installed
1 parent 5cb8686 commit 9807fa8

File tree

9 files changed

+38
-15
lines changed

9 files changed

+38
-15
lines changed

.github/workflows/coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ jobs:
3838
cd burnman
3939
git status
4040
python -m pip install -e .[dev]
41+
python -m pip uninstall -y numba
4142
coverage run -m unittest discover ./tests
4243
coverage report > main_coverage.tmp
4344
main_coverage=$(coverage report --precision=7 --format=total)
4445
cd ../..
4546
rm -fr main
4647
python -m pip install -q -e .[dev]
48+
python -m pip uninstall -y numba
4749
coverage run -m unittest discover ./tests
4850
coverage report > new_coverage.tmp
4951
new_coverage=$(coverage report --precision=7 --format=total)

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14238360.svg)](https://doi.org/10.5281/zenodo.14238360)
22
[![DOI](https://joss.theoj.org/papers/10.21105/joss.05389/status.svg)](https://doi.org/10.21105/joss.05389)
3-
[![coverage](https://img.shields.io/badge/coverage-%3E90%25-green")](https://github.com/geodynamics/burnman/actions/workflows/coverage.yml)
3+
[![coverage](https://img.shields.io/badge/coverage-%3E91%25-green")](https://github.com/geodynamics/burnman/actions/workflows/coverage.yml)
44

55
# BurnMan - a Python toolkit for planetary geophysics, geochemistry and thermodynamics
66

burnman/eos/debye.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
from numba import jit
1717
except ImportError:
1818

19-
def jit(fn):
20-
return fn
19+
def jit(nopython=True):
20+
def decorator(fn):
21+
return fn
22+
23+
return decorator
2124

2225

2326
import scipy.integrate as integrate

burnman/eos/dks_solid.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
from numba import jit
1717
except ImportError:
1818

19-
def jit(fn):
20-
return fn
19+
def jit(nopython=True):
20+
def decorator(fn):
21+
return fn
22+
23+
return decorator
2124

2225

2326
from . import birch_murnaghan as bm

burnman/eos/einstein.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
from numba import jit
1919
except ImportError:
2020

21-
def jit(fn):
22-
return fn
21+
def jit(nopython=True):
22+
def decorator(fn):
23+
return fn
24+
25+
return decorator
2326

2427

2528
"""

burnman/eos/macaw.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
from numba import jit
2020
except ImportError:
2121

22-
def jit(fn):
23-
return fn
22+
def jit(nopython=True):
23+
def decorator(fn):
24+
return fn
25+
26+
return decorator
2427

2528

2629
@jit(nopython=True)

burnman/eos/reciprocal_kprime.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
from numba import jit
1919
except ImportError:
2020

21-
def jit(fn):
22-
return fn
21+
def jit(nopython=True):
22+
def decorator(fn):
23+
return fn
24+
25+
return decorator
2326

2427

2528
@jit(nopython=True)

burnman/eos/slb.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
from numba import jit
1717
except ImportError:
1818

19-
def jit(fn):
20-
return fn
19+
def jit(nopython=True):
20+
def decorator(fn):
21+
return fn
22+
23+
return decorator
2124

2225

2326
from . import birch_murnaghan as bm

burnman/eos/spock.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
from numba import jit
2121
except ImportError:
2222

23-
def jit(fn):
24-
return fn
23+
def jit(nopython=True):
24+
def decorator(fn):
25+
return fn
26+
27+
return decorator
2528

2629

2730
def generalised_gammainc(a, x1, x2):

0 commit comments

Comments
 (0)