Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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. rruff is configured in the `Iris`_ GitHub repository using
Comment thread
tkknight marked this conversation as resolved.
Outdated
`.pre-commit-config.yaml`_.

You can install and run `ruff`_ into your development **iris-dev** conda environment
Comment thread
tkknight marked this conversation as resolved.
Outdated
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 add any rules to ignore if appropriate. We
Comment thread
tkknight marked this conversation as resolved.
Outdated
aim to be ruff compliant where at all possible.
Comment thread
tkknight marked this conversation as resolved.
Outdated

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 @@ -160,6 +160,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