From a2069cdae12c9f84c3ff8c4f6d12058a32902513 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 10 Mar 2022 15:31:29 -0600 Subject: [PATCH] Refactor example runner CI scripts, including nbconvert installation --- .../examples-funcs.sh | 0 .github/workflows/ci.yml | 4 ++-- .gitlab-ci.yml | 6 +++--- .pylintrc-local.yml | 12 +++++++++++- .test-conda-env-py3.yml | 5 ----- test/test_transform.py | 2 +- 6 files changed, 17 insertions(+), 12 deletions(-) rename build-py-project-and-run-examples.sh => .ci/examples-funcs.sh (100%) diff --git a/build-py-project-and-run-examples.sh b/.ci/examples-funcs.sh similarity index 100% rename from build-py-project-and-run-examples.sh rename to .ci/examples-funcs.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2b69d81e..5a9175dcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,16 +95,16 @@ jobs: - uses: actions/checkout@v2 - name: "Main Script" run: | - EXTRA_INSTALL="matplotlib ipykernel nbconvert" curl -L -O https://tiker.net/ci-support-v0 . ./ci-support-v0 build_py_project_in_conda_env + conda install matplotlib ipykernel nbconvert install_ispc export PYOPENCL_TEST=portable:pthread - . ./build-py-project-and-run-examples.sh + . ./.ci/examples-funcs.sh run_py_examples run_ipynb_examples run_floopy_examples diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 721f90b58..71a1468ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,16 +112,16 @@ Pytest POCL Examples: stage: test script: | export PYOPENCL_TEST=portable:pthread - export EXTRA_INSTALL="pybind11 numpy mako pyvisfile matplotlib ipykernel nbconvert" + export EXTRA_INSTALL="pybind11 numpy mako" curl -L -O https://tiker.net/ci-support-v0 . ./ci-support-v0 build_py_project_in_venv - + pip install matplotlib ipykernel nbconvert install_ispc - . ./build-py-project-and-run-examples.sh + . ./.ci/examples-funcs.sh run_py_examples run_ipynb_examples run_floopy_examples diff --git a/.pylintrc-local.yml b/.pylintrc-local.yml index 32f9604dc..e9aeb6d44 100644 --- a/.pylintrc-local.yml +++ b/.pylintrc-local.yml @@ -1,6 +1,16 @@ - arg: extension-pkg-whitelist val: islpy + - arg: ignore - val: compyte + val: + - compyte + +- arg: ignored-modules + val: + - IPython + - pycuda + - maptlotlib + - maptlotlib.pyplot + - arg: init-hook val: sys.setrecursionlimit(5000) diff --git a/.test-conda-env-py3.yml b/.test-conda-env-py3.yml index 2570718a6..580e5baac 100644 --- a/.test-conda-env-py3.yml +++ b/.test-conda-env-py3.yml @@ -11,8 +11,3 @@ dependencies: - mako - pyopencl - islpy - -# Only needed to make pylint succeed -- matplotlib-base -- ipykernel -- ply diff --git a/test/test_transform.py b/test/test_transform.py index be0d7eb3e..b30c0eaf5 100644 --- a/test/test_transform.py +++ b/test/test_transform.py @@ -973,7 +973,7 @@ def test_diamond_tiling(ctx_factory, interactive=False): knl(queue, u=u_dev, dx=dx, dt=dx) u = u_dev.get() - import matplotlib.pyplot as plt + import matplotlib.pyplot as plt # pylint: disable=import-error plt.imshow(u.T) plt.show() else: -- GitLab