Skip to content

Commit d26c6bb

Browse files
authored
Merge pull request #616 from geodynamics/burnman-2.1
BurnMan 2.1
2 parents 87753d1 + c55b5b3 commit d26c6bb

File tree

7 files changed

+38
-13
lines changed

7 files changed

+38
-13
lines changed

Readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14165625.svg)](https://doi.org/10.5281/zenodo.14165625)
1+
[![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)
33

44
# BurnMan - a Python toolkit for planetary geophysics, geochemistry and thermodynamics
@@ -42,8 +42,8 @@ If you use BurnMan in your work, we ask that you cite the following publications
4242

4343
- Myhill, R., Cottaar, S., Heister, T., Rose, I., Unterborn, C.,
4444
Dannberg, J., Gassmoeller, R. and Farla, R. (2024):
45-
BurnMan v2.0.0 [Software]. Computational Infrastructure for Geodynamics. Zenodo.
46-
https://doi.org/10.5281/zenodo.14165625
45+
BurnMan v2.1.0 [Software]. Computational Infrastructure for Geodynamics. Zenodo.
46+
https://doi.org/10.5281/zenodo.14238360
4747

4848
- Cottaar S., Heister, T., Rose, I., and Unterborn, C., (2014). BurnMan: A
4949
lower mantle mineral physics toolkit, Geochemistry, Geophysics, and

burnman/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@
179179
180180
- Myhill, R., Cottaar, S., Heister, T., Rose, I., Unterborn, C.,
181181
Dannberg, J., Gassmoeller, R. and Farla, R. (2024):
182-
BurnMan v2.0.0 [Software]. Computational Infrastructure for Geodynamics. Zenodo.
183-
`(https://doi.org/10.5281/zenodo.14165625) <https://doi.org/10.5281/zenodo.14165625>`_
182+
BurnMan v2.1.0 [Software]. Computational Infrastructure for Geodynamics. Zenodo.
183+
`(https://doi.org/10.5281/zenodo.14238360) <https://doi.org/10.5281/zenodo.14238360>`_
184184
185185
- Cottaar S., Heister, T., Rose, I., and Unterborn, C., (2014). BurnMan: A
186186
lower mantle mineral physics toolkit, Geochemistry, Geophysics, and

burnman/classes/polytope.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,28 @@
1111
from scipy.spatial import Delaunay
1212
from scipy.special import comb
1313
from copy import copy
14-
import cdd as cdd_float
1514

1615
from .material import cached_property
1716

1817
from ..utils.math import independent_row_indices
1918

2019

20+
# Try to import pycddlib.
21+
# First, try separating the imports into float and
22+
# fractional, then fall back to only using the float
23+
# representation, and finally don't import anything
24+
# (limiting functionality)
2125
try:
26+
cdd_float = importlib.import_module("cdd")
2227
cdd_fraction = importlib.import_module("cdd.gmp")
2328
cdd_gmp_loaded = True
2429
except ImportError:
25-
cdd_fraction = importlib.import_module("cdd")
26-
cdd_gmp_loaded = False
30+
try:
31+
cdd_float = importlib.import_module("cdd")
32+
cdd_fraction = importlib.import_module("cdd")
33+
cdd_gmp_loaded = False
34+
except ImportError:
35+
cdd_float = None
2736

2837

2938
class SimplexGrid(object):
@@ -140,6 +149,11 @@ def __init__(
140149
dependent endmembers are defined.
141150
:type independent_endmember_occupancies: numpy.array (2D) or None
142151
"""
152+
if cdd_float is None:
153+
raise ImportError(
154+
"You need to install pycddlib to create a MaterialPolytope object."
155+
)
156+
143157
if equalities.dtype != inequalities.dtype:
144158
raise Exception(
145159
f"The equalities and inequalities arrays should have the same type ({equalities.dtype} != {inequalities.dtype})."

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Changelog
22
---------
3+
Release v2.1.0 (November 28, 2024) includes
4+
- New: Added MACAW and SPOCK Equations of State
5+
- Changed: pycddlib returned to optional dependency as hard to install on Windows.
6+
37
Release v2.0.0 (November 14, 2024) includes
48
- Compatibility with Python 3.12.
59
- Compatibility with new versions of numpy (1.26.0), scipy (1.14.0),

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ If you use BurnMan in your work, we ask that you cite the following publications
3535

3636
- Myhill, R., Cottaar, S., Heister, T., Rose, I., Unterborn, C.,
3737
Dannberg, J., Gassmoeller, R. and Farla, R. (2024):
38-
BurnMan v2.0.0 [Software]. Computational Infrastructure for Geodynamics. Zenodo.
39-
`(https://doi.org/10.5281/zenodo.14165625) <https://doi.org/10.5281/zenodo.14165625>`_
38+
BurnMan v2.1.0 [Software]. Computational Infrastructure for Geodynamics. Zenodo.
39+
`(https://doi.org/10.5281/zenodo.14238360) <https://doi.org/10.5281/zenodo.14238360>`_
4040

4141
- Cottaar S., Heister, T., Rose, I., and Unterborn, C. (2014). BurnMan: A
4242
lower mantle mineral physics toolkit, Geochemistry, Geophysics, and

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "burnman"
3-
version = "2.0.1a0"
3+
version = "2.1.1a"
44
description = "A thermoelastic and thermodynamic toolkit for the Earth and planetary sciences"
55
license = "GPL"
66
authors = ["The BurnMan Team <[email protected]>",]
@@ -25,12 +25,15 @@ sympy = "^1.12"
2525
cvxpy = "^1.3"
2626
matplotlib = "^3.7"
2727
numba = "^0.59"
28-
pycddlib-standalone = "^3.0"
28+
pycddlib-standalone = {version = "^3.0", optional = true}
2929

3030
[tool.poetry.dev-dependencies]
3131
ipython = "^8.5"
3232
numba = "^0.59"
3333

34+
[tool.poetry.extras]
35+
dev = ["pycddlib-standalone"]
36+
3437
[tool.poetry.group.dev.dependencies]
3538
black = "24.1.1"
3639

test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fi
2020
$PYTHON --version
2121
# Quietly install burnman in development mode
2222
echo "Installing BurnMan in development mode ..."
23-
$PYTHON -m pip install -q -e .
23+
$PYTHON -m pip install -q -e .[dev]
2424
echo ""
2525

2626
echo "Dependency tree:"
@@ -30,6 +30,10 @@ pycddlib_version=`pip freeze | grep "pycddlib=" | awk -F"==" '{print $2}'`
3030
if [ ! -z "${pycddlib_version}" ]
3131
then echo "└── pycddlib [optional, installed: ${pycddlib_version}]"
3232
fi
33+
pycddlib_version=`pip freeze | grep "pycddlib-standalone=" | awk -F"==" '{print $2}'`
34+
if [ ! -z "${pycddlib_version}" ]
35+
then echo "└── pycddlib-standalone [optional, installed: ${pycddlib_version}]"
36+
fi
3337
echo ""
3438

3539
# Quietly install optional modules after burnman

0 commit comments

Comments
 (0)