Skip to content

Commit

Permalink
tidying for v3.16.3
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhassell committed Jan 28, 2025
1 parent 9e29106 commit 3d3d8d0
Show file tree
Hide file tree
Showing 30 changed files with 87 additions and 86 deletions.
6 changes: 3 additions & 3 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version NEXTVERSION
-------------------
version 3.16.3
--------------

**2024-12-??**
**2025-01-28**

* Allow ``'nearest_dtos'`` 2-d regridding to work with discrete
sampling geometry source grids
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ The `cf` package uses
[Dask](https://ncas-cms.github.io/cf-python/performance.html) for all
of its array manipulation and can:

* read field constructs from netCDF, CDL, PP and UM datasets,
* read field constructs from netCDF, CDL, PP and UM datasets with a
choice of netCDF backends,and in local, http, and s3 locations,
* create new field constructs in memory,
* write and append field and domain constructs to netCDF datasets on disk,
* read, create, and manipulate UGRID mesh topologies,
Expand Down
4 changes: 2 additions & 2 deletions cf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"""

__Conventions__ = "CF-1.11"
__date__ = "2024-??-??"
__version__ = "3.17.0"
__date__ = "2025-01-28"
__version__ = "3.16.3"

_requires = (
"numpy",
Expand Down
2 changes: 1 addition & 1 deletion cf/cfimplementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def initialise_CFANetCDF4Array(self, **kwargs):
def initialise_CFAH5netcdfArray(self, **kwargs):
"""Return a `CFAH5netcdfArray` instance.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand Down
2 changes: 1 addition & 1 deletion cf/data/array/cfah5netcdfarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
class CFAH5netcdfArray(CFAMixin, H5netcdfArray):
"""A CFA-netCDF array accessed with `h5netcdf`
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""
2 changes: 1 addition & 1 deletion cf/data/array/cfanetcdf4array.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
class CFANetCDF4Array(CFAMixin, NetCDF4Array):
"""A CFA-netCDF array accessed with `netCDF4`.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""
10 changes: 5 additions & 5 deletions cf/data/array/fullarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ def __init__(
{{init attributes: `dict` or `None`, optional}}
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
{{init source: optional}}
{{init copy: `bool`, optional}}
units: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
calendar: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
"""
Expand Down Expand Up @@ -123,7 +123,7 @@ def __str__(self):
def _get_array(self, index=None):
"""Returns the full array.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `__array__`, `index`
Expand Down Expand Up @@ -158,7 +158,7 @@ def _get_array(self, index=None):
def array(self):
"""Return an independent numpy array containing the data.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Returns:
Expand Down
2 changes: 1 addition & 1 deletion cf/data/array/h5netcdfarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class H5netcdfArray(
An active storage reduction may be enabled with the `actify`
method. See `cf.data.collapse.Collapse` for details.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""
4 changes: 2 additions & 2 deletions cf/data/array/mixin/activestoragemixin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class ActiveStorageMixin:
"""Mixin class for enabling active storage operations.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""

Expand All @@ -12,7 +12,7 @@ def active_storage(self):
Currently, active storage operations are allowed unless the
data are numerically packed.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Returns:
Expand Down
2 changes: 1 addition & 1 deletion cf/data/array/mixin/arraymixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _meta(self):
the actual metadata from the values. It does not force the
output to have the structure or dtype of the specified meta.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `dask.utils.meta_from_array`
Expand Down
18 changes: 9 additions & 9 deletions cf/data/array/mixin/cfamixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
class CFAMixin:
"""Mixin class for a CFA array.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""

def __new__(cls, *args, **kwargs):
"""Store fragment array classes.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""
# Import fragment array classes. Do this here (as opposed to
Expand Down Expand Up @@ -78,7 +78,7 @@ def __init__(
{{init unpack: `bool`, optional}}
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
instructions: `str`, optional
The ``aggregated_data`` attribute value as found on
Expand Down Expand Up @@ -134,26 +134,26 @@ def __init__(
'https://s3.fr-par.scw.cloud', 'client_kwargs':
{'region_name': 'fr-par'}}``
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
{{init attributes: `dict` or `None`, optional}}
If *attributes* is `None`, the default, then the
attributes will be set from the netCDF variable during
the first `__getitem__` call.
.. versionaddedd:: NEXTVERSION
.. versionaddedd:: 1.11.2.0
{{init source: optional}}
{{init copy: `bool`, optional}}
units: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
calendar: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
"""
Expand Down Expand Up @@ -226,7 +226,7 @@ def __init__(
def _parse_cfa(self, x, term, substitutions):
"""Parse the CFA aggregation instructions.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand Down Expand Up @@ -466,7 +466,7 @@ def get_fragment_shape(self):
def get_storage_options(self):
"""Return `s3fs.S3FileSystem` options for accessing S3 fragment files.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Returns:
Expand Down
4 changes: 2 additions & 2 deletions cf/data/array/netcdfarray.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class NetCDFArray:
"""A netCDF array accessed with `netCDF4`.
Deprecated at version NEXTVERSION and is no longer available. Use
Deprecated at version 1.11.2.0 and is no longer available. Use
`cf.NetCDF4Array` instead.
"""
Expand All @@ -11,6 +11,6 @@ def __init__(self, *args, **kwargs):
from ...functions import DeprecationError

raise DeprecationError(
f"{self.__class__.__name__} was deprecated at version NEXTVERSION "
f"{self.__class__.__name__} was deprecated at version 1.11.2.0 "
"and is no longer available. Use cf.NetCDF4Array instead."
)
14 changes: 7 additions & 7 deletions cf/data/array/umarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(
already been set will be inferred from the lookup
header and cached for future use.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
{{init source: optional}}
Expand All @@ -90,11 +90,11 @@ def __init__(
Deprecated at version 3.15.0.
units: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
calendar: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
"""
Expand Down Expand Up @@ -176,7 +176,7 @@ def __init__(
def _get_array(self, index=None):
"""Returns a subspace of the dataset variable.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `__array__`, `index`
Expand Down Expand Up @@ -276,7 +276,7 @@ def _get_rec(self, f, header_offset):
def _set_FillValue(self, int_hdr, real_hdr, attributes):
"""Set the ``_FillValue`` attribute.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand Down Expand Up @@ -314,7 +314,7 @@ def _set_units(self, int_hdr, attributes):
.. versionadded:: 3.14.0
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand Down Expand Up @@ -372,7 +372,7 @@ def _set_units(self, int_hdr, attributes):
def _set_unpack(self, int_hdr, real_hdr, attributes):
"""Set the ``add_offset`` and ``scale_factor`` attributes.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand Down
4 changes: 2 additions & 2 deletions cf/data/collapse/collapse_active.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def actify(method):
can be done in active storage, or the active storage reduction
failed) then the computations will be done locally "as usual".
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `active_chunk_function`
Expand Down Expand Up @@ -92,7 +92,7 @@ def active_chunk_function(method, *args, **kwargs):
reduction components, similar to that returned by a ``cf_*_chunk``
method, is returned.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `actify`
Expand Down
2 changes: 1 addition & 1 deletion cf/data/collapse/dask_collapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def cf_sum_of_weights2_chunk(
This function is passed to `dask.array.reduction` as its *chunk*
parameter.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand Down
4 changes: 2 additions & 2 deletions cf/data/dask_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def cf_units(a, from_units, to_units):
def cf_is_masked(a):
"""Determine whether an array has masked values.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand All @@ -436,7 +436,7 @@ def cf_is_masked(a):
def cf_filled(a, fill_value=None):
"""Replace masked elements with a fill value.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
:Parameters:
Expand Down
4 changes: 2 additions & 2 deletions cf/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ def _clear_after_dask_update(self, clear=None):
consistent with an updated `dask` array. See the *clear*
parameter for details.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `_del_Array`, `_del_cached_elements`,
`_set_dask`, `_cfa_del_write`
Expand Down Expand Up @@ -4068,7 +4068,7 @@ def masked_where(self, condition, inplace=False):
`masked_where` causes all delayed operations to be executed.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `mask`, `masked_values`, `where`
Expand Down
6 changes: 3 additions & 3 deletions cf/data/fragment/fullfragmentarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
{{init attributes: `dict` or `None`, optional}}
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
{{aggregated_units: `str` or `None`, optional}}
Expand All @@ -53,11 +53,11 @@ def __init__(
{{init copy: `bool`, optional}}
units: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
calendar: `str` or `None`, optional
Deprecated at version NEXTVERSION. Use the
Deprecated at version 1.11.2.0. Use the
*attributes* parameter instead.
"""
Expand Down
2 changes: 1 addition & 1 deletion cf/data/fragment/h5netcdffragmentarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class H5netcdfFragmentArray(FragmentArrayMixin, H5netcdfArray):
"""A netCDF fragment array accessed with `h5netcdf`.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""

Expand Down
2 changes: 1 addition & 1 deletion cf/data/fragment/mixin/fragmentarraymixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class FragmentArrayMixin:
def _get_array(self, index=None):
"""Returns a subspace of the dataset variable.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
.. seealso:: `__array__`, `index`
Expand Down
2 changes: 1 addition & 1 deletion cf/data/fragment/netcdf4fragmentarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class NetCDF4FragmentArray(FragmentArrayMixin, NetCDF4Array):
"""A netCDF fragment array accessed with `netCDF4`.
.. versionadded:: NEXTVERSION
.. versionadded:: 1.11.2.0
"""

Expand Down
Loading

0 comments on commit 3d3d8d0

Please sign in to comment.