From 28303fc5e1bb237318e79117dca6567c8c0106fe Mon Sep 17 00:00:00 2001 From: Bill Little Date: Thu, 1 Jul 2021 13:56:46 +0100 Subject: [PATCH 1/2] consolidate cirrus-ci documentation tasks --- .cirrus.yml | 28 ++++------------------------ noxfile.py | 19 ++----------------- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 162aeb9404..64ff77f017 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -19,7 +19,6 @@ env: # Skip specific tasks by name. Set to a non-empty string to skip. SKIP_LINT_TASK: "" SKIP_TEST_TASK: "" - SKIP_GALLERY_TASK: "" SKIP_DOCTEST_TASK: "" SKIP_LINKCHECK_TASK: "" # Skip task groups by type. Set to a non-empty string to skip. @@ -154,26 +153,7 @@ test_task: # -# Testing Documentation Gallery (Linux) -# -gallery_task: - only_if: ${SKIP_GALLERY_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == "" - << : *CREDITS_TEMPLATE - env: - PY_VER: 3.8 - name: "${CIRRUS_OS}: py${PY_VER} doc tests (gallery)" - << : *IRIS_TEST_DATA_TEMPLATE - << : *LINUX_TASK_TEMPLATE - tests_script: - - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - - echo "[Resources]" > ${SITE_CFG} - - echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG} - - echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG} - - nox --session gallery -- --verbose - - -# -# Testing Documentation (Linux) +# Documentation Gallery and Testing (Linux) # doctest_task: only_if: ${SKIP_DOCTEST_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == "" @@ -182,7 +162,7 @@ doctest_task: PY_VER: 3.8 MPL_RC_DIR: ${HOME}/.config/matplotlib MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc - name: "${CIRRUS_OS}: py${PY_VER} doc tests" + name: "${CIRRUS_OS}: py${PY_VER} gallery and doctests" << : *IRIS_TEST_DATA_TEMPLATE << : *LINUX_TASK_TEMPLATE tests_script: @@ -197,7 +177,7 @@ doctest_task: # -# Testing Documentation Link Check (Linux) +# Documentation Link Check (Linux) # linkcheck_task: only_if: ${SKIP_LINKCHECK_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == "" @@ -206,7 +186,7 @@ linkcheck_task: PY_VER: 3.8 MPL_RC_DIR: ${HOME}/.config/matplotlib MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc - name: "${CIRRUS_OS}: py${PY_VER} doc link check" + name: "${CIRRUS_OS}: py${PY_VER} link check" << : *LINUX_TASK_TEMPLATE tests_script: - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" diff --git a/noxfile.py b/noxfile.py index 878f37829c..e00896fbb9 100755 --- a/noxfile.py +++ b/noxfile.py @@ -198,9 +198,9 @@ def tests(session: nox.sessions.Session): @nox.session(python=PY_VER, venv_backend="conda") -def gallery(session: nox.sessions.Session): +def doctest(session: nox.sessions.Session): """ - Perform iris gallery doc-tests. + Perform iris gallery and doc-tests. Parameters ---------- @@ -216,21 +216,6 @@ def gallery(session: nox.sessions.Session): "iris.tests.runner", "--gallery-tests", ) - - -@nox.session(python=PY_VER, venv_backend="conda") -def doctest(session: nox.sessions.Session): - """ - Perform iris doc-tests. - - Parameters - ---------- - session: object - A `nox.sessions.Session` object. - - """ - prepare_venv(session) - session.install("--no-deps", "--editable", ".") session.cd("docs") session.run( "make", From c0780eff79c8138a5ba60992e7d2c9d327f0becf Mon Sep 17 00:00:00 2001 From: Bill Little Date: Thu, 1 Jul 2021 15:07:23 +0100 Subject: [PATCH 2/2] review actions --- .cirrus.yml | 4 ++-- docs/src/whatsnew/latest.rst | 7 +++++++ noxfile.py | 15 ++++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 64ff77f017..52abddcadd 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -153,7 +153,7 @@ test_task: # -# Documentation Gallery and Testing (Linux) +# Documentation Testing and Gallery (Linux) # doctest_task: only_if: ${SKIP_DOCTEST_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == "" @@ -162,7 +162,7 @@ doctest_task: PY_VER: 3.8 MPL_RC_DIR: ${HOME}/.config/matplotlib MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc - name: "${CIRRUS_OS}: py${PY_VER} gallery and doctests" + name: "${CIRRUS_OS}: py${PY_VER} doctests and gallery" << : *IRIS_TEST_DATA_TEMPLATE << : *LINUX_TASK_TEMPLATE tests_script: diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index 41e67ac081..8d227eae99 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -190,6 +190,13 @@ This document explains the changes made to Iris for this release #. `@bjlittle`_ consolidated `nox`_ ``black``, ``flake8`` and ``isort`` sessions into one ``lint`` session using ``pre-commit``. (:pull:`4181`) +#. `@bjlittle`_ streamlined the `cirrus-ci`_ testing by removing the ``minimal`` + tests, which are a subset of the ``full`` tests. (:pull:`4218`) + +#. `@bjlittle`_ consolidated the `cirrus-ci`_ documentation ``doctest`` and + ``gallery`` tasks into a single task and associated `nox`_ session. + (:pull:`4219`) + .. comment Whatsnew author names (@github name) in alphabetical order. Note that, core dev names are automatically included by the common_links.inc: diff --git a/noxfile.py b/noxfile.py index e00896fbb9..c27103970d 100755 --- a/noxfile.py +++ b/noxfile.py @@ -200,7 +200,7 @@ def tests(session: nox.sessions.Session): @nox.session(python=PY_VER, venv_backend="conda") def doctest(session: nox.sessions.Session): """ - Perform iris gallery and doc-tests. + Perform iris doctests and gallery. Parameters ---------- @@ -210,12 +210,6 @@ def doctest(session: nox.sessions.Session): """ prepare_venv(session) session.install("--no-deps", "--editable", ".") - session.run( - "python", - "-m", - "iris.tests.runner", - "--gallery-tests", - ) session.cd("docs") session.run( "make", @@ -228,6 +222,13 @@ def doctest(session: nox.sessions.Session): "doctest", external=True, ) + session.cd("..") + session.run( + "python", + "-m", + "iris.tests.runner", + "--gallery-tests", + ) @nox.session(python=PY_VER, venv_backend="conda")