Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codespell fixes #5546

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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