From 7c780aae359edcf3e3c45a999aea7263a097d2b2 Mon Sep 17 00:00:00 2001 From: Bob Myhill Date: Sun, 6 Oct 2024 17:38:04 +0100 Subject: [PATCH] update installation and test.sh --- .github/workflows/main.yml | 12 ++++++------ .github/workflows/python-publish.yml | 2 +- burnman/classes/seismic.py | 2 +- burnman/classes/solution.py | 4 ++-- test.sh | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6325917d..67cd544b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,9 +13,9 @@ jobs: python-versions: ['3.12'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-versions }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-versions }} - name: make indent @@ -24,7 +24,7 @@ jobs: ./contrib/utilities/indent git diff > changes-astyle.diff - name: archive indent results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: changes-astyle.diff path: changes-astyle.diff @@ -41,9 +41,9 @@ jobs: python-versions: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-versions }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-versions }} - name: setup @@ -55,7 +55,7 @@ jobs: texlive \ texlive-latex-extra python -m pip install --upgrade pip - pip install pycddlib # this is optional + pip install pycddlib==2.1.7 # this is optional pip install autograd # this is optional python --version - name: test diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b7a704be..f1ce1159 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies diff --git a/burnman/classes/seismic.py b/burnman/classes/seismic.py index 4fa833fc..08cc8704 100644 --- a/burnman/classes/seismic.py +++ b/burnman/classes/seismic.py @@ -333,7 +333,7 @@ def _compute_pressure(self): # convert radii to depths depth = self.earth_radius - radii pressure = scipy.integrate.cumulative_trapezoid( - gravity * density, x=depth, initial=0.0 + gravity * density, x=depth, initial=0 ) self.table_pressure = pressure diff --git a/burnman/classes/solution.py b/burnman/classes/solution.py index b96731a8..31cdcf9c 100644 --- a/burnman/classes/solution.py +++ b/burnman/classes/solution.py @@ -679,8 +679,8 @@ def compositional_null_basis(self): null_basis = np.array([v[:] for v in null]) M = null_basis[:, self.dependent_element_indices] - assert (M.shape[0] == M.shape[1]) - assert (np.abs(M - np.eye(M.shape[0])) < 1.e-20).all() + assert M.shape[0] == M.shape[1] + assert (np.abs(M - np.eye(M.shape[0])) < 1.0e-20).all() return null_basis diff --git a/test.sh b/test.sh index e2b93841..b2d06e34 100755 --- a/test.sh +++ b/test.sh @@ -30,7 +30,7 @@ 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 +$PYTHON -m pip install -q cvxpy pycddlib==2.1.7 autograd jupyter echo "" function testit {