Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions docs/src/developers_guide/contributing_ci_tests.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _developer_testing_ci:

.. include:: ../common_links.inc

.. _developer_testing_ci:

Continuous Integration (CI) Testing
===================================

Expand Down Expand Up @@ -119,5 +119,32 @@ See the `pre-commit.ci dashboard`_ for details of recent past and active Iris jo
Append to the ``ignore-words-list`` option any **valid words** that are
considered **not** a typo and should **not** be corrected by `codespell`_.

ruff
----
As of **Iris 3.8** `ruff`_ has been adopted to ensure our codebase is using best
practice. `ruff`_ is configured in the `Iris`_ GitHub repository using
`.pre-commit-config.yaml`_.

You can install and run `ruff`_ in your development **iris-dev** conda environment
via::

conda activate iris-dev
pip install ruff
cd iris
ruff .

.. note::

The `ruff`_ ``pre-commit`` hook checks for compliance of the whole codebase.
This hook is configured in the ``[tool.ruff]`` section
of the ``pyproject.toml`` file.

Edit the ``.ruff.toml`` file to include any *temporary* rules to be ignored. Edit the ``pyproject.toml`` to include any *permanent* rules to be ignored. We
aim to be fully `ruff`_ compliant as possible.

For more information on how to use `ruff`_ please see the `ruff documentation`_.


.. _.pre-commit-config.yaml: https://github.com/SciTools/iris/blob/main/.pre-commit-config.yaml
.. _pre-commit.ci dashboard: https://results.pre-commit.ci/repo/github/5312648
.. _ruff documentation: https://docs.astral.sh/ruff/tutorial/
3 changes: 3 additions & 0 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ This document explains the changes made to Iris for this release
:class:`~iris.cube.Cube` standard names in
:func:`iris.analysis.calculus.curl`. (:pull:`5680`)

#. `@tkknight`_ added ruff documentation in the :ref:`developer_testing_ci` of the
:ref:`developers_guide`. (:pull:`5701`)


💼 Internal
===========
Expand Down