Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#5527)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0)
- [github.com/codespell-project/codespell: v2.2.5 → v2.2.6](codespell-project/codespell@v2.2.5...v2.2.6)

* codespell fixes (#5546)

* codespell fixes

* add whatsnew entry

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bill Little <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and bjlittle authored Oct 18, 2023
1 parent 69bbe98 commit 97ee9ac
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ minimum_pre_commit_version: 1.21.0

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
Expand All @@ -29,7 +29,7 @@ repos:
- id: no-commit-to-branch

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.5"
rev: "v2.2.6"
hooks:
- id: codespell
types_or: [asciidoc, python, markdown, rst]
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/cperf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def setup(self, file_type, three_d, three_times):
if three_d:
create_kwargs["n_levels"] = 71

# Will re-use a file if already present.
# Will reuse a file if already present.
file_path = make_cubesphere_testfile(**create_kwargs)

else:
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/generate_data/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _external(func_name_, temp_file_dir, **kwargs_):
)
if not REUSE_DATA or not save_path.is_file():
# The xios functions take control of save location so need to move to
# a more specific name that allows re-use.
# a more specific name that allows reuse.
actual_path = run_function_elsewhere(
_external,
func_name_=func_name,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/load/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def time_realise(self, _, __, ___, ____) -> None:


class STASHConstraint:
# xyz sizes mimic LoadAndRealise to maximise file re-use.
# xyz sizes mimic LoadAndRealise to maximise file reuse.
params = [[(2, 2, 2), (1280, 960, 5), (2, 2, 1000)], ["FF", "PP"]]
param_names = ["xyz", "file_format"]

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bm_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _prep_data_gen_env() -> None:
else:
echo("Setting up the data generation environment ...")
# Get Nox to build an environment for the `tests` session, but don't
# run the session. Will re-use a cached environment if appropriate.
# run the session. Will reuse a cached environment if appropriate.
_subprocess_runner(
[
"nox",
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery_code/meteorology/plot_COP_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main():
)

# Generate area-weights array. As e1 and a1b are on the same grid we can
# do this just once and re-use. This method requires bounds on lat/lon
# do this just once and reuse. This method requires bounds on lat/lon
# coords, so let's add some in sensible locations using the "guess_bounds"
# method.
e1.coord("latitude").guess_bounds()
Expand Down
4 changes: 4 additions & 0 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ This document explains the changes made to Iris for this release
#. `@fazledyn-or`_ replaced ``NotImplementedError`` with ``NotImplemented`` as
a proper method call. (:pull:`5544`)

#. `@bjlittle`_ corrected various comment spelling mistakes detected by
`codespell`_. (:pull:`5546`)


.. comment
Whatsnew author names (@github name) in alphabetical order. Note that,
Expand All @@ -120,4 +123,5 @@ This document explains the changes made to Iris for this release
Whatsnew resources in alphabetical order:
.. _NEP29 Drop Schedule: https://numpy.org/neps/nep-0029-deprecation_policy.html#drop-schedule
.. _codespell: https://github.com/codespell-project/codespell

2 changes: 1 addition & 1 deletion lib/iris/_deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class IrisDeprecation(UserWarning):
An Iris deprecation warning.
Note this subclasses UserWarning for backwards compatibility with Iris'
original deprection warnings. Should subclass DeprecationWarning at the
original deprecation warnings. Should subclass DeprecationWarning at the
next major release.
"""

Expand Down
4 changes: 2 additions & 2 deletions lib/iris/analysis/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ class UnstructuredNearestNeigbourRegridder:
"""

# TODO: cache the necessary bits of the operation so re-use can actually
# TODO: cache the necessary bits of the operation so reuse can actually
# be more efficient.
def __init__(self, src_cube, target_grid_cube):
"""
Expand Down Expand Up @@ -873,7 +873,7 @@ def __init__(self, src_cube, target_grid_cube):
def __call__(self, src_cube):
# Check the source cube X and Y coords match the original.
# Note: for now, this is sufficient to ensure a valid trajectory
# interpolation, but if in future we save + re-use the cache context
# interpolation, but if in future we save and reuse the cache context
# for the 'interpolate' call, we may need more checks here.

# Check the given cube against the original.
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/fileformats/netcdf/saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ def _add_inner_related_vars(
for element in sorted(
coordlike_elements, key=lambda element: element.name()
):
# Re-use, or create, the associated CF-netCDF variable.
# Reuse, or create, the associated CF-netCDF variable.
cf_name = self._name_coord_map.name(element)
if cf_name is None:
# Not already present : create it
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _add_iris_coord(cube, name, points, dim, calendar=None):
Add a Coord or other dimensional metadata to a Cube from a Pandas index or columns array.
"""
# Most functionality has been abstracted to _get_dimensional_metadata,
# allowing re-use in as_cube() and as_cubes().
# allowing reuse in as_cube() and as_cubes().
coord = _get_dimensional_metadata(name, points, calendar)

if coord.__class__ == DimCoord:
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/unit/analysis/test_PERCENTILE.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class ScipyAggregateMixin:
Tests for calculations specific to the default (scipy) function. Includes
tests on masked data and tests to verify that the function is called with
the expected keywords. Needs to be used with AggregateMixin, as some of
these tests re-use its method.
these tests reuse its method.
"""

Expand Down
4 changes: 2 additions & 2 deletions lib/iris/tests/unit/experimental/ugrid/mesh/test_Mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def setUpClass(cls):


class TestProperties1D(TestMeshCommon):
# Tests that can re-use a single instance for greater efficiency.
# Tests that can reuse a single instance for greater efficiency.
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down Expand Up @@ -737,7 +737,7 @@ def test___str__units_stdname(self):


class TestOperations1D(TestMeshCommon):
# Tests that cannot re-use an existing Mesh instance, instead need a new
# Tests that cannot reuse an existing Mesh instance, instead need a new
# one each time.
def setUp(self):
self.mesh = mesh.Mesh(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def _make_test_meshcoord(
edge_xs = self.EDGECOORDS_BASENUM + np.arange(n_edges)
face_xs = self.FACECOORDS_BASENUM + np.arange(n_faces)

# Record all these for re-use in tests
# Record all these for reuse in tests
self.n_faces = n_faces
self.n_nodes = n_nodes
self.face_xs = face_xs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def setUp(self):
)

def _test(self, geostationary=True):
# Re-usable test for when Geostationary is present OR absent.
# Reusable test for when Geostationary is present OR absent.
if geostationary:
# A Geostationary projection WILL be processed.
projection_spec = Geostationary
Expand Down

0 comments on commit 97ee9ac

Please sign in to comment.