diff --git a/.readthedocs.yml b/.readthedocs.yml index 95f828a873..871212c534 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -19,7 +19,7 @@ build: - git stash pop conda: - environment: requirements/ci/readthedocs.yml + environment: requirements/readthedocs.yml sphinx: configuration: docs/src/conf.py diff --git a/docs/src/common_links.inc b/docs/src/common_links.inc index 4d03a92715..55461369ff 100644 --- a/docs/src/common_links.inc +++ b/docs/src/common_links.inc @@ -30,13 +30,13 @@ .. _pull request: https://github.com/SciTools/iris/pulls .. _pull requests: https://github.com/SciTools/iris/pulls .. _Read the Docs: https://scitools-iris.readthedocs.io/en/latest/ -.. _readthedocs.yml: https://github.com/SciTools/iris/blob/main/requirements/ci/readthedocs.yml +.. _readthedocs.yml: https://github.com/SciTools/iris/blob/main/requirements/readthedocs.yml .. _SciTools: https://github.com/SciTools .. _scitools-iris: https://pypi.org/project/scitools-iris/ .. _sphinx: https://www.sphinx-doc.org/en/master/ .. _test-iris-imagehash: https://github.com/SciTools/test-iris-imagehash .. _using git: https://docs.github.com/en/github/using-git -.. _requirements/ci/: https://github.com/SciTools/iris/tree/main/requirements/ci +.. _requirements: https://github.com/SciTools/iris/tree/main/requirements .. _CF-UGRID: https://ugrid-conventions.github.io/ugrid-conventions/ .. _issues on GitHub: https://github.com/SciTools/iris/issues?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc .. _python-stratify: https://github.com/SciTools/python-stratify diff --git a/docs/src/conf.py b/docs/src/conf.py index b00bd4ad77..1a565c0bcd 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -122,7 +122,7 @@ def _dotv(version): # Automate the discovery of the python versions tested with CI. python_support = sorted( - [fname.stem for fname in Path(".").glob("../../requirements/ci/py*.yml")] + [fname.stem for fname in Path(".").glob("../../requirements/py*.yml")] ) if not python_support: diff --git a/docs/src/developers_guide/contributing_ci_tests.rst b/docs/src/developers_guide/contributing_ci_tests.rst index 1d06434843..8fa3361cb7 100644 --- a/docs/src/developers_guide/contributing_ci_tests.rst +++ b/docs/src/developers_guide/contributing_ci_tests.rst @@ -48,18 +48,18 @@ GitHub Actions Test Environment ------------------------------- The CI test environments for our GHA is determined from the requirement files -in ``requirements/ci/pyXX.yml``. These are conda environment files list the top-level +in ``requirements/pyXX.yml``. These are conda environment files list the top-level package dependencies for running and testing Iris. For reproducible test results, these environments are resolved for all their dependencies -and stored as conda lock files in the ``requirements/ci/nox.lock`` directory. The test environments +and stored as conda lock files in the ``requirements/locks`` directory. The test environments will not resolve the dependencies each time, instead they will use the lock files to reproduce the exact same environment each time. **If you have updated the requirement YAML files with new dependencies, you will need to generate new lock files.** To do this, run the command:: - python tools/update_lockfiles.py -o requirements/ci/nox.lock requirements/ci/py*.yml + python tools/update_lockfiles.py -o requirements/locks requirements/py*.yml or simply:: @@ -76,7 +76,7 @@ and add the changed lockfiles to your pull request. New lockfiles are generated automatically each week to ensure that Iris continues to be tested against the latest available version of its dependencies. -Each week the yaml files in ``requirements/ci`` are resolved by a GitHub Action. +Each week the yaml files in ``requirements`` are resolved by a GitHub Action. If the resolved environment has changed, a pull request is created with the new lock files. The CI test suite will run on this pull request. If the tests fail, a developer will need to create a new branch based off the ``auto-update-lockfiles`` branch diff --git a/docs/src/developers_guide/contributing_pull_request_checklist.rst b/docs/src/developers_guide/contributing_pull_request_checklist.rst index 57bc9fd728..62177def6e 100644 --- a/docs/src/developers_guide/contributing_pull_request_checklist.rst +++ b/docs/src/developers_guide/contributing_pull_request_checklist.rst @@ -29,7 +29,7 @@ is merged. Before submitting a pull request please consider this list. #. **Check all modified and new source files conform to the required** :ref:`code_formatting`. -#. **Check all new dependencies added to the** `requirements/ci/`_ **yaml +#. **Check all new dependencies added to the** `requirements`_ **yaml files.** If dependencies have been added then new nox testing lockfiles should be generated too, see :ref:`gha_test_env`. diff --git a/docs/src/installing.rst b/docs/src/installing.rst index b2481973c0..74e349a518 100644 --- a/docs/src/installing.rst +++ b/docs/src/installing.rst @@ -82,7 +82,7 @@ Once conda is installed, you can install Iris using conda and then activate it. The example commands below assume you are in the root directory of your local copy of Iris:: - conda env create --force --file=requirements/ci/iris.yml + conda env create --force --file=requirements/iris.yml conda activate iris-dev .. note:: @@ -92,7 +92,7 @@ local copy of Iris:: particularly useful when rebuilding your environment due to a change in requirements. -The ``requirements/ci/iris.yml`` file defines the Iris development conda +The ``requirements/iris.yml`` file defines the Iris development conda environment *name* and all the relevant *top level* `conda-forge` package dependencies that you need to **code**, **test**, and **build** the documentation. If you wish to minimise the environment footprint, simply @@ -100,12 +100,12 @@ remove any unwanted packages from the requirements file e.g., if you don't intend to run the Iris tests locally or build the documentation, then remove all the packages from the `testing` and `documentation` sections. -.. note:: The ``requirements/ci/iris.yml`` file will always use the latest +.. note:: The ``requirements/iris.yml`` file will always use the latest Iris tested Python version available. For all Python versions that are supported and tested against by Iris, view the contents of - the `requirements/ci`_ directory. + the `requirements`_ directory. -.. _requirements/ci: https://github.com/scitools/iris/tree/main/requirements/ci +.. _requirements: https://github.com/scitools/iris/tree/main/requirements Finally you need to run the command to configure your shell environment to find your local Iris code:: diff --git a/docs/src/whatsnew/2.1.rst b/docs/src/whatsnew/2.1.rst index 33f3a013b1..3613bc0c23 100644 --- a/docs/src/whatsnew/2.1.rst +++ b/docs/src/whatsnew/2.1.rst @@ -97,5 +97,5 @@ Internal __ `netCDF4`_ * Iris now requires version 2 of Matplotlib, and ``>=1.14`` of NumPy. - Full requirements can be seen in the `requirements `_ + Full requirements can be seen in the `requirements`_ directory of the Iris' the source. diff --git a/noxfile.py b/noxfile.py index c7b0a0e05b..f02b91f823 100755 --- a/noxfile.py +++ b/noxfile.py @@ -41,7 +41,7 @@ def session_lockfile(session: nox.sessions.Session) -> Path: """Return the path of the session lockfile.""" return Path( - f"requirements/ci/nox.lock/py{session.python.replace('.', '')}-linux-64.lock" + f"requirements/locks/py{session.python.replace('.', '')}-linux-64.lock" ) diff --git a/requirements/ci/iris.yml b/requirements/iris.yml similarity index 100% rename from requirements/ci/iris.yml rename to requirements/iris.yml diff --git a/requirements/ci/nox.lock/py310-linux-64.lock b/requirements/locks/py310-linux-64.lock similarity index 100% rename from requirements/ci/nox.lock/py310-linux-64.lock rename to requirements/locks/py310-linux-64.lock diff --git a/requirements/ci/nox.lock/py38-linux-64.lock b/requirements/locks/py38-linux-64.lock similarity index 100% rename from requirements/ci/nox.lock/py38-linux-64.lock rename to requirements/locks/py38-linux-64.lock diff --git a/requirements/ci/nox.lock/py39-linux-64.lock b/requirements/locks/py39-linux-64.lock similarity index 100% rename from requirements/ci/nox.lock/py39-linux-64.lock rename to requirements/locks/py39-linux-64.lock diff --git a/requirements/ci/py310.yml b/requirements/py310.yml similarity index 100% rename from requirements/ci/py310.yml rename to requirements/py310.yml diff --git a/requirements/ci/py38.yml b/requirements/py38.yml similarity index 100% rename from requirements/ci/py38.yml rename to requirements/py38.yml diff --git a/requirements/ci/py39.yml b/requirements/py39.yml similarity index 100% rename from requirements/ci/py39.yml rename to requirements/py39.yml diff --git a/requirements/ci/readthedocs.yml b/requirements/readthedocs.yml similarity index 100% rename from requirements/ci/readthedocs.yml rename to requirements/readthedocs.yml diff --git a/tools/update_lockfiles.py b/tools/update_lockfiles.py index dc898784ae..c620804fde 100755 --- a/tools/update_lockfiles.py +++ b/tools/update_lockfiles.py @@ -8,7 +8,7 @@ that nox uses for testing each different supported version of python. Typical usage: - python tools/update_lockfiles.py -o requirements/ci/nox.lock requirements/ci/py*.yml + python tools/update_lockfiles.py -o requirements/locks requirements/py*.yml """