Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.git_archival.txt export-subst
.git_archival.txt export-subst
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ for all the information you need to start on your Iris development journey.

Still need help or advice?

Then join us over on our [Iris GitHub Discussions](https://github.com/SciTools/iris/discussions). We'd love to hear from you!
Then join us over on our [Iris GitHub Discussions](https://github.com/SciTools/iris/discussions). We'd love to hear from you!
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ assignees: ''
## How To Reproduce
Steps to reproduce the behaviour:

1.
2.
3.
1.
2.
3.

## Expected behaviour
<!-- A clear and concise description of what you expected to happen -->

## Screenshots
<!-- If applicable, add screenshots to help explain your problem -->

## Environment
## Environment
- OS & Version: [e.g., Ubuntu 20.04 LTS]
- Iris Version: [e.g., From the command line run `python -c "import iris; print(iris.__version__)"`]

Expand All @@ -36,4 +36,3 @@ Steps to reproduce the behaviour:
Please add additional verbose information in this section e.g., code, output, tracebacks, screenshots etc
```
</details>

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ assignees: ''
Please add additional verbose information in this section e.g., references, screenshots, listings etc
```
</details>

2 changes: 1 addition & 1 deletion .github/workflows/benchmarks_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
then
first_commit=$(git log --after="$(date -d "1 day ago" +"%Y-%m-%d") 23:00:00" --pretty=format:"%h" | tail -n 1)
fi

if [ "$first_commit" != "" ]
then
nox -s benchmarks -- overnight $first_commit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ jobs:
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6
- uses: actions/labeler@v6
2 changes: 1 addition & 1 deletion .github/workflows/refresh-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Refresh Lockfiles
on:
workflow_dispatch:
schedule:
# Run once a week on a Saturday night
# Run once a week on a Saturday night
# N.B. "should" be quoted, according to
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
- cron: "1 0 * * 6"
Expand Down
82 changes: 59 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,67 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# See https://pre-commit.ci/#configuration
# See https://github.com/scientific-python/cookie#sp-repo-review

ci:
autofix_prs: false
autofix_commit_msg: "style: pre-commit fixes"
autoupdate_commit_msg: "chore: update pre-commit hooks"
autoupdate_schedule: "monthly"


# Alphabetised, for lack of a better order.
files: |
(?x)(
noxfile\.py|
setup\.py|
benchmarks\/.+\.py|
docs\/.+\.py|
lib\/.+\.py|
benchmarks\/.+\.py
noxfile\.py|
pyproject\.toml|
setup\.py|
)
minimum_pre_commit_version: 1.21.0

repos:

# Hook for pre-commit's built-in checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
# Check whether files parse as valid Python.
- id: check-ast
# Check for file name conflicts on case-insensitive filesytems.
# Check for file name conflicts on case-insensitive filesystems.
- id: check-case-conflict
# Check for files that contain merge conflict strings.
- id: check-merge-conflict
# Check for debugger imports and py37+ `breakpoint()` calls in Python source.
- id: debug-statements
# Check TOML file syntax.
- id: check-toml
# Check YAML file syntax.
- id: check-yaml
# Makes sure files end in a newline and only a newline.
# Duplicates Ruff W292 but also works on non-Python files.
- id: end-of-file-fixer
# Replaces or checks mixed line ending.
- id: mixed-line-ending
# Don't commit to main branch.
- id: no-commit-to-branch
# Trims trailing whitespace.
# Duplicates Ruff W291 but also works on non-Python files.
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.14.14"
# Hooks from all other repos
# NOTE : keep these in hook-name (aka 'id') order

- repo: https://github.com/adamchainz/blacken-docs
# This template does not keep up-to-date with versions, visit the repo to see the most recent release.
rev: 1.20.0
hooks:
- id: ruff
types: [file, python]
args: [--fix, --show-fixes]
- id: ruff-format
types: [file, python]
- id: blacken-docs
types: [file, rst]

- repo: https://github.com/codespell-project/codespell
rev: "v2.4.1"
Expand All @@ -50,18 +70,6 @@ repos:
types_or: [asciidoc, python, markdown, rst]
additional_dependencies: [tomli]

- repo: https://github.com/asottile/blacken-docs
rev: 1.20.0
hooks:
- id: blacken-docs
types: [file, rst]

- repo: https://github.com/aio-libs/sort-all
rev: v1.3.0
hooks:
- id: sort-all
types: [file, python]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.19.1'
hooks:
Expand All @@ -76,3 +84,31 @@ repos:
- id: numpydoc-validation
exclude: "^lib/iris/tests/|docs/gallery_code/"
types: [file, python]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.14.14"
hooks:
- id: ruff-check
types: [file, python]
args: [--fix, --show-fixes]
- id: ruff-format
types: [file, python]

- repo: https://github.com/aio-libs/sort-all
rev: v1.3.0
hooks:
- id: sort-all
types: [file, python]

- repo: https://github.com/scientific-python/cookie
rev: 2025.11.21
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
args: ["--show=errskip"]

- repo: https://github.com/abravalheri/validate-pyproject
# More exhaustive than Ruff RUF200.
rev: "v0.24.1"
hooks:
- id: validate-pyproject
62 changes: 31 additions & 31 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Release 1.4 (14 June 2013)
* Helper function for regridding that returns x and y coords
https://github.com/SciTools/iris/pull/437

* Added iris.tests.assertArrayAllClose
* Added iris.tests.assertArrayAllClose
https://github.com/SciTools/iris/pull/440

* Add bilinear interpolation between rectilinear grids.
Expand All @@ -38,7 +38,7 @@ Release 1.4 (14 June 2013)
* Experimental OPeNDAP functionality.
https://github.com/SciTools/iris/pull/422

* Experimental GeoTiff export functionality:
* Experimental GeoTiff export functionality:
`iris.experimental.raster.export_geotiff`

* Added a PEP8 test to ensure coding standards
Expand Down Expand Up @@ -91,41 +91,41 @@ Release 1.4 (14 June 2013)

* GRIB2 parameter translation
https://github.com/SciTools/iris/pull/482

* Added depth rules for bounds
https://github.com/SciTools/iris/pull/451

* Added a test for license checking of code files
https://github.com/SciTools/iris/pull/477

* Fixed netcdf save cubelist bug
https://github.com/SciTools/iris/pull/488

* Add an optimisation for single valued coordinate constraints
https://github.com/SciTools/iris/pull/428

* Improved error message within Cube.aggregated_by()
https://github.com/SciTools/iris/pull/504

* Change unit print-out
https://github.com/SciTools/iris/pull/465

* Modified linear() to handle non-scalar length one coords
https://github.com/SciTools/iris/pull/508

* Propagate all coord names in construct midpoint
https://github.com/SciTools/iris/pull/499

* Resolved pickling issues with deferred loading
https://github.com/SciTools/iris/pull/511

* Modified plot.py to pass coords arg through to _map_common()
https://github.com/SciTools/iris/pull/463

* Use cartopy v0.8.0
https://github.com/SciTools/iris/pull/494


Incompatible changes
--------------------
* As part of simplifying the mechanism for accessing test data
Expand Down Expand Up @@ -210,7 +210,7 @@ Features added
:func:`iris.analysis.interpolate.regrid()` to take place. A corresponding
method for cubes, :meth:`iris.cube.Cube.is_compatible()`, has also been
added.
* Printing a :class:`~iris.cube.Cube` is now more user friendly with regards
* Printing a :class:`~iris.cube.Cube` is now more user friendly with regards
to dates and time. All *time* and *forecast_reference_time* scalar coordinates
now display human readable date/time information.
* The units of a :class:`~iris.cube.Cube` are now shown when it is printed.
Expand Down Expand Up @@ -364,18 +364,18 @@ Deprecations

Release 0.9 (14 Aug, 2012)
==========================

Features added
--------------
* Iris is now an open source project. See `Iris on github <https://github.com/SciTools/iris>`_.
* Hybrid vertical coordinates are implemented with the new :class:`~iris.aux_factory.AuxCoordFactory`.
* More graceful loading of units. See `here <https://github.com/SciTools/iris/pull/17>`_ for more details.

Incompatible changes
--------------------
* The Iris data model is now fully aligned with the `CF data model <https://cf-pcmdi.llnl.gov/documents/cf-conventions/>`_ .
Iris remains file-format independent, as is the underlying CF data model.
* Cube merging has been re-written for the new CF data model with the benefit that some corner cases are now better handled.
* Cube merging has been re-written for the new CF data model with the benefit that some corner cases are now better handled.
Some users may find that their cubes, once merged, now have a smaller total shape and more intelligent handling of dimension coordinate picking.

Deprecations
Expand All @@ -388,7 +388,7 @@ Deprecations

Release 0.8 (29 May, 2012)
==========================

Features added
--------------
* Cube trajectory extraction now supports irregular grids (ORCA2) using nearest-neighbour interpolation.
Expand All @@ -402,7 +402,7 @@ Incompatible changes
the UK Met Office's internal `monty` library.
* The ability to read colour palettes from the UKMO IDL library has been
moved to the UK Met Office's internal `monty` library.

Deprecations
------------
* None
Expand All @@ -423,28 +423,28 @@ Features added
* NetCDF loading of multidimensional auxiliary data implemented, providing initial support for data with an ORCA grid.
* Extended the number of PP STASH code to standard name mappings.
* PP saving of non ``latitude, longitude`` cubes added.
* Cube merging has been upgraded to support optimisation of ``time``, ``forecast_period`` and
* Cube merging has been upgraded to support optimisation of ``time``, ``forecast_period`` and
``forecast_reference_time`` dimensionality.
* Added new gallery entry highlighting NetCDF support for rotated pole data.
* NetCDF saving should now be CF-1.5 compliant.
* Custom made colour palettes from the UKMO IDL library can now be loaded as matplotlib colour
palettes (see :func:`iris.clrtools.load_clr`).
* It is now possible to iterate over multiple cubes "in step", ensuring that the metadata is consistent between the
* It is now possible to iterate over multiple cubes "in step", ensuring that the metadata is consistent between the
given cubes (see :func:`iris.iterate.izip`).
* Cell methods will now appear in the printout of a cube.
* Supporting software dependency versions have been updated. Of particular note is matplotlib which has gone from version 1.0.1
up to `1.1.0 <https://matplotlib.sourceforge.net/users/whats_new.html#new-in-matplotlib-1-1>`_ . This may have a small impact on
some plot element placements.
some plot element placements.

Incompatible changes
--------------------
* The call signature for custom loader functions handled via :class:`~iris.io.format_picker.FormatSpecification` has changed.
* The call signature for custom loader functions handled via :class:`~iris.io.format_picker.FormatSpecification` has changed.
Previously the signature was ``loader(filename, callback)`` and now looks like ``loader(filenames, callback)`` where ``filenames``
is an iterable of filenames.
* Custom aggregators should now create :class:`iris.analysis.Aggregator` instances rather than defining
* Custom aggregators should now create :class:`iris.analysis.Aggregator` instances rather than defining
a the partial creation of an Aggregate (i.e. ``partial(iris.analysis.Aggregate, ...)`` becomes ``iris.analysis.Aggregator(...)``.
* PP STASH code ingestion is now stricter. In particular handling of partial stash codes (i.e. those without a model or section)
is no longer done, meaning that some cubes which previously had a standard name may no longer have a standard name.
* PP STASH code ingestion is now stricter. In particular handling of partial stash codes (i.e. those without a model or section)
is no longer done, meaning that some cubes which previously had a standard name may no longer have a standard name.
Further work is planned to support field code translation which should provide more robust and accurate PP interpretations.
* For parity with the CF-NetCDF community 'phenomenon_time' has now become 'time'.

Expand Down Expand Up @@ -478,16 +478,16 @@ Features added

Incompatible changes
--------------------
* The ``cube.coords`` dictionary has been replaced with the ``cube.coord`` and ``cube.coords`` methods
* The ``cube.coords`` dictionary has been replaced with the ``cube.coord`` and ``cube.coords`` methods
for easier identification of coordinates.
* ``iris.cdm.coords`` has been moved and separated to ``iris.coords and`` ``iris.coord_systems``.
* CF-netCDF global attributes are now put in the cube "attributes" dictionary rather than
as scalar cube coordinates. Additionally any "unused" CF-netCDF variable attributes are also put in the
as scalar cube coordinates. Additionally any "unused" CF-netCDF variable attributes are also put in the
cube "attributes" dictionary.

Deprecations
------------
* ``cube.axes`` is now deprecated and read-only. A coordinate's dimensions on a cube can be
* ``cube.axes`` is now deprecated and read-only. A coordinate's dimensions on a cube can be
found with the ``cube.coord_dims`` method. An interim cube convenience property
"axes" is provided to support legacy getter functionality.

Expand Down Expand Up @@ -524,5 +524,5 @@ Release 0.5 (31 Oct, 2011)

* Deferred data loading for Cubes loaded from netCDF.

* Pickle support for cubes. Pickling should be reserved for short term storage and
optimisation purposes only as pickle files will not be compatible across releases.
* Pickle support for cubes. Pickling should be reserved for short term storage and
optimisation purposes only as pickle files will not be compatible across releases.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,3 @@ prune tools
# files required to build iris.std_names module
include etc/cf-standard-name-table.xml
include tools/generate_std_names.py

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
lockfiles:
python tools/update_lockfiles.py -o requirements/locks requirements/py*.yml
python tools/update_lockfiles.py -o requirements/locks requirements/py*.yml
Loading
Loading