Skip to content

Commit

Permalink
cmake updates and unit test fixes - 2.13.1
Browse files Browse the repository at this point in the history
* Updating development version to 2.13-dev

* Release guidelines update

* Add Changes to Changelog (#604)

* Remoev UWGeodynamics installation from dockerfiles

* Petsc 3.17 compatibility and removing duplicate examples python scripts

* Add petsc variants to conda recipe

* Add python 3.10 conda builds to actions.

* Change PETSC and MPICH versions

* Fix MPICH complaining...

* Getting Dockerfiles ready: Ubuntu 22.04LTS and python 3.10.
Note that this will fail for now because of h5py not being
compatible. PR is on its way.

* Update README

* Update README

* Transfer UWGeo documentation to Underworld

* Remove python3-numpy-dbg for now

* Fix Documentation Links (UWGeodynamics)
Fix visualisation imports

* Fix imports (UWGeodynamics)

* Change Depth documentation toctree

* UWGeodynamics Merging

* Run tests

* Move tests

* H5py 3.7 is released, Use it in docker.

* Typo in Petsc Dockerfile

* Getting UWGeo internals to use uw2 mpi4py interface (#612)

* Getting UWGeo internals to use uw2 mpi4py interface
* Update CHANGES.md

* ask per 2.13 release (#615)

2.13 release
Co-authored-by: Romain Beucher <romain.beucher@anu.edu.au>

* Update _version.py

* Fix for analytic ID, which changed during cmake update. Ganalytics should now be right

* Typo fix for 3.10

* Dockerfile improvement - should be a single layer command

* safer #define when not using an official release of petsc

* Update PetscOptionsBegin() to be dev compatible.

see https://gitlab.com/petsc/petsc/-/blob/f3ed01cd9ab452072c1a44e935347389f67d72c6/doc/docs/changes/dev.rst

* cmake updates for $PETSC_DIR and $PETSC_ARCH.

Now it displays $PKG_CONFIG_PATH

* Remove some output files that shouldn't be stored.

* Fixing the pytest interfaces to pick up ipynb

Cleaning the test dir also

* Add a RuntimeError exception for fields without units

* Update tests - they weren't RUNNING!

Need to workout how to run collective_fail.py under pytest. Think it's
hard because the returncodes are non 0 by choice... but pytest picks up
on it.

* Only check rank==1 for collective test

* Update CI.yml

* Update CI.yml

add nbmake for testing ipynb

* Update _version.py

* Update CHANGES.md

Co-authored-by: Romain Beucher <romain.beucher@anu.edu.au>
  • Loading branch information
julesghub and rbeucher committed Aug 15, 2022
1 parent 6e428f9 commit 2941f8e
Show file tree
Hide file tree
Showing 47 changed files with 277 additions and 2,660 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ jobs:
- name: Run Tests
run: |
pip install pytest
pytest -vvv docs/pytests
cd docs/test
pip install pytest nbmake
cd docs
pytest -vvv pytests/*
cd test
cp -rf ../UWGeodynamics/examples UWGeodynamics/.
cp -rf ../UWGeodynamics/tutorials UWGeodynamics/.
cp -rf ../UWGeodynamics/benchmarks UWGeodynamics/.
Expand Down
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
CHANGES: Underworld2
=======================

Release 2.13-0 [2022-05-25]
Release 2.13.1 [2022-08-15]
---------------------------
Fixes:
* Improved CMAKE workflow.
* Fixes to failing unit tests.

Release 2.13.0 [2022-05-25]
-----------------------------

New:
Expand Down
181 changes: 122 additions & 59 deletions docs/examples/03_BlankenbachBenchmark.ipynb

Large diffs are not rendered by default.

Binary file removed docs/examples/PressureSolution.png
Binary file not shown.
Binary file removed docs/examples/output/Mesh.h5
Binary file not shown.
Binary file removed docs/examples/output/pressureField.0.h5
Binary file not shown.
45 changes: 0 additions & 45 deletions docs/examples/output/pressureField.0.xdmf

This file was deleted.

Binary file removed docs/examples/output/pressureField.20.h5
Binary file not shown.
45 changes: 0 additions & 45 deletions docs/examples/output/pressureField.20.xdmf

This file was deleted.

Binary file removed docs/examples/output/pressureField.40.h5
Binary file not shown.
45 changes: 0 additions & 45 deletions docs/examples/output/pressureField.40.xdmf

This file was deleted.

Binary file removed docs/examples/output/subduction.gldb
Binary file not shown.
3 changes: 0 additions & 3 deletions docs/examples/output/summary.txt

This file was deleted.

Binary file removed docs/examples/output/velocityField.0.h5
Binary file not shown.
54 changes: 0 additions & 54 deletions docs/examples/output/velocityField.0.xdmf

This file was deleted.

Binary file removed docs/examples/output/velocityField.20.h5
Binary file not shown.
54 changes: 0 additions & 54 deletions docs/examples/output/velocityField.20.xdmf

This file was deleted.

Binary file removed docs/examples/output/velocityField.40.h5
Binary file not shown.
54 changes: 0 additions & 54 deletions docs/examples/output/velocityField.40.xdmf

This file was deleted.

3 changes: 0 additions & 3 deletions docs/examples/output/vrms.txt

This file was deleted.

24 changes: 17 additions & 7 deletions docs/pytests/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# test_user_guide.py

import pathlib
import subprocess
import pytest
import glob
import ntpath
import sys
import underworld as uw
from inspect import getsourcefile

wdir = ntpath.dirname(getsourcefile(lambda:0))+"/../test/"

pyscripts = [pytest.param(path, id=ntpath.basename(path)) for path in sorted(glob.glob(wdir+"/*.py"))]

@pytest.mark.parametrize('pyscript', pyscripts)
def test_python_execution(pyscript):
cp = subprocess.run([sys.executable, pyscript])
assert cp.returncode == 0

ipynbscripts = [pytest.param(path, id=ntpath.basename(path)) for path in sorted(glob.glob(wdir+"/*.ipynb"))]

scripts = [pytest.param(path, id=ntpath.basename(path)) for path in sorted(glob.glob("docs/test/*.py"))]

@pytest.mark.parametrize('script', scripts)
def test_script_execution(script):
subprocess.run([sys.executable, script])
@pytest.mark.parametrize('ipynbscript', ipynbscripts)
def test_ipynb_execution(ipynbscript):
cp = subprocess.run(["pytest", "--nbmake", ipynbscript])
assert cp.returncode == 0
13 changes: 8 additions & 5 deletions docs/pytests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# test_examples.py

import pathlib
import subprocess
import pytest
import glob
import ntpath
import sys
import underworld as uw
from inspect import getsourcefile

wdir = ntpath.dirname(getsourcefile(lambda:0))+"/../examples/"

scripts = [pytest.param(path, id=ntpath.basename(path)) for path in sorted(glob.glob("docs/examples/*.py"))]
scripts = [pytest.param(path, id=ntpath.basename(path)) for path in sorted(glob.glob(wdir+"/*.ipynb"))]

@pytest.mark.parametrize('script', scripts)
def test_script_execution(script):
subprocess.run([sys.executable, script])
subprocess.run(["pytest", "--nbmake", script])
#subprocess.run([sys.executable, "-m", "pytest", "--nbmake", script])
#subprocess.run([sys.executable, script])

0 comments on commit 2941f8e

Please sign in to comment.