From 36bf9f5d894741ee5f705e32b3af441a9d091a5a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 18:04:52 +0000 Subject: [PATCH 1/9] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.4.2 → v2.4.3](https://github.com/codespell-project/codespell/compare/v2.4.2...v2.4.3) - [github.com/pre-commit/mirrors-mypy: v2.1.0 → v2.3.1](https://github.com/pre-commit/mirrors-mypy/compare/v2.1.0...v2.3.1) - [github.com/astral-sh/ruff-pre-commit: v0.15.20 → v0.16.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.20...v0.16.6) - [github.com/scientific-python/cookie: 2026.06.18 → 2026.08.14](https://github.com/scientific-python/cookie/compare/2026.06.18...2026.08.14) - [github.com/abravalheri/validate-pyproject: v0.25 → 0.26](https://github.com/abravalheri/validate-pyproject/compare/v0.25...0.26) - [github.com/zizmorcore/zizmor-pre-commit: v1.26.1 → v1.30.0](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.26.1...v1.30.0) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb2c271459..2148d94604 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -65,14 +65,14 @@ repos: types: [file, rst] - repo: https://github.com/codespell-project/codespell - rev: "v2.4.2" + rev: "v2.4.3" hooks: - id: codespell types_or: [asciidoc, python, markdown, rst] additional_dependencies: [tomli] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v2.1.0' + rev: 'v2.3.1' hooks: - id: mypy additional_dependencies: @@ -87,7 +87,7 @@ repos: types: [file, python] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.15.20" + rev: "v0.16.6" hooks: - id: ruff-check types: [file, python] @@ -102,7 +102,7 @@ repos: types: [file, python] - repo: https://github.com/scientific-python/cookie - rev: 2026.06.18 + rev: 2026.08.14 hooks: - id: sp-repo-review additional_dependencies: ["repo-review[cli]"] @@ -110,11 +110,11 @@ repos: - repo: https://github.com/abravalheri/validate-pyproject # More exhaustive than Ruff RUF200. - rev: "v0.25" + rev: "0.26" hooks: - id: validate-pyproject - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.26.1 + rev: v1.30.0 hooks: - id: zizmor From c9f56883a38903a1ae2539c537cc5252bdfd4207 Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Thu, 24 Sep 2026 17:06:59 +0100 Subject: [PATCH 2/9] make license file regex more lenient --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6b8b7f6512..27ec64879a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -385,6 +385,9 @@ select = [ "D212", # Multi-line docstring summary should start at the first line ] +[tool.ruff.lint.flake8-copyright] +notice-rgx = "(?i)Copyright" + [tool.ruff.lint.isort] force-sort-within-sections = true known-first-party = ["iris"] From 185eeb36a93640bb8602e42090555f4d758d093e Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Fri, 25 Sep 2026 13:57:15 +0100 Subject: [PATCH 3/9] add copyright header --- docs/gallery_code/general/plot_SOI_filtering.py | 4 ++++ docs/gallery_code/general/plot_anomaly_log_colouring.py | 4 ++++ docs/gallery_code/general/plot_coriolis.py | 4 ++++ docs/gallery_code/general/plot_cross_section.py | 4 ++++ docs/gallery_code/general/plot_custom_aggregation.py | 4 ++++ docs/gallery_code/general/plot_custom_file_loading.py | 4 ++++ docs/gallery_code/general/plot_global_map.py | 4 ++++ docs/gallery_code/general/plot_inset.py | 4 ++++ docs/gallery_code/general/plot_lineplot_with_legend.py | 4 ++++ docs/gallery_code/general/plot_polar_stereo.py | 4 ++++ docs/gallery_code/general/plot_polynomial_fit.py | 4 ++++ docs/gallery_code/general/plot_projections_and_annotations.py | 4 ++++ docs/gallery_code/general/plot_rotated_pole_mapping.py | 4 ++++ docs/gallery_code/general/plot_zonal_means.py | 4 ++++ docs/gallery_code/meteorology/plot_COP_1d.py | 4 ++++ docs/gallery_code/meteorology/plot_COP_maps.py | 4 ++++ docs/gallery_code/meteorology/plot_TEC.py | 4 ++++ docs/gallery_code/meteorology/plot_deriving_phenomena.py | 4 ++++ docs/gallery_code/meteorology/plot_hovmoller.py | 4 ++++ docs/gallery_code/meteorology/plot_lagged_ensemble.py | 4 ++++ docs/gallery_code/meteorology/plot_wind_barbs.py | 4 ++++ docs/gallery_code/meteorology/plot_wind_speed.py | 4 ++++ docs/gallery_code/oceanography/plot_atlantic_profiles.py | 4 ++++ docs/gallery_code/oceanography/plot_load_nemo.py | 4 ++++ docs/gallery_code/oceanography/plot_orca_projection.py | 4 ++++ 25 files changed, 100 insertions(+) diff --git a/docs/gallery_code/general/plot_SOI_filtering.py b/docs/gallery_code/general/plot_SOI_filtering.py index 68b2812ccd..d6afee2632 100644 --- a/docs/gallery_code/general/plot_SOI_filtering.py +++ b/docs/gallery_code/general/plot_SOI_filtering.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Applying a Filter to a Time-Series ================================== diff --git a/docs/gallery_code/general/plot_anomaly_log_colouring.py b/docs/gallery_code/general/plot_anomaly_log_colouring.py index 8ac8c76e0d..d429a11c1e 100644 --- a/docs/gallery_code/general/plot_anomaly_log_colouring.py +++ b/docs/gallery_code/general/plot_anomaly_log_colouring.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Colouring Anomaly Data With Logarithmic Scaling =============================================== diff --git a/docs/gallery_code/general/plot_coriolis.py b/docs/gallery_code/general/plot_coriolis.py index d435023574..858044f4a0 100644 --- a/docs/gallery_code/general/plot_coriolis.py +++ b/docs/gallery_code/general/plot_coriolis.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Deriving the Coriolis Frequency Over the Globe ============================================== diff --git a/docs/gallery_code/general/plot_cross_section.py b/docs/gallery_code/general/plot_cross_section.py index 8309d6d5cf..c92a845eb4 100644 --- a/docs/gallery_code/general/plot_cross_section.py +++ b/docs/gallery_code/general/plot_cross_section.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Cross Section Plots =================== diff --git a/docs/gallery_code/general/plot_custom_aggregation.py b/docs/gallery_code/general/plot_custom_aggregation.py index afeb359409..12b0d251af 100644 --- a/docs/gallery_code/general/plot_custom_aggregation.py +++ b/docs/gallery_code/general/plot_custom_aggregation.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Calculating a Custom Statistic ============================== diff --git a/docs/gallery_code/general/plot_custom_file_loading.py b/docs/gallery_code/general/plot_custom_file_loading.py index 670575d124..34ba0d1161 100644 --- a/docs/gallery_code/general/plot_custom_file_loading.py +++ b/docs/gallery_code/general/plot_custom_file_loading.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Loading a Cube From a Custom File Format ======================================== diff --git a/docs/gallery_code/general/plot_global_map.py b/docs/gallery_code/general/plot_global_map.py index 7e61565f44..3e32c37326 100644 --- a/docs/gallery_code/general/plot_global_map.py +++ b/docs/gallery_code/general/plot_global_map.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Quickplot of a 2D Cube on a Map =============================== diff --git a/docs/gallery_code/general/plot_inset.py b/docs/gallery_code/general/plot_inset.py index 6ea04ffebb..8ef64e8473 100644 --- a/docs/gallery_code/general/plot_inset.py +++ b/docs/gallery_code/general/plot_inset.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Test Data Showing Inset Plots ============================= diff --git a/docs/gallery_code/general/plot_lineplot_with_legend.py b/docs/gallery_code/general/plot_lineplot_with_legend.py index bfba085ef2..fba620df3a 100644 --- a/docs/gallery_code/general/plot_lineplot_with_legend.py +++ b/docs/gallery_code/general/plot_lineplot_with_legend.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Multi-Line Temperature Profile Plot =================================== diff --git a/docs/gallery_code/general/plot_polar_stereo.py b/docs/gallery_code/general/plot_polar_stereo.py index 07f0a4c01b..8da6aced22 100644 --- a/docs/gallery_code/general/plot_polar_stereo.py +++ b/docs/gallery_code/general/plot_polar_stereo.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Example of a Polar Stereographic Plot ===================================== diff --git a/docs/gallery_code/general/plot_polynomial_fit.py b/docs/gallery_code/general/plot_polynomial_fit.py index adaaf4b94f..28aca47a07 100644 --- a/docs/gallery_code/general/plot_polynomial_fit.py +++ b/docs/gallery_code/general/plot_polynomial_fit.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Fitting a Polynomial ==================== diff --git a/docs/gallery_code/general/plot_projections_and_annotations.py b/docs/gallery_code/general/plot_projections_and_annotations.py index 441dee245e..7a179f2afc 100644 --- a/docs/gallery_code/general/plot_projections_and_annotations.py +++ b/docs/gallery_code/general/plot_projections_and_annotations.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Plotting in Different Projections ================================= diff --git a/docs/gallery_code/general/plot_rotated_pole_mapping.py b/docs/gallery_code/general/plot_rotated_pole_mapping.py index a43a06e7a3..9919bea983 100644 --- a/docs/gallery_code/general/plot_rotated_pole_mapping.py +++ b/docs/gallery_code/general/plot_rotated_pole_mapping.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Rotated Pole Mapping ==================== diff --git a/docs/gallery_code/general/plot_zonal_means.py b/docs/gallery_code/general/plot_zonal_means.py index af3e83ce41..9b13b239b8 100644 --- a/docs/gallery_code/general/plot_zonal_means.py +++ b/docs/gallery_code/general/plot_zonal_means.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Zonal Mean Diagram of Air Temperature ===================================== diff --git a/docs/gallery_code/meteorology/plot_COP_1d.py b/docs/gallery_code/meteorology/plot_COP_1d.py index 099f3f80e9..8e308fd4a8 100644 --- a/docs/gallery_code/meteorology/plot_COP_1d.py +++ b/docs/gallery_code/meteorology/plot_COP_1d.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Global Average Annual Temperature Plot ====================================== diff --git a/docs/gallery_code/meteorology/plot_COP_maps.py b/docs/gallery_code/meteorology/plot_COP_maps.py index 79ebcad96d..a696ac2bc9 100644 --- a/docs/gallery_code/meteorology/plot_COP_maps.py +++ b/docs/gallery_code/meteorology/plot_COP_maps.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Global Average Annual Temperature Maps ====================================== diff --git a/docs/gallery_code/meteorology/plot_TEC.py b/docs/gallery_code/meteorology/plot_TEC.py index 67a2b2722e..66377ca39c 100644 --- a/docs/gallery_code/meteorology/plot_TEC.py +++ b/docs/gallery_code/meteorology/plot_TEC.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Ionosphere Space Weather ======================== diff --git a/docs/gallery_code/meteorology/plot_deriving_phenomena.py b/docs/gallery_code/meteorology/plot_deriving_phenomena.py index cc9e1c93ca..af849cd29a 100644 --- a/docs/gallery_code/meteorology/plot_deriving_phenomena.py +++ b/docs/gallery_code/meteorology/plot_deriving_phenomena.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Deriving Exner Pressure and Air Temperature =========================================== diff --git a/docs/gallery_code/meteorology/plot_hovmoller.py b/docs/gallery_code/meteorology/plot_hovmoller.py index ad8297ba79..2008c4c907 100644 --- a/docs/gallery_code/meteorology/plot_hovmoller.py +++ b/docs/gallery_code/meteorology/plot_hovmoller.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Hovmoller Diagram of Monthly Surface Temperature ================================================ diff --git a/docs/gallery_code/meteorology/plot_lagged_ensemble.py b/docs/gallery_code/meteorology/plot_lagged_ensemble.py index 4cb7e9e6ad..cd55253261 100644 --- a/docs/gallery_code/meteorology/plot_lagged_ensemble.py +++ b/docs/gallery_code/meteorology/plot_lagged_ensemble.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Seasonal Ensemble Model Plots ============================= diff --git a/docs/gallery_code/meteorology/plot_wind_barbs.py b/docs/gallery_code/meteorology/plot_wind_barbs.py index 9dce0caad2..af0ef7ada8 100644 --- a/docs/gallery_code/meteorology/plot_wind_barbs.py +++ b/docs/gallery_code/meteorology/plot_wind_barbs.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Plotting Wind Direction Using Barbs =================================== diff --git a/docs/gallery_code/meteorology/plot_wind_speed.py b/docs/gallery_code/meteorology/plot_wind_speed.py index beccb217c2..fc9cc94718 100644 --- a/docs/gallery_code/meteorology/plot_wind_speed.py +++ b/docs/gallery_code/meteorology/plot_wind_speed.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Plotting Wind Direction Using Quiver ==================================== diff --git a/docs/gallery_code/oceanography/plot_atlantic_profiles.py b/docs/gallery_code/oceanography/plot_atlantic_profiles.py index bd57e1dfe8..d8f016927e 100644 --- a/docs/gallery_code/oceanography/plot_atlantic_profiles.py +++ b/docs/gallery_code/oceanography/plot_atlantic_profiles.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Oceanographic Profiles and T-S Diagrams ======================================= diff --git a/docs/gallery_code/oceanography/plot_load_nemo.py b/docs/gallery_code/oceanography/plot_load_nemo.py index a26b97da31..275493ccef 100644 --- a/docs/gallery_code/oceanography/plot_load_nemo.py +++ b/docs/gallery_code/oceanography/plot_load_nemo.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Load a Time Series of Data From the NEMO Model ============================================== diff --git a/docs/gallery_code/oceanography/plot_orca_projection.py b/docs/gallery_code/oceanography/plot_orca_projection.py index 065078e5df..9008728a93 100644 --- a/docs/gallery_code/oceanography/plot_orca_projection.py +++ b/docs/gallery_code/oceanography/plot_orca_projection.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """ Tri-Polar Grid Projected Plotting ================================= From 5294ed89da73f91d7c3abba35401805782851020 Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Fri, 25 Sep 2026 14:06:42 +0100 Subject: [PATCH 4/9] add copyright header --- .../tutorial/plotting_examples/1d_quickplot_simple.py | 4 ++++ docs/src/user_manual/tutorial/plotting_examples/1d_simple.py | 4 ++++ .../user_manual/tutorial/plotting_examples/1d_with_legend.py | 4 ++++ docs/src/user_manual/tutorial/plotting_examples/brewer.py | 4 ++++ .../user_manual/tutorial/plotting_examples/cube_blockplot.py | 4 ++++ .../tutorial/plotting_examples/cube_brewer_cite_contourf.py | 4 ++++ .../tutorial/plotting_examples/cube_brewer_contourf.py | 4 ++++ .../user_manual/tutorial/plotting_examples/cube_contour.py | 4 ++++ .../user_manual/tutorial/plotting_examples/cube_contourf.py | 4 ++++ .../tutorial/plotting_examples/masking_brazil_plot.py | 4 ++++ .../tutorial/plotting_examples/masking_stereographic_plot.py | 4 ++++ .../tutorial/regridding_plots/interpolate_column.py | 4 ++++ .../tutorial/regridding_plots/regridded_to_global.py | 4 ++++ .../regridding_plots/regridded_to_global_area_weighted.py | 4 ++++ .../tutorial/regridding_plots/regridded_to_rotated.py | 4 ++++ .../user_manual/tutorial/regridding_plots/regridding_plot.py | 4 ++++ 16 files changed, 64 insertions(+) diff --git a/docs/src/user_manual/tutorial/plotting_examples/1d_quickplot_simple.py b/docs/src/user_manual/tutorial/plotting_examples/1d_quickplot_simple.py index 58d0918dcb..bca2cecad2 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/1d_quickplot_simple.py +++ b/docs/src/user_manual/tutorial/plotting_examples/1d_quickplot_simple.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Simple 1D plot using iris.quickplot.plot().""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/plotting_examples/1d_simple.py b/docs/src/user_manual/tutorial/plotting_examples/1d_simple.py index 4511a0fbe1..7b5fab1136 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/1d_simple.py +++ b/docs/src/user_manual/tutorial/plotting_examples/1d_simple.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Simple 1D plot using iris.plot.plot().""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/plotting_examples/1d_with_legend.py b/docs/src/user_manual/tutorial/plotting_examples/1d_with_legend.py index b325657766..97decb6e0b 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/1d_with_legend.py +++ b/docs/src/user_manual/tutorial/plotting_examples/1d_with_legend.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Simple 1D plot using iris.plot.plot() with a legend.""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/plotting_examples/brewer.py b/docs/src/user_manual/tutorial/plotting_examples/brewer.py index e42ad57cc0..fa370bfc4e 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/brewer.py +++ b/docs/src/user_manual/tutorial/plotting_examples/brewer.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Plot a chart of all Brewer colour schemes.""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/plotting_examples/cube_blockplot.py b/docs/src/user_manual/tutorial/plotting_examples/cube_blockplot.py index 1f4d3985a3..1432658c02 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/cube_blockplot.py +++ b/docs/src/user_manual/tutorial/plotting_examples/cube_blockplot.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Cube block plot using using iris.plot.pcolormesh().""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_cite_contourf.py b/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_cite_contourf.py index ab171bb6f2..4f0f69e9ee 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_cite_contourf.py +++ b/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_cite_contourf.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Adding a citation for a plot using iris.plot.citation().""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_contourf.py b/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_contourf.py index af6f05dba7..acd0e97443 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_contourf.py +++ b/docs/src/user_manual/tutorial/plotting_examples/cube_brewer_contourf.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Plot a cube with a Brewer colour palette using iris.quickplot.contourf().""" import matplotlib as mpl diff --git a/docs/src/user_manual/tutorial/plotting_examples/cube_contour.py b/docs/src/user_manual/tutorial/plotting_examples/cube_contour.py index e338d395ff..1ed35c00e4 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/cube_contour.py +++ b/docs/src/user_manual/tutorial/plotting_examples/cube_contour.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Simple contour plot of a cube. Can use iris.plot.contour() or iris.quicplot.contour(). diff --git a/docs/src/user_manual/tutorial/plotting_examples/cube_contourf.py b/docs/src/user_manual/tutorial/plotting_examples/cube_contourf.py index b76645b380..f18032953d 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/cube_contourf.py +++ b/docs/src/user_manual/tutorial/plotting_examples/cube_contourf.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Simple filled contour plot of a cube. Can use iris.plot.contour() or iris.quickplot.contour(). diff --git a/docs/src/user_manual/tutorial/plotting_examples/masking_brazil_plot.py b/docs/src/user_manual/tutorial/plotting_examples/masking_brazil_plot.py index fb7fbf888e..b030b72c64 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/masking_brazil_plot.py +++ b/docs/src/user_manual/tutorial/plotting_examples/masking_brazil_plot.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Global cube masked to Brazil and plotted with quickplot.""" import cartopy.io.shapereader as shpreader diff --git a/docs/src/user_manual/tutorial/plotting_examples/masking_stereographic_plot.py b/docs/src/user_manual/tutorial/plotting_examples/masking_stereographic_plot.py index 87ebae554f..c78fee67d3 100644 --- a/docs/src/user_manual/tutorial/plotting_examples/masking_stereographic_plot.py +++ b/docs/src/user_manual/tutorial/plotting_examples/masking_stereographic_plot.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Masking data with a stereographic projection and plotted with quickplot.""" import cartopy.crs as ccrs diff --git a/docs/src/user_manual/tutorial/regridding_plots/interpolate_column.py b/docs/src/user_manual/tutorial/regridding_plots/interpolate_column.py index 681af0c998..9a83596d95 100644 --- a/docs/src/user_manual/tutorial/regridding_plots/interpolate_column.py +++ b/docs/src/user_manual/tutorial/regridding_plots/interpolate_column.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Interpolate using iris.analysis.Linear().""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global.py b/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global.py index 8e43f1471a..b82bca329e 100644 --- a/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global.py +++ b/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Interpolate using iris.analysis.Linear().""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global_area_weighted.py b/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global_area_weighted.py index 6c906ba87b..9bba1a45cb 100644 --- a/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global_area_weighted.py +++ b/docs/src/user_manual/tutorial/regridding_plots/regridded_to_global_area_weighted.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Regrid using iris.analysis.AreaWeighted.""" import matplotlib.colors diff --git a/docs/src/user_manual/tutorial/regridding_plots/regridded_to_rotated.py b/docs/src/user_manual/tutorial/regridding_plots/regridded_to_rotated.py index 31afdb7da1..6f50f812fe 100644 --- a/docs/src/user_manual/tutorial/regridding_plots/regridded_to_rotated.py +++ b/docs/src/user_manual/tutorial/regridding_plots/regridded_to_rotated.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Rotated pole.""" import matplotlib.pyplot as plt diff --git a/docs/src/user_manual/tutorial/regridding_plots/regridding_plot.py b/docs/src/user_manual/tutorial/regridding_plots/regridding_plot.py index ed45822a51..713a5a5008 100644 --- a/docs/src/user_manual/tutorial/regridding_plots/regridding_plot.py +++ b/docs/src/user_manual/tutorial/regridding_plots/regridding_plot.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Plot regridded data.""" import matplotlib.pyplot as plt From 9e48cd97f2f4aa652dd504238f0350ca2b7489fc Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Fri, 25 Sep 2026 14:09:44 +0100 Subject: [PATCH 5/9] add copyright header --- docs/src/developers_guide/documenting/__init__.py | 5 +++++ .../src/developers_guide/documenting/docstrings_attribute.py | 4 ++++ .../documenting/docstrings_sample_routine.py | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/docs/src/developers_guide/documenting/__init__.py b/docs/src/developers_guide/documenting/__init__.py index 6e031999e7..29c855581f 100644 --- a/docs/src/developers_guide/documenting/__init__.py +++ b/docs/src/developers_guide/documenting/__init__.py @@ -1 +1,6 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. + # noqa: D104 diff --git a/docs/src/developers_guide/documenting/docstrings_attribute.py b/docs/src/developers_guide/documenting/docstrings_attribute.py index 1714373a62..7e84789ae6 100644 --- a/docs/src/developers_guide/documenting/docstrings_attribute.py +++ b/docs/src/developers_guide/documenting/docstrings_attribute.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Docstring attribute example.""" diff --git a/docs/src/developers_guide/documenting/docstrings_sample_routine.py b/docs/src/developers_guide/documenting/docstrings_sample_routine.py index 7feec6dbd0..37ee4f4487 100644 --- a/docs/src/developers_guide/documenting/docstrings_sample_routine.py +++ b/docs/src/developers_guide/documenting/docstrings_sample_routine.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Docstring routine example.""" From 1d9c60316bfea3fa630cf1eedfd859472456335d Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Fri, 25 Sep 2026 14:12:33 +0100 Subject: [PATCH 6/9] add copyright header --- noxfile.py | 4 ++++ setup.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/noxfile.py b/noxfile.py index a1d9907b02..dd74f3a5f3 100755 --- a/noxfile.py +++ b/noxfile.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Perform test automation with nox. For further details, see https://nox.thea.codes/en/stable/# diff --git a/setup.py b/setup.py index 1abe039771..ee8900d878 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,7 @@ +# Copyright Iris contributors +# +# This file is part of Iris and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Iris setup.""" import os From 8f46c1fe38e6c9b0fe9e98e14a3dd17b933f9bfd Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Fri, 25 Sep 2026 14:28:56 +0100 Subject: [PATCH 7/9] ruff fixes --- lib/iris/palette.py | 2 +- .../helpers/test_parse_cell_methods.py | 18 ++++++------------ .../cube_printout/test_CubePrintout.py | 6 ++++-- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/lib/iris/palette.py b/lib/iris/palette.py index 57efe77b52..c7499965a2 100644 --- a/lib/iris/palette.py +++ b/lib/iris/palette.py @@ -98,7 +98,7 @@ def _default_cmap_norm(args, kwargs): # Add default color map to keyword arguments. if len(cmaps): - cmap = sorted(cmaps, reverse=True)[0] + cmap = max(cmaps) kwargs["cmap"] = mpl_cm.get_cmap(cmap) # Perform default "norm" keyword behaviour. diff --git a/lib/iris/tests/unit/fileformats/nc_load_rules/helpers/test_parse_cell_methods.py b/lib/iris/tests/unit/fileformats/nc_load_rules/helpers/test_parse_cell_methods.py index e0da327693..63843c2bc9 100644 --- a/lib/iris/tests/unit/fileformats/nc_load_rules/helpers/test_parse_cell_methods.py +++ b/lib/iris/tests/unit/fileformats/nc_load_rules/helpers/test_parse_cell_methods.py @@ -64,14 +64,10 @@ def test_multiple(self): def test_comment(self): cell_method_strings = [ - "time: maximum (interval: 1 hr comment: first bit) " - "time: mean (interval: 1 day comment: second bit)", - "time : maximum (interval: 1 hr comment: first bit) " - "time: mean (interval: 1 day comment: second bit)", - "time: maximum (interval: 1 hr comment: first bit) " - "time : mean (interval: 1 day comment: second bit)", - "time : maximum (interval: 1 hr comment: first bit) " - "time : mean (interval: 1 day comment: second bit)", + "time: maximum (interval: 1 hr comment: first bit) time: mean (interval: 1 day comment: second bit)", + "time : maximum (interval: 1 hr comment: first bit) time: mean (interval: 1 day comment: second bit)", + "time: maximum (interval: 1 hr comment: first bit) time : mean (interval: 1 day comment: second bit)", + "time : maximum (interval: 1 hr comment: first bit) time : mean (interval: 1 day comment: second bit)", ] expected = ( CellMethod( @@ -125,10 +121,8 @@ def test_badly_formatted_warning(self): # "time: maximum (interval: 1 hr comment: first bit " # "time: mean (interval: 1 day comment: second bit)", "time", - "time: (interval: 1 hr comment: first bit) " - "time: mean (interval: 1 day comment: second bit)", - "time: maximum (interval: 1 hr comment: first bit) " - "time: (interval: 1 day comment: second bit)", + "time: (interval: 1 hr comment: first bit) time: mean (interval: 1 day comment: second bit)", + "time: maximum (interval: 1 hr comment: first bit) time: (interval: 1 day comment: second bit)", ] for cell_method_str in cell_method_strings: msg = ( diff --git a/lib/iris/tests/unit/representation/cube_printout/test_CubePrintout.py b/lib/iris/tests/unit/representation/cube_printout/test_CubePrintout.py index d1d47fd2d9..b9b178b58a 100644 --- a/lib/iris/tests/unit/representation/cube_printout/test_CubePrintout.py +++ b/lib/iris/tests/unit/representation/cube_printout/test_CubePrintout.py @@ -514,8 +514,10 @@ def test_section_cell_methods(self): "name / (1) (-- : 1)", " Cell methods:", " 0 area: stdev", - " 1 y: time: mean (interval: 10m" - " interval: 3min comment: vertical comment: =duration)", + ( + " 1 y: time: mean (interval: 10m" + " interval: 3min comment: vertical comment: =duration)" + ), ] assert expected == rep From 0aea4e95827956187f4120267e87950bf4783c24 Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Fri, 25 Sep 2026 14:37:16 +0100 Subject: [PATCH 8/9] ruff fix --- docs/src/developers_guide/documenting/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/src/developers_guide/documenting/__init__.py b/docs/src/developers_guide/documenting/__init__.py index 29c855581f..52f779003a 100644 --- a/docs/src/developers_guide/documenting/__init__.py +++ b/docs/src/developers_guide/documenting/__init__.py @@ -2,5 +2,4 @@ # # This file is part of Iris and is released under the BSD license. # See LICENSE in the root of the repository for full licensing details. - -# noqa: D104 +"""Docstring examples.""" From 5079239f82c99a43b2527cbfba1ea2ec8d694c62 Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Fri, 25 Sep 2026 14:44:01 +0100 Subject: [PATCH 9/9] zizmor fixes --- .github/workflows/ci-tests.yml | 10 +++++----- .github/workflows/ci-wheels.yml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 2fd5a0b6fc..1b1d3ac28b 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -73,14 +73,14 @@ jobs: echo "LOCK_FILE=requirements/locks/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV} - name: "data cache" - uses: ./.github/workflows/composite/iris-data-cache + uses: $/.github/workflows/composite/iris-data-cache with: cache_build: 6 env_name: ${{ env.ENV_NAME }} version: ${{ env.IRIS_TEST_DATA_VERSION }} - name: "conda package cache" - uses: ./.github/workflows/composite/conda-pkg-cache + uses: $/.github/workflows/composite/conda-pkg-cache with: cache_build: 6 cache_period: ${{ env.CACHE_PERIOD }} @@ -95,7 +95,7 @@ jobs: auto-update-conda: false - name: "conda environment cache" - uses: ./.github/workflows/composite/conda-env-cache + uses: $/.github/workflows/composite/conda-env-cache with: cache_build: 6 cache_period: ${{ env.CACHE_PERIOD }} @@ -108,14 +108,14 @@ jobs: conda list - name: "cartopy cache" - uses: ./.github/workflows/composite/cartopy-cache + uses: $/.github/workflows/composite/cartopy-cache with: cache_build: 6 cache_period: ${{ env.CACHE_PERIOD }} env_name: ${{ env.ENV_NAME }} - name: "nox cache" - uses: ./.github/workflows/composite/nox-cache + uses: $/.github/workflows/composite/nox-cache with: cache_build: 6 env_name: ${{ env.ENV_NAME }} diff --git a/.github/workflows/ci-wheels.yml b/.github/workflows/ci-wheels.yml index 67f72941a4..78c4f69fb1 100644 --- a/.github/workflows/ci-wheels.yml +++ b/.github/workflows/ci-wheels.yml @@ -80,7 +80,7 @@ jobs: echo "LOCK_FILE=requirements/locks/py$(echo ${{ matrix.python-version }} | tr -d '.')-linux-64.lock" >> ${GITHUB_ENV} - name: "conda package cache" - uses: ./.github/workflows/composite/conda-pkg-cache + uses: $/.github/workflows/composite/conda-pkg-cache with: cache_build: 0 cache_period: ${{ env.CACHE_PERIOD }} @@ -96,7 +96,7 @@ jobs: use-only-tar-bz2: true - name: "conda environment cache" - uses: ./.github/workflows/composite/conda-env-cache + uses: $/.github/workflows/composite/conda-env-cache with: cache_build: 0 cache_period: ${{ env.CACHE_PERIOD }} @@ -104,7 +104,7 @@ jobs: install_packages: "nox pip" - name: "nox cache" - uses: ./.github/workflows/composite/nox-cache + uses: $/.github/workflows/composite/nox-cache with: cache_build: 1 env_name: ${{ env.ENV_NAME }}