Skip to content

Commit

Permalink
Merge pull request #593 from bobmyhill/pipdeptree_tester
Browse files Browse the repository at this point in the history
change order of installation for tester
  • Loading branch information
bobmyhill authored May 25, 2024
2 parents 8901296 + ea3881b commit a0e8dc2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

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

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 0 additions & 3 deletions burnman/classes/solutionmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
from ..utils.chemistry import process_solution_chemistry
from .. import constants
import warnings
import sparse
import string
from copy import deepcopy
from .material import material_property, cached_property
from dataclasses import make_dataclass

Expand Down
1 change: 0 additions & 1 deletion docs/pip_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ nbsphinx
cvxpy
jupyter
autograd
sparse

# ReadTheDocs cannot build pycddlib successfully
# because it requires gmp.h, installable only via sudo apt-get install.
Expand Down
5 changes: 4 additions & 1 deletion examples/example_compare_all_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from __future__ import absolute_import
from __future__ import print_function

import warnings
import numpy as np
import matplotlib.pyplot as plt

Expand Down Expand Up @@ -76,7 +77,9 @@
ax = [fig.add_subplot(2, 2, i) for i in range(1, 5)]

for m in range(len(methods)):
rock.set_method(methods[m])
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
rock.set_method(methods[m])
temperature = burnman.geotherm.adiabatic(seis_p, T0, rock)

print("Calculations are done for:")
Expand Down
10 changes: 0 additions & 10 deletions misc/ref/example_compare_all_methods.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,3 @@ Composite: Unnamed composite
'burnman.minerals.Murakami_etal_2012.fe_perovskite'
0.05 of
'burnman.minerals.Murakami_etal_2012.fe_periclase_LS'
BURNMAN/burnman/classes/composite.py: UserWarning: Warning, you are changing the method to BM3 even though the material is designed to be used with the method SLB2. This does not overwrite any mineral attributes
phase.set_method(method)
BURNMAN/burnman/classes/composite.py: UserWarning: Warning, you are changing the method to BM2 even though the material is designed to be used with the method SLB2. This does not overwrite any mineral attributes
phase.set_method(method)
BURNMAN/burnman/classes/composite.py: UserWarning: Warning, you are changing the method to MGD3 even though the material is designed to be used with the method SLB2. This does not overwrite any mineral attributes
phase.set_method(method)
BURNMAN/burnman/classes/composite.py: UserWarning: Warning, you are changing the method to MGD2 even though the material is designed to be used with the method SLB2. This does not overwrite any mineral attributes
phase.set_method(method)
BURNMAN/burnman/classes/composite.py: UserWarning: Warning, you are changing the method to SLB3 even though the material is designed to be used with the method SLB2. This does not overwrite any mineral attributes
phase.set_method(method)
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -23,13 +22,13 @@ python = "^3.8"
numpy = "^1.24"
scipy = "^1.10"
sympy = "^1.12"
sparse = "^0.14"
cvxpy = "^1.3"
matplotlib = "^3.7"
numba = "^0.59"

[tool.poetry.dev-dependencies]
ipython = "^8.5"
numba = "^0.57"
numba = "^0.59"

[tool.poetry.group.dev.dependencies]
black = "24.1.1"
Expand Down
11 changes: 5 additions & 6 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ then
fi

$PYTHON --version
echo ""
echo "Dependency tree:"
$PYTHON -m pip install -q pipdeptree
$PYTHON -m pipdeptree -p burnman -d 1 2> /dev/null
echo ""

# Quietly install burnman in development mode
echo "Installing BurnMan in development mode ..."
$PYTHON -m pip install -q -e .
echo ""

echo "Dependency tree:"
$PYTHON -m pip install -q pipdeptree .
$PYTHON -m pipdeptree -p burnman -d 1 2> /dev/null
echo ""

# Quietly install optional modules after burnman
echo "Installing optional cvxpy, pycddlib, autograd and jupyter modules ..."
$PYTHON -m pip install -q cvxpy pycddlib autograd jupyter
Expand Down

0 comments on commit a0e8dc2

Please sign in to comment.