Skip to content

Commit

Permalink
Add release notes to 0.8.0 (#387)
Browse files Browse the repository at this point in the history
* Add release notes for 0.8.0
  • Loading branch information
sandorkertesz authored May 28, 2024
1 parent f1fddd0 commit a322ce6
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 5 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"undoc-members",
"show-inheritance",
"show-module-summary",
"imported-members",
"inherited-members",
]
autoapi_root = "_api"
Expand Down
7 changes: 5 additions & 2 deletions docs/examples/shapefile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
"slideshow": {
"slide_type": ""
},
"tags": []
"tags": [],
"vscode": {
"languageId": "raw"
}
},
"source": [
"The code below reads shapefile data as a :ref:`source-data-file` source using :func:`from_source()`. Internally the data is represented as a geopandas dataframe. To make this example work geopandas **needs** to be installed."
"The code below reads shapefile data as a :ref:`data-sources-file` source using :func:`from_source()`. Internally the data is represented as a geopandas dataframe. To make this example work geopandas **needs** to be installed."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/sources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ polytope
:param str address: specify the address of the polytope service
:param str user_email: specify the user email credential. Must be used together with ``user_key``. This is an alternative to using the ``POLYTOPE_USER_EMAIL`` environment variable. *New in version 0.7.0*
:param str user_key: specify the user key credential. Must be used together with ``user_email``. This is an alternative to using the ``POLYTOPE_USER_KEY`` environment variable. *New in version 0.7.0*
:param bool stream: when ``True`` the data is read as a :ref:`stream <stremas>`. Otherwise it is retrieved into a file and stored in the :ref:`cache <caching>`. Stream-based access only works for :ref:`grib` and CoverageJson data. See details about streams :ref:`here <streams>`.
:param bool stream: when ``True`` the data is read as a :ref:`stream <streams>`. Otherwise it is retrieved into a file and stored in the :ref:`cache <caching>`. Stream-based access only works for :ref:`grib` and CoverageJson data. See details about streams :ref:`here <streams>`.
:param bool read_all: when ``True`` all the data is read into memory from a :ref:`stream <streams>`. Used when ``stream=True``. *New in version 0.8.0*
:param dict **kwargs: other keyword arguments, these can include options passed to the polytope-client_
Expand Down
7 changes: 7 additions & 0 deletions docs/guide/streams.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@ We can load the whole stream into memory by using ``read_all=True`` in :func:`fr
>>> ds = earthkit.data.from_source("url", url, stream=True, read_all=True)
>>> len(ds)
6
Further examples
-----------------

- :ref:`/examples/data_from_stream.ipynb`
- :ref:`/examples/fdb.ipynb`
- :ref:`/examples/url_stream.ipynb`
1 change: 1 addition & 0 deletions docs/release_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release notes
.. toctree::
:maxdepth: 1

version_0.8_updates
version_0.7_updates
version_0.6_updates
version_0.5_updates
Expand Down
31 changes: 31 additions & 0 deletions docs/release_notes/version_0.8_updates.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Version 0.8 Updates
/////////////////////////

Version 0.8.0
===============

Streams
++++++++++++

Refactored the stream source interface:

- added :py:meth:`~data.core.fieldlist.FieldList.batched` and :meth:`~data.core.fieldlist.FieldList.group_by` for stream and fieldlist like objects
- added the ``read_all`` option for :func:`from_source` to read all data into memory when ``stream=True``
- removed the ``batch_size`` and ``group_by`` kwargs from :func:`from_source`

See :ref:`here <streams>` for further details.


New features
++++++++++++++++

- the ``valid_datetime`` metadata key now yields a str in ISO 8601 format when used in :meth:`Field.metadata() <data.core.fieldlist.Field.metadata>` or :meth:`FieldList.metadata <data.core.fieldlist.FieldList.metadata>`. Previously datetime.datetime was returned.
- Removed warning when non default (non-forced) options in ``xarray_open_dataset_kwargs`` passed to :meth:`~data.readers.grib.index.GribFieldList.to_xarray` for GRIB data.
- Used warnings.warn() when forced kwargs (``errors`` or ``engine``) specified with non-default values to :meth:`~data.readers.grib.index.GribFieldList.to_xarray` for GRIB data.
- Enabled earthkit-data to be used in anemoi-datasets


Fixes
++++++

- Fixed issue when :func:`from_source` could not be used after importing GRIBReader.
2 changes: 1 addition & 1 deletion src/earthkit/data/core/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def geography(self):

@property
def gridspec(self):
r""":ref:`~data.core.gridspec.GridSpec`: Get grid description.
r""":class:`~data.core.gridspec.GridSpec`: Get grid description.
If it is not available None is returned.
"""
Expand Down

0 comments on commit a322ce6

Please sign in to comment.