Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
python-versions: ['3.12']
python-versions: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
python-versions: ['3.12']
python-versions: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:

strategy:
matrix:
python-versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-versions: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v4
Expand All @@ -65,7 +65,7 @@ jobs:

strategy:
matrix:
python-versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-versions: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ If you use BurnMan in your work, we ask that you cite the following publications

## Installation requirements

* Python 3.8+
* Python 3.10+
* Python modules:
NumPy, SciPy, SymPy, Matplotlib

Expand Down
2 changes: 1 addition & 1 deletion burnman/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
Requirements
------------

- Python 3.8+
- Python 3.10+
- Python modules: NumPy, SciPy, SymPy, Sparse, Matplotlib

Optional modules
Expand Down
43 changes: 2 additions & 41 deletions burnman/classes/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,9 @@
from copy import deepcopy
from ..utils.math import bracket
from scipy.optimize import brentq
from functools import cached_property


# TODO: When we require Python 3.8+, replace with
# functools.cached_property decorator
class cached_property(property):
"""A decorator that converts a function into a lazy property. The
function wrapped is called the first time to retrieve the result
and then that calculated result is used the next time you access
the value::

class Foo(object):

@cached_property
def foo(self):
# calculate something important here
return 42

The class has to have a `__dict__` in order for this property to
work.

This decorator is adapted slightly from the one in the werkzeug module:
https://tedboy.github.io/flask/_modules/werkzeug/utils.html#cached_property
"""

def __init__(self, func, name=None, doc=None):
self.__name__ = name or func.__name__
self.__module__ = func.__module__
self.__doc__ = doc or func.__doc__
self.func = func

def __set__(self, obj, value):
obj.__dict__[self.__name__] = value

def __get__(self, obj, type=None):
if obj is None:
return self
try:
value = obj.__dict__[self.__name__]
except KeyError:
value = self.func(obj)
obj.__dict__[self.__name__] = value
return value
cached_property = cached_property # for easier access


def material_property(func):
Expand Down
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ documentation = "https://burnman.readthedocs.io/"
classifiers = [
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.10"
numpy = "^2"
scipy = "^1.10"
sympy = "^1.12"
cvxpy = "^1.3"
matplotlib = "^3.7"
numba = ">=0.59,^0"
numba = [
{ version = ">=0.59,^0", python = "<3.14" },
{ version = ">=0.63.0b1", python = ">=3.14" }
]
pycddlib-standalone = {version = "^3.0", optional = true}


[tool.poetry.dev-dependencies]
ipython = "^8.5"
numba = ">=0.59,^0"
Expand Down