From bb651261b8212bd3084bfe8f93755c6e2566febf Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Fri, 25 Sep 2020 15:28:09 +0100 Subject: [PATCH 01/22] baseline --- .travis.yml | 22 ++++--------------- docs/iris/src/Makefile | 2 +- docs/iris/src/conf.py | 3 +-- .../contributing_documentation.rst | 18 +++++++-------- requirements/ci/py36.yml | 2 ++ requirements/ci/py37.yml | 2 ++ requirements/docs.txt | 1 + 7 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab1accab4a..5f32ad5cc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ env: - PYTHON_VERSION='37' TEST_TARGET='default' TEST_BLACK=true - PYTHON_VERSION='37' TEST_TARGET='gallery' - PYTHON_VERSION='37' TEST_TARGET='doctest' PUSH_BUILT_DOCS=true - - PYTHON_VERSION='37' TEST_TARGET='linkcheck' + - PYTHON_VERSION='37' TEST_TARGET='checkdocs' # TODO: Dependencies for sphinxcontrib-spelling to be in place before this # spelling code block is enabled #- PYTHON_VERSION='37' TEST_TARGET='spelling' @@ -121,31 +121,17 @@ script: make clean html && make doctest; fi - # check the links in the docs + # check the links and spelling in the docs - > - if [[ "${TEST_TARGET}" == 'linkcheck' ]]; then + if [[ "${TEST_TARGET}" == 'checkdocs' ]]; then MPL_RC_DIR="${HOME}/.config/matplotlib"; mkdir -p ${MPL_RC_DIR}; echo 'backend : agg' > ${MPL_RC_DIR}/matplotlibrc; echo 'image.cmap : viridis' >> ${MPL_RC_DIR}/matplotlibrc; cd ${INSTALL_DIR}/docs/iris; - make clean && make linkcheck; + make clean && make linkcheck spelling; fi - # TODO: Dependencies for sphinxcontrib-spelling to be in place before this - # spelling code block is enabled - - # check the spelling in the docs - # - > - # if [[ "${TEST_TARGET}" == 'spelling' ]]; then - # MPL_RC_DIR="${HOME}/.config/matplotlib"; - # mkdir -p ${MPL_RC_DIR}; - # echo 'backend : agg' > ${MPL_RC_DIR}/matplotlibrc; - # echo 'image.cmap : viridis' >> ${MPL_RC_DIR}/matplotlibrc; - # cd ${INSTALL_DIR}/docs/iris; - # make clean && make spelling; - # fi - # Split the organisation out of the slug. See https://stackoverflow.com/a/5257398/741316 for description. # NOTE: a *separate* "export" command appears to be necessary here : A command of the # form "export ORG=.." failed to define ORG for the following command (?!) diff --git a/docs/iris/src/Makefile b/docs/iris/src/Makefile index 2e47057a30..6cbb329e30 100644 --- a/docs/iris/src/Makefile +++ b/docs/iris/src/Makefile @@ -52,7 +52,7 @@ html-noplot: @echo "Build finished. The HTML (no gallery) pages are in $(BUILDDIR)/html" spelling: - $(SPHINXBUILD) -b spelling $(SRCDIR) $(BUILDDIR) + $(SPHINXBUILD) -b spelling $(WARNING_TO_ERROR) $(SRCDIR) $(BUILDDIR) @echo @echo "Build finished. The HTML (no gallery) pages are in $(BUILDDIR)/html" diff --git a/docs/iris/src/conf.py b/docs/iris/src/conf.py index 13b836b073..3c9f2ba070 100644 --- a/docs/iris/src/conf.py +++ b/docs/iris/src/conf.py @@ -115,8 +115,7 @@ def autolog(message): "sphinx.ext.intersphinx", "sphinx_copybutton", "sphinx.ext.napoleon", - # TODO: Spelling extension disabled until the dependencies can be included - # "sphinxcontrib.spelling", + "sphinxcontrib.spelling", "sphinx_gallery.gen_gallery", "matplotlib.sphinxext.mathmpl", "matplotlib.sphinxext.plot_directive", diff --git a/docs/iris/src/developers_guide/contributing_documentation.rst b/docs/iris/src/developers_guide/contributing_documentation.rst index 9674289568..9b9242df01 100644 --- a/docs/iris/src/developers_guide/contributing_documentation.rst +++ b/docs/iris/src/developers_guide/contributing_documentation.rst @@ -48,7 +48,8 @@ This is useful for a final test before committing your changes. .. note:: In order to preserve a clean build for the html, all **warnings** have been promoted to be **errors** to ensure they are addressed. - This **only** applies when ``make html`` is run. + This **only** applies when ``make html`` and ``make spelling`` is + run. .. _travis-ci: https://travis-ci.org/github/SciTools/iris @@ -87,16 +88,15 @@ adding it to the ``linkcheck_ignore`` array that is defined in the If this fails check the output for the text **broken** and then correct or ignore the url. -.. comment - Finally, the spelling in the documentation can be checked automatically via the - command:: +Finally, the spelling in the documentation can be checked automatically via the +command:: - make spelling + make spelling - The spelling check may pull up many technical abbreviations and acronyms. This - can be managed by using an **allow** list in the form of a file. This file, - or list of files is set in the `conf.py`_ using the string list - ``spelling_word_list_filename``. +The spelling check may pull up many technical abbreviations and acronyms. This +can be managed by using an **allow** list in the form of a file. This file, +or list of files is set in the `conf.py`_ using the string list +``spelling_word_list_filename``. .. note:: In addition to the automated `travis-ci`_ build of all the diff --git a/requirements/ci/py36.yml b/requirements/ci/py36.yml index cd02a2524c..ca37551149 100644 --- a/requirements/ci/py36.yml +++ b/requirements/ci/py36.yml @@ -49,3 +49,5 @@ dependencies: - pip - pip: - sphinxcontrib-napoleon + - sphinxcontrib-spelling + diff --git a/requirements/ci/py37.yml b/requirements/ci/py37.yml index fbd3b1a1f6..2a8edc3d79 100644 --- a/requirements/ci/py37.yml +++ b/requirements/ci/py37.yml @@ -49,3 +49,5 @@ dependencies: - pip - pip: - sphinxcontrib-napoleon + - sphinxcontrib-spelling + diff --git a/requirements/docs.txt b/requirements/docs.txt index 16658de90c..faccaa73b3 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -5,3 +5,4 @@ sphinx-copybutton sphinx-gallery sphinx_rtd_theme sphinxcontrib-napoleon +sphinxcontrib-spelling From 306c1c1faa384f8814aeb5bede077964c174c2f8 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 26 Sep 2020 15:25:38 +0100 Subject: [PATCH 02/22] fixed spelling --- .../contributing_getting_involved.rst | 2 +- docs/iris/src/installing.rst | 4 ++-- docs/iris/src/spelling_allow.txt | 18 ++++++++++++++++++ lib/iris/coords.py | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/iris/src/developers_guide/contributing_getting_involved.rst b/docs/iris/src/developers_guide/contributing_getting_involved.rst index a336bde38b..132bc317e5 100644 --- a/docs/iris/src/developers_guide/contributing_getting_involved.rst +++ b/docs/iris/src/developers_guide/contributing_getting_involved.rst @@ -31,7 +31,7 @@ If you are new to using GitHub we recommend reading the .. note:: For more information on becoming a contributor_ including a link to the Contributors Licence Agreement (CLA) see the `Governance `_ - section of the `SciTools`_ ogranization web site. + section of the `SciTools`_ organisation web site. .. _GitHub getting started: https://docs.github.com/en/github/getting-started-with-github diff --git a/docs/iris/src/installing.rst b/docs/iris/src/installing.rst index ec2b4f1875..1c8024dcd0 100644 --- a/docs/iris/src/installing.rst +++ b/docs/iris/src/installing.rst @@ -37,8 +37,8 @@ at https://conda.io/en/latest/index.html. .. _installing_from_source: -Installing from source (devs) ------------------------------ +Installing from source (developers) +----------------------------------- The latest Iris source release is available from https://github.com/SciTools/iris. diff --git a/docs/iris/src/spelling_allow.txt b/docs/iris/src/spelling_allow.txt index ed883ac3bf..a65b64984b 100644 --- a/docs/iris/src/spelling_allow.txt +++ b/docs/iris/src/spelling_allow.txt @@ -82,6 +82,7 @@ arraylike atol auditable aux +backend basemap behaviour betap @@ -106,12 +107,14 @@ cftime chunksizes ci clabel +cls cmap cmpt codebase color colorbar colorbars +colormaps complevel conda config @@ -122,6 +125,7 @@ coords cs datafiles datatype +datefmt datetime datetimes ddof @@ -134,6 +138,7 @@ dicts diff discontiguities discontiguous +div djf docstring docstrings @@ -159,10 +164,16 @@ filename filenames filepath filespec +fmt fullname func geolocations +getattr +getitem +getitem +getslice github +google gregorian grib gribapi @@ -207,6 +218,7 @@ lblrec lbmon lbmond lbnrec +lbpack lbrsvd lbtim lbuser @@ -216,6 +228,7 @@ lbyrd lh lhs linewidth +linkcheck linted linting lon @@ -231,7 +244,9 @@ meaned mercator metadata min +mixin mpl +mul nanmask nc ndarray @@ -248,6 +263,7 @@ nx ny online orog +param paramId params parsable @@ -257,6 +273,7 @@ placeholders plugin png proj +proxied ps pseudocolor pseudocolour @@ -344,6 +361,7 @@ var versioning vmax vmin +vs waypoint waypoints whitespace diff --git a/lib/iris/coords.py b/lib/iris/coords.py index 76b226b2f6..15f2f8da9a 100644 --- a/lib/iris/coords.py +++ b/lib/iris/coords.py @@ -399,7 +399,7 @@ def __binary_operator__(self, other, mode_constant): "10 meters" when multiplied by a scalar i.e. "1000" would result in a metadata object of "10000 meters". An alternative approach could be taken to multiply the *unit* by 1000 and the resultant metadata - object would represent "10 kilometers". + object would represent "10 kilometres". """ # Note: this method includes bounds handling code, but it only runs From 13a2d792bf2e926c698d51d3d6df92fbbec2d6b0 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 26 Sep 2020 23:14:36 +0100 Subject: [PATCH 03/22] added requirement pyenchant --- requirements/docs.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements/docs.txt b/requirements/docs.txt index faccaa73b3..25c6408611 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -6,3 +6,5 @@ sphinx-gallery sphinx_rtd_theme sphinxcontrib-napoleon sphinxcontrib-spelling +sphinxcontrib-spelling +pyenchant # lets add this explicitly.... From 22e50d22b61ccd2763759002a86d1b57696231bd Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 26 Sep 2020 23:36:04 +0100 Subject: [PATCH 04/22] debug for pyenchant --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5f32ad5cc1..da6f1e9726 100644 --- a/.travis.yml +++ b/.travis.yml @@ -123,13 +123,16 @@ script: # check the links and spelling in the docs - > + export PYENCHANT_VERBOSE_FIND=1 + python -c 'import enchant' + if [[ "${TEST_TARGET}" == 'checkdocs' ]]; then MPL_RC_DIR="${HOME}/.config/matplotlib"; mkdir -p ${MPL_RC_DIR}; echo 'backend : agg' > ${MPL_RC_DIR}/matplotlibrc; echo 'image.cmap : viridis' >> ${MPL_RC_DIR}/matplotlibrc; cd ${INSTALL_DIR}/docs/iris; - make clean && make linkcheck spelling; + make clean && make linkcheck && make spelling; fi # Split the organisation out of the slug. See https://stackoverflow.com/a/5257398/741316 for description. From d7933dee25a0dda0e266cfa1a0b08bcb7f3bc5c5 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 26 Sep 2020 23:45:08 +0100 Subject: [PATCH 05/22] add another explicit requirement fotr enchant --- .travis.yml | 2 +- requirements/ci/py36.yml | 1 + requirements/ci/py37.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index da6f1e9726..f43f5cadf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -123,7 +123,7 @@ script: # check the links and spelling in the docs - > - export PYENCHANT_VERBOSE_FIND=1 + export PYENCHANT_VERBOSE_FIND=1 python -c 'import enchant' if [[ "${TEST_TARGET}" == 'checkdocs' ]]; then diff --git a/requirements/ci/py36.yml b/requirements/ci/py36.yml index ca37551149..ba42a07bc0 100644 --- a/requirements/ci/py36.yml +++ b/requirements/ci/py36.yml @@ -50,4 +50,5 @@ dependencies: - pip: - sphinxcontrib-napoleon - sphinxcontrib-spelling + - pyenchant # lets add this explicitly.... diff --git a/requirements/ci/py37.yml b/requirements/ci/py37.yml index 2a8edc3d79..5342e76827 100644 --- a/requirements/ci/py37.yml +++ b/requirements/ci/py37.yml @@ -50,4 +50,5 @@ dependencies: - pip: - sphinxcontrib-napoleon - sphinxcontrib-spelling + - pyenchant # lets add this explicitly.... From 5d61fb7e4ebc6b4176a81d08877ae1201b691519 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 26 Sep 2020 23:52:26 +0100 Subject: [PATCH 06/22] fix syntax --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f43f5cadf1..758fdd3492 100644 --- a/.travis.yml +++ b/.travis.yml @@ -123,8 +123,8 @@ script: # check the links and spelling in the docs - > - export PYENCHANT_VERBOSE_FIND=1 - python -c 'import enchant' + export PYENCHANT_VERBOSE_FIND=1; + python -c 'import enchant'; if [[ "${TEST_TARGET}" == 'checkdocs' ]]; then MPL_RC_DIR="${HOME}/.config/matplotlib"; From bebaa3feedeef50eb315682543eebde3642ab2b0 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sun, 27 Sep 2020 12:09:18 +0100 Subject: [PATCH 07/22] try conda req --- requirements/ci/py36.yml | 3 +-- requirements/ci/py37.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/requirements/ci/py36.yml b/requirements/ci/py36.yml index ba42a07bc0..bbab8e4c56 100644 --- a/requirements/ci/py36.yml +++ b/requirements/ci/py36.yml @@ -46,9 +46,8 @@ dependencies: - sphinx-copybutton - sphinx-gallery - sphinx_rtd_theme + - sphinxcontrib-spelling - pip - pip: - sphinxcontrib-napoleon - - sphinxcontrib-spelling - pyenchant # lets add this explicitly.... - diff --git a/requirements/ci/py37.yml b/requirements/ci/py37.yml index 5342e76827..10532b46a6 100644 --- a/requirements/ci/py37.yml +++ b/requirements/ci/py37.yml @@ -46,9 +46,8 @@ dependencies: - sphinx-copybutton - sphinx-gallery - sphinx_rtd_theme + - sphinxcontrib-spelling - pip - pip: - sphinxcontrib-napoleon - - sphinxcontrib-spelling - pyenchant # lets add this explicitly.... - From 8106229a2fb2b51283b0eaaab4f22a9d76b759fc Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sun, 27 Sep 2020 16:13:25 +0100 Subject: [PATCH 08/22] removed duplicate --- requirements/docs.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements/docs.txt b/requirements/docs.txt index 25c6408611..0ceb5dc635 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -6,5 +6,4 @@ sphinx-gallery sphinx_rtd_theme sphinxcontrib-napoleon sphinxcontrib-spelling -sphinxcontrib-spelling pyenchant # lets add this explicitly.... From bd2c11d672cb8e886cdaa0bd192c93a2ae46e3fc Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sun, 27 Sep 2020 17:01:45 +0100 Subject: [PATCH 09/22] requirements rejig --- requirements/ci/py36.yml | 4 ++-- requirements/ci/py37.yml | 4 ++-- requirements/docs.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/ci/py36.yml b/requirements/ci/py36.yml index bbab8e4c56..073ffd1007 100644 --- a/requirements/ci/py36.yml +++ b/requirements/ci/py36.yml @@ -46,8 +46,8 @@ dependencies: - sphinx-copybutton - sphinx-gallery - sphinx_rtd_theme - - sphinxcontrib-spelling - pip - pip: - sphinxcontrib-napoleon - - pyenchant # lets add this explicitly.... + - sphinxcontrib-spelling + - pyenchant diff --git a/requirements/ci/py37.yml b/requirements/ci/py37.yml index 10532b46a6..15e31a24f4 100644 --- a/requirements/ci/py37.yml +++ b/requirements/ci/py37.yml @@ -46,8 +46,8 @@ dependencies: - sphinx-copybutton - sphinx-gallery - sphinx_rtd_theme - - sphinxcontrib-spelling - pip - pip: - sphinxcontrib-napoleon - - pyenchant # lets add this explicitly.... + - sphinxcontrib-spelling + - pyenchant diff --git a/requirements/docs.txt b/requirements/docs.txt index 0ceb5dc635..7675de4d64 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -6,4 +6,4 @@ sphinx-gallery sphinx_rtd_theme sphinxcontrib-napoleon sphinxcontrib-spelling -pyenchant # lets add this explicitly.... +pyenchant From 18c4259b31a16b0bd67978d9227907da6f30212a Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Thu, 8 Oct 2020 16:28:05 +0100 Subject: [PATCH 10/22] install ibenchant --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 758fdd3492..9db5a4514f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,9 @@ git: # We need a deep clone so that we can compute the age of the files using their git history. depth: 10000 +before_install: + - sudo apt-get -y install libenchant + install: - > export IRIS_TEST_DATA_REF="fffb9b14b9cb472c5eb2ebb7fd19acb7f6414a30"; From b481a2f11fc076c7383d074b0e8d818a81f9bf59 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Fri, 4 Jun 2021 13:57:01 +0100 Subject: [PATCH 11/22] linkcheck and spelling merged into doccheck nox session. --- .cirrus.yml | 12 ++++++------ noxfile.py | 9 +++++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 7470bc6a9e..cc3aadaaa8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -22,7 +22,7 @@ env: SKIP_TEST_FULL_TASK: "" SKIP_GALLERY_TASK: "" SKIP_DOCTEST_TASK: "" - SKIP_LINKCHECK_TASK: "" + SKIP_DOCCHECK_TASK: "" # Skip task groups by type. Set to a non-empty string to skip. SKIP_ALL_TEST_TASKS: "" SKIP_ALL_DOC_TASKS: "" @@ -224,20 +224,20 @@ doctest_task: # -# Testing Documentation Link Check (Linux) +# Checking documentating. Includes linkcheck and spelling (Linux) # -linkcheck_task: - only_if: ${SKIP_LINKCHECK_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == "" +doccheck_task: + only_if: ${SKIP_DOCCHECK_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == "" << : *CREDITS_TEMPLATE env: 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} doc check" << : *LINUX_TASK_TEMPLATE tests_script: - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" - mkdir -p ${MPL_RC_DIR} - echo "backend : agg" > ${MPL_RC_FILE} - echo "image.cmap : viridis" >> ${MPL_RC_FILE} - - nox --session linkcheck -- --verbose + - nox --session doccheck -- --verbose diff --git a/noxfile.py b/noxfile.py index bf6c95acf6..225ed0b4dd 100755 --- a/noxfile.py +++ b/noxfile.py @@ -268,9 +268,9 @@ def doctest(session: nox.sessions.Session): @nox.session(python=PY_VER, venv_backend="conda") -def linkcheck(session: nox.sessions.Session): +def doccheck(session: nox.sessions.Session): """ - Perform iris doc link check. + Perform iris doc check (links and spelling). Parameters ---------- @@ -292,3 +292,8 @@ def linkcheck(session: nox.sessions.Session): "linkcheck", external=True, ) + session.run( + "make", + "spelling", + external=True, + ) From 490e2561b1f3e4e0058ede83ec104cd4973ba779 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Fri, 4 Jun 2021 08:53:58 +0100 Subject: [PATCH 12/22] add enchant support --- .cirrus.yml | 12 ++++++++++++ requirements/ci/Dockerfile | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 requirements/ci/Dockerfile diff --git a/.cirrus.yml b/.cirrus.yml index cc3aadaaa8..8c6d528073 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -189,6 +189,10 @@ gallery_task: env: PY_VER: 3.8 name: "${CIRRUS_OS}: py${PY_VER} doc tests (gallery)" + container: + dockerfile: requirements/ci/Dockerfile + cpu: 2 + memory: 4G << : *IRIS_TEST_DATA_TEMPLATE << : *LINUX_TASK_TEMPLATE tests_script: @@ -210,6 +214,10 @@ doctest_task: MPL_RC_DIR: ${HOME}/.config/matplotlib MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc name: "${CIRRUS_OS}: py${PY_VER} doc tests" + container: + dockerfile: requirements/ci/Dockerfile + cpu: 2 + memory: 4G << : *IRIS_TEST_DATA_TEMPLATE << : *LINUX_TASK_TEMPLATE tests_script: @@ -234,6 +242,10 @@ doccheck_task: MPL_RC_DIR: ${HOME}/.config/matplotlib MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc name: "${CIRRUS_OS}: py${PY_VER} doc check" + container: + dockerfile: requirements/ci/Dockerfile + cpu: 2 + memory: 4G << : *LINUX_TASK_TEMPLATE tests_script: - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" diff --git a/requirements/ci/Dockerfile b/requirements/ci/Dockerfile new file mode 100644 index 0000000000..eed0efa6d4 --- /dev/null +++ b/requirements/ci/Dockerfile @@ -0,0 +1,12 @@ +FROM gcc:latest + +LABEL author="scitools" \ + version="0.1" \ + description="Docker image with gcc and enchant" + +# +# install system-level dependencies +# +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y enchant From 1212c05d42f5a92b2a753589f84077af0139ca09 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Fri, 4 Jun 2021 11:06:03 +0100 Subject: [PATCH 13/22] rename to debian based enchant-2 --- requirements/ci/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/ci/Dockerfile b/requirements/ci/Dockerfile index eed0efa6d4..38abea59b3 100644 --- a/requirements/ci/Dockerfile +++ b/requirements/ci/Dockerfile @@ -7,6 +7,6 @@ LABEL author="scitools" \ # # install system-level dependencies # -RUN apt update -y \ - && apt upgrade -y \ - && apt install -y enchant +RUN apt-get update -y \ + && apt-get upgrade -y \ + && apt-get install -y enchant-2 From 65ee71634f941918606edf63549f59bbd8200237 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Fri, 4 Jun 2021 12:14:59 +0100 Subject: [PATCH 14/22] move spelling pip install to noxfile --- noxfile.py | 3 +++ requirements/ci/py36.yml | 4 ---- requirements/ci/py37.yml | 4 ---- requirements/ci/py38.yml | 4 ---- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/noxfile.py b/noxfile.py index 225ed0b4dd..1ec7948ae5 100755 --- a/noxfile.py +++ b/noxfile.py @@ -232,6 +232,7 @@ def gallery(session: nox.sessions.Session): """ prepare_venv(session) session.install("--no-deps", "--editable", ".") + session.install("sphinxcontrib-spelling", "pyenchant") session.run( "python", "-m", @@ -253,6 +254,7 @@ def doctest(session: nox.sessions.Session): """ prepare_venv(session) session.install("--no-deps", "--editable", ".") + session.install("sphinxcontrib-spelling", "pyenchant") session.cd("docs") session.run( "make", @@ -280,6 +282,7 @@ def doccheck(session: nox.sessions.Session): """ prepare_venv(session) session.install("--no-deps", "--editable", ".") + session.install("sphinxcontrib-spelling", "pyenchant") session.cd("docs") session.run( "make", diff --git a/requirements/ci/py36.yml b/requirements/ci/py36.yml index b95025cace..f778704803 100644 --- a/requirements/ci/py36.yml +++ b/requirements/ci/py36.yml @@ -50,7 +50,3 @@ dependencies: - sphinx-gallery - sphinx-panels - sphinx_rtd_theme - - pip - - pip: - - sphinxcontrib-spelling - - pyenchant diff --git a/requirements/ci/py37.yml b/requirements/ci/py37.yml index 17b47d7533..5b21e9f778 100644 --- a/requirements/ci/py37.yml +++ b/requirements/ci/py37.yml @@ -50,7 +50,3 @@ dependencies: - sphinx-gallery - sphinx-panels - sphinx_rtd_theme - - pip - - pip: - - sphinxcontrib-spelling - - pyenchant diff --git a/requirements/ci/py38.yml b/requirements/ci/py38.yml index 3d035bc40f..e09a7a7164 100644 --- a/requirements/ci/py38.yml +++ b/requirements/ci/py38.yml @@ -50,7 +50,3 @@ dependencies: - sphinx-gallery - sphinx-panels - sphinx_rtd_theme - - pip - - pip: - - sphinxcontrib-spelling - - pyenchant From 009bbd681af1378c384f65c79349dc8e263f7e6a Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Fri, 4 Jun 2021 14:32:08 +0100 Subject: [PATCH 15/22] corrected spelling --- docs/src/developers_guide/release.rst | 2 +- docs/src/spelling_allow.txt | 162 ++++++++++++++------------ lib/iris/common/metadata.py | 4 +- 3 files changed, 92 insertions(+), 76 deletions(-) diff --git a/docs/src/developers_guide/release.rst b/docs/src/developers_guide/release.rst index 9e7c74a6ae..457ba15313 100644 --- a/docs/src/developers_guide/release.rst +++ b/docs/src/developers_guide/release.rst @@ -107,7 +107,7 @@ source distribution (``sdist``) and pure Python wheel (``bdist_wheel``):: > conda create -n iris-pypi -c conda-forge --yes pip pyke python setuptools twine wheel > . activate iris-pypi -Checkout the lastest Iris ```` tag:: +Checkout the latest Iris ```` tag:: > git fetch --tags > git checkout diff --git a/docs/src/spelling_allow.txt b/docs/src/spelling_allow.txt index a65b64984b..e48a842331 100644 --- a/docs/src/spelling_allow.txt +++ b/docs/src/spelling_allow.txt @@ -1,86 +1,27 @@ -Admin -Albers -Arakawa -Arg -Args -Autoscale -Biggus -CF -CI -Cartopy -Checklist -Color -Conda -Constraining -DAP -Dask -Debian -Duchon -EO -Eos -Exner -Fieldsfile -Fieldsfiles -FillValue -Gb -GeogCS -Hovmoller -Jul -Jun -Jupyter -Lanczos -Mappables -Matplotlib -Mb -Modeling -Mollweide -NetCDF -Nino -PPfield -PPfields -Perez -Proj -Quickplot -Regrids -Royer -Scitools -Scitools -Sep -Stehfest -Steroegraphic -Subsetting -TestCodeFormat -TestLicenseHeaders -Torvalds -Trans -Trenberth -Tri -URIs -URLs -Ubuntu -Ugrid -Unidata -Vol -Vuuren -Workflow -Yury -Zaytsev -Zorder + abf abl +Admin advection aggregator aggregators +Albers alphap ancils +antialiasing antimeridian ap +Arakawa arg +Arg args +Args arithmetic arraylike +artifacts atol auditable +Autoscale aux backend basemap @@ -88,6 +29,7 @@ behaviour betap bhulev biggus +Biggus blev boolean boundpoints @@ -99,45 +41,59 @@ builtin bulev carrée cartesian +Cartopy celsius center centrepoints cf +CF cftime +Checklist chunksizes ci +CI +CIaaS clabel cls cmap cmpt codebase color +Color colorbar colorbars colormaps complevel conda +Conda config constraining +Constraining convertor coord coords cs +DAP +Dask datafiles datatype datefmt datetime datetimes ddof +Debian deepcopy deprecations der +dev dewpoint dict dicts diff +Diffing discontiguities discontiguous +distros div djf docstring @@ -147,26 +103,35 @@ dom dropdown dtype dtypes +Duchon dx dy edgecolor endian endianness +EO +Eos equirectangular eta etc +Exner fh fieldsfile +Fieldsfile fieldsfiles +Fieldsfiles fileformat fileformats filename filenames filepath filespec +FillValue fmt fullname func +Gb +GeogCS geolocations getattr getitem @@ -180,9 +145,10 @@ gribapi gridcell griddata gridlines -hPa hashable hindcast +Hovmoller +hPa hyperlink hyperlinks idiff @@ -201,9 +167,14 @@ io isosurfaces iterable jja +Jul +Jun jupyter +Jupyter +Kubuntu kwarg kwargs +Lanczos landsea lat latlon @@ -225,37 +196,49 @@ lbuser lbvc lbyr lbyrd +leverages lh lhs linewidth linkcheck linted linting +lockfiles lon lons lt mam +Mappables markup matplotlib +Matplotlib matplotlibrc max +Mb mdtol meaned mercator metadata min mixin +Modeling +Mollweide mpl mul +namedtuple +Namedtuple nanmask nc ndarray neighbor ness -netCDF netcdf +netCDF +NetCDF netcdftime nimrod +Nino +Nox np nsigma numpy @@ -269,10 +252,14 @@ params parsable pcolormesh pdf +Perez placeholders plugin png +PPfield +PPfields proj +Proj proxied ps pseudocolor @@ -281,31 +268,39 @@ pseudocoloured py pyplot quickplot -rST +Quickplot rc rd -reST -reStructuredText rebase rebases rebasing +regardlessly regrid regridded regridder regridders regridding regrids +Regrids +rehosted rel repo repos reprojecting +reST +reStructuredText rh rhs +Royer rst +rST rtol scipy scitools +Scitools +Scitools seekable +Sep setup sines sinh @@ -319,16 +314,21 @@ stashcodes stats std stdout +Stehfest +Steroegraphic str subcube subcubes submodule submodules subsetting +Subsetting sys tanh tb testcases +TestCodeFormat +TestLicenseHeaders tgt th timepoint @@ -336,32 +336,44 @@ timestamp timesteps todo tol +toolkit +Torvalds tos traceback +Trans travis +Trenberth +Tri tripolar tuple tuples txt +Ubuntu udunits ufunc ugrid +Ugrid ukmo un unhandled unicode +Unidata unittest unrotate unrotated uris +URIs url urls +URLs util var versioning vmax vmin +Vol vs +Vuuren waypoint waypoints whitespace @@ -370,10 +382,14 @@ wildcards windspeeds withnans workflow +Workflow workflows xN xx xxx +Yury +Zaytsev zeroth zlev zonal +Zorder diff --git a/lib/iris/common/metadata.py b/lib/iris/common/metadata.py index f25f58be1e..9c4cd728a6 100644 --- a/lib/iris/common/metadata.py +++ b/lib/iris/common/metadata.py @@ -51,7 +51,7 @@ def hexdigest(item): """ - Calculate a hexidecimal string hash representation of the provided item. + Calculate a hexadecimal string hash representation of the provided item. Calculates a 64-bit non-cryptographic hash of the provided item, using the extremely fast ``xxhash`` hashing algorithm, and returns the hexdigest @@ -66,7 +66,7 @@ def hexdigest(item): The item that requires to have its hexdigest calculated. Returns: - The string hexidecimal representation of the item's 64-bit hash. + The string hexadecimal representation of the item's 64-bit hash. """ # Special case: deal with numpy arrays. From 0abf6c4190b665057d1746ddfbfd72777fd5a507 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Fri, 4 Jun 2021 16:25:33 +0100 Subject: [PATCH 16/22] correct spelling --- docs/src/developers_guide/contributing_ci_tests.rst | 2 +- docs/src/spelling_allow.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/developers_guide/contributing_ci_tests.rst b/docs/src/developers_guide/contributing_ci_tests.rst index cdced71fd1..66694f772a 100644 --- a/docs/src/developers_guide/contributing_ci_tests.rst +++ b/docs/src/developers_guide/contributing_ci_tests.rst @@ -75,7 +75,7 @@ the PR is merged, to prevent overwriting developer commits. The auto-updater can still be invoked manually in this situation by going to the `GitHub Actions`_ page for the workflow, and manually running using the "Run Workflow" button. By default, this will also not override developer commits. To force an update, you must -confirm "yes" in the "Run Worflow" prompt. +confirm "yes" in the "Run Workflow" prompt. .. _skipping Cirrus-CI tasks: diff --git a/docs/src/spelling_allow.txt b/docs/src/spelling_allow.txt index e48a842331..541d1a9cc3 100644 --- a/docs/src/spelling_allow.txt +++ b/docs/src/spelling_allow.txt @@ -1,4 +1,3 @@ - abf abl Admin @@ -146,6 +145,7 @@ gridcell griddata gridlines hashable +hexdigest hindcast Hovmoller hPa @@ -274,6 +274,7 @@ rd rebase rebases rebasing +refactored regardlessly regrid regridded From cc34bc610266df35956484dbadb48d7583463cf5 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 5 Jun 2021 17:41:41 +0100 Subject: [PATCH 17/22] test --- .cirrus.yml | 10 +++++----- docs/src/conf.py | 9 +++++---- .../developers_guide/contributing_graphics_tests.rst | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 86b3016be3..4fd4f0e5d5 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -17,11 +17,11 @@ container: env: # Skip specific tasks by name. Set to a non-empty string to skip. - SKIP_LINT_TASK: "" - SKIP_TEST_MINIMAL_TASK: "" - SKIP_TEST_FULL_TASK: "" - SKIP_GALLERY_TASK: "" - SKIP_DOCTEST_TASK: "" + SKIP_LINT_TASK: "Yup" + SKIP_TEST_MINIMAL_TASK: "Yup" + SKIP_TEST_FULL_TASK: "Yup" + SKIP_GALLERY_TASK: "Yup" + SKIP_DOCTEST_TASK: "Yup" SKIP_DOCCHECK_TASK: "" # Skip task groups by type. Set to a non-empty string to skip. SKIP_ALL_TEST_TASKS: "" diff --git a/docs/src/conf.py b/docs/src/conf.py index c0813ec367..c3bc9d9657 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -182,12 +182,13 @@ def _dotv(version): # -- spellingextension -------------------------------------------------------- # See https://sphinxcontrib-spelling.readthedocs.io/en/latest/customize.html spelling_lang = "en_GB" +# tokenizer_lang = "en_GB" # The lines in this file must only use line feeds (no carriage returns). spelling_word_list_filename = ["spelling_allow.txt"] -spelling_show_suggestions = False -spelling_show_whole_line = False -spelling_ignore_importable_modules = True -spelling_ignore_python_builtins = True +# spelling_show_suggestions = False +# spelling_show_whole_line = False +# spelling_ignore_importable_modules = True +# spelling_ignore_python_builtins = True # -- copybutton extension ----------------------------------------------------- # See https://sphinx-copybutton.readthedocs.io/en/latest/ diff --git a/docs/src/developers_guide/contributing_graphics_tests.rst b/docs/src/developers_guide/contributing_graphics_tests.rst index 81ec9c0344..f7b487290d 100644 --- a/docs/src/developers_guide/contributing_graphics_tests.rst +++ b/docs/src/developers_guide/contributing_graphics_tests.rst @@ -22,7 +22,7 @@ Challenges ========== Iris uses many dependencies that provide functionality, an example that -applies here is matplotlib_. For more information on the dependences, see +applies here is matplotlib_. For more information on the dependencies, see :ref:`installing_iris`. When there are updates to the matplotlib_ or a dependency of matplotlib, this may result in a change in the rendered graphical output. This means that there may be no changes to Iris_, but due to an From 89317aaf3a814789646954a88e308bbfc1a98142 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 5 Jun 2021 18:31:47 +0100 Subject: [PATCH 18/22] disabled linkcheck for a quick runn on cirrus... --- noxfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/noxfile.py b/noxfile.py index 87979e69b0..176e493b15 100755 --- a/noxfile.py +++ b/noxfile.py @@ -290,11 +290,11 @@ def doccheck(session: nox.sessions.Session): "html", external=True, ) - session.run( - "make", - "linkcheck", - external=True, - ) +# session.run( +# "make", +# "linkcheck", +# external=True, +# ) session.run( "make", "spelling", From b3363162b48a0268e5ca54da141d38af706b65c3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 5 Jun 2021 17:33:13 +0000 Subject: [PATCH 19/22] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- noxfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/noxfile.py b/noxfile.py index 176e493b15..beb46020c6 100755 --- a/noxfile.py +++ b/noxfile.py @@ -290,11 +290,11 @@ def doccheck(session: nox.sessions.Session): "html", external=True, ) -# session.run( -# "make", -# "linkcheck", -# external=True, -# ) + # session.run( + # "make", + # "linkcheck", + # external=True, + # ) session.run( "make", "spelling", From 62753b27d0e8ee0939e0d144a54c90fd58b304a5 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 5 Jun 2021 18:54:09 +0100 Subject: [PATCH 20/22] testing spelling lang --- docs/src/conf.py | 10 +++++----- noxfile.py | 17 +++++++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/src/conf.py b/docs/src/conf.py index c3bc9d9657..7995650402 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -182,13 +182,13 @@ def _dotv(version): # -- spellingextension -------------------------------------------------------- # See https://sphinxcontrib-spelling.readthedocs.io/en/latest/customize.html spelling_lang = "en_GB" -# tokenizer_lang = "en_GB" +tokenizer_lang = "en_GB" # The lines in this file must only use line feeds (no carriage returns). spelling_word_list_filename = ["spelling_allow.txt"] -# spelling_show_suggestions = False -# spelling_show_whole_line = False -# spelling_ignore_importable_modules = True -# spelling_ignore_python_builtins = True +spelling_show_suggestions = False +spelling_show_whole_line = False +spelling_ignore_importable_modules = True +spelling_ignore_python_builtins = True # -- copybutton extension ----------------------------------------------------- # See https://sphinx-copybutton.readthedocs.io/en/latest/ diff --git a/noxfile.py b/noxfile.py index 176e493b15..8a6e626145 100755 --- a/noxfile.py +++ b/noxfile.py @@ -284,17 +284,22 @@ def doccheck(session: nox.sessions.Session): session.install("--no-deps", "--editable", ".") session.install("sphinxcontrib-spelling", "pyenchant") session.cd("docs") - session.run( - "make", - "clean", - "html", - external=True, - ) +# session.run( +# "make", +# "clean", +# "html", +# external=True, +# ) # session.run( # "make", # "linkcheck", # external=True, # ) + session.run( + "python", + "-c", + "import enchant; print(enchant.list_languages())", + ) session.run( "make", "spelling", From eed148b651a3f756aeaaf6bc61e1822a791a5793 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 5 Jun 2021 17:57:11 +0000 Subject: [PATCH 21/22] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- noxfile.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/noxfile.py b/noxfile.py index 8a6e626145..5b5f8534cc 100755 --- a/noxfile.py +++ b/noxfile.py @@ -284,17 +284,17 @@ def doccheck(session: nox.sessions.Session): session.install("--no-deps", "--editable", ".") session.install("sphinxcontrib-spelling", "pyenchant") session.cd("docs") -# session.run( -# "make", -# "clean", -# "html", -# external=True, -# ) -# session.run( -# "make", -# "linkcheck", -# external=True, -# ) + # session.run( + # "make", + # "clean", + # "html", + # external=True, + # ) + # session.run( + # "make", + # "linkcheck", + # external=True, + # ) session.run( "python", "-c", From a7928318f40280e5f2e8b0b1bb9962a374c31938 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Sat, 5 Jun 2021 19:16:50 +0100 Subject: [PATCH 22/22] enchant debug added --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 8a6e626145..13f81d3a49 100755 --- a/noxfile.py +++ b/noxfile.py @@ -298,7 +298,7 @@ def doccheck(session: nox.sessions.Session): session.run( "python", "-c", - "import enchant; print(enchant.list_languages())", + "import enchant; print('-'*30); print(enchant.list_languages()); d = enchant.Dict('en_GB'); print(d.provider.name); print(d.provider.desc); print(d.provider.file); print('-'*30);", ) session.run( "make",