From b8fc7adf1680460d104d3dbc3f3b04cb8eb8e3d9 Mon Sep 17 00:00:00 2001 From: xywei Date: Mon, 13 Jul 2020 12:32:43 -0500 Subject: [PATCH 1/6] Run pytest-cov with one CI Job --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a77b24a..32eceb6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,10 +28,11 @@ Python 3 POCL: - export PY_EXE=python3 - export PYOPENCL_TEST=portable - export HDF5_USE_FILE_LOCKING=FALSE - - export EXTRA_INSTALL="pybind11 cython numpy pytest scipy mako wheel" + - export EXTRA_INSTALL="pybind11 cython numpy pytest pytest-cov scipy mako wheel" - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh + - sed -i -e 's/${PY_EXE} -m pytest/${PY_EXE} -m pytest --cov=volumential/g' build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - python3 -- GitLab From 412dbd3da1cc05a7925ebcfe85ab00af9f54ac3f Mon Sep 17 00:00:00 2001 From: xywei Date: Mon, 13 Jul 2020 13:09:36 -0500 Subject: [PATCH 2/6] Use PYTEST_FLAGS instead --- .gitignore | 3 +++ .gitlab-ci.yml | 7 +++++-- test/conftest.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d5aeca0..723a23a 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ builds/ gmsh_tmp/ *.meshmode + +.coverage +pytest.xml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32eceb6..6541dd9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,10 +29,10 @@ Python 3 POCL: - export PYOPENCL_TEST=portable - export HDF5_USE_FILE_LOCKING=FALSE - export EXTRA_INSTALL="pybind11 cython numpy pytest pytest-cov scipy mako wheel" + - export PYTEST_FLAGS="--cov=volumential" - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - - sed -i -e 's/${PY_EXE} -m pytest/${PY_EXE} -m pytest --cov=volumential/g' build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - python3 @@ -51,7 +51,8 @@ Python 3 Intel: - source /opt/enable-intel-cl.sh - export PYOPENCL_TEST="intel(r):pu" - export HDF5_USE_FILE_LOCKING=FALSE - - export EXTRA_INSTALL="pybind11 cython numpy pytest scipy mako wheel" + - export PYTEST_FLAGS="--cov=volumential" + - export EXTRA_INSTALL="pybind11 cython numpy pytest pytest-cov scipy mako wheel" - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh @@ -72,6 +73,7 @@ Python 3 Conda: - export SUMPY_FORCE_SYMBOLIC_BACKEND=symengine - export CONDA_ENVIRONMENT=.test-conda-env-py3.yml - export HDF5_USE_FILE_LOCKING=FALSE + - export PYTEST_FLAGS="--cov=volumential" - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh - ". ./build-and-test-py-project-within-miniconda.sh" tags: @@ -92,6 +94,7 @@ Python 3 Conda Apple: - export CONDA_ENVIRONMENT=.test-conda-env-py3-macos.yml - export HDF5_USE_FILE_LOCKING=FALSE - export CC=clang + - export PYTEST_FLAGS="--cov=volumential" - set -o xtrace - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh - ". ./build-and-test-py-project-within-miniconda.sh" diff --git a/test/conftest.py b/test/conftest.py index b6e6b9b..dcd9a6a 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -64,7 +64,7 @@ def pytest_sessionstart(session): # pre-compute a basic table that is re-used in many tests. # can be easily turned off to run individual tests that do not require # the table cache. - if 0: + if 1: with NearFieldInteractionTableManager( "/tmp/volumential-tests.hdf5") as tm: table, _ = tm.get_table( -- GitLab From b7810f1db027a8e4854e61fbc5ed2d4b3e9833b5 Mon Sep 17 00:00:00 2001 From: xywei Date: Mon, 13 Jul 2020 13:34:53 -0500 Subject: [PATCH 3/6] Try to uninstall pytest-warnings before testing --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6541dd9..5e1d7c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,7 @@ Python 3 POCL: - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh + - sed -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall pytest-warnings' build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - python3 -- GitLab From 9c500478c0694ac274408d2387160aa694860757 Mon Sep 17 00:00:00 2001 From: xywei Date: Mon, 13 Jul 2020 13:44:46 -0500 Subject: [PATCH 4/6] Proper sed syntax --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e1d7c3..cbe1f10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ Python 3 POCL: - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - - sed -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall pytest-warnings' build-and-test-py-project.sh + - sed -i -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall pytest-warnings' build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - python3 @@ -57,6 +57,7 @@ Python 3 Intel: - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh + - sed -i -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall pytest-warnings' build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - python3 -- GitLab From ab2b5b31cd0d8ecb795571def40870f31fa85993 Mon Sep 17 00:00:00 2001 From: xywei Date: Mon, 13 Jul 2020 13:59:59 -0500 Subject: [PATCH 5/6] Use pip uninstall -y --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cbe1f10..50b070b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ Python 3 POCL: - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - - sed -i -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall pytest-warnings' build-and-test-py-project.sh + - sed -i -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall -y pytest-warnings' build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - python3 @@ -57,7 +57,7 @@ Python 3 Intel: - git submodule sync && git submodule update --init --recursive --remote - ((cd contrib/meshgen11_dealii/; ./build.sh) && echo "Using meshgen11_dealii.") || (echo "Using boxtree for meshgen.") - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - - sed -i -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall pytest-warnings' build-and-test-py-project.sh + - sed -i -e '/^TESTABLES=.*/i PIP="${PY_EXE} $(which pip)" \n$PIP uninstall -y pytest-warnings' build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - python3 -- GitLab From f0f355fc6d30439c1e18239131bf8e5c0d59eba4 Mon Sep 17 00:00:00 2001 From: xywei Date: Mon, 13 Jul 2020 14:29:31 -0500 Subject: [PATCH 6/6] Add badges to README --- .gitignore | 1 + README.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 723a23a..00ac750 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ gmsh_tmp/ .coverage pytest.xml +prof/ diff --git a/README.md b/README.md index fe3f38b..7f938c1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Volumential +![pipeline](https://gitlab.tiker.net/xywei/volumential/badges/master/pipeline.svg) +![coverage](https://gitlab.tiker.net/xywei/volumential/badges/master/coverage.svg) + Volumential (VOLUME poteNTIAL) provides toolset to solve volume potential integral equations efficiently via Fast Multipole Method. -- GitLab