Skip to content

Latest commit

 

History

History
377 lines (272 loc) · 12.2 KB

whats-new.rst

File metadata and controls

377 lines (272 loc) · 12.2 KB
.. currentmodule:: datatree

What's New

.. ipython:: python
    :suppress:

    import numpy as np
    import pandas as pd
    import xarray as xray
    import xarray
    import xarray as xr
    import datatree

    np.random.seed(123456)

v0.0.13 (unreleased)

New Features

Breaking changes

Deprecations

Bug fixes

Documentation

Internal Changes

v0.0.12 (03/07/2023)

New Features

Breaking changes

Deprecations

Bug fixes

Documentation

Internal Changes

v0.0.11 (01/09/2023)

Big update with entirely new pages in the docs, new methods (.drop_nodes, .filter, .leaves, .descendants), and bug fixes!

New Features

Breaking changes

Deprecations

Bug fixes

Documentation

Internal Changes

v0.0.10 (12/07/2022)

Adds accessors and a .pipe() method.

New Features

Breaking changes

Deprecations

Bug fixes

Documentation

Internal Changes

v0.0.9 (07/14/2022)

New Features

Breaking changes

Deprecations

Bug fixes

Documentation

Internal Changes

v0.0.7 (07/11/2022)

New Features

Breaking changes

  • The DataTree.ds attribute now returns a view onto an immutable Dataset-like object, instead of an actual instance of xarray.Dataset. This make break existing isinstance checks or assert comparisons. (:pull:`99`) By Tom Nicholas.

Deprecations

Bug fixes

  • Modifying the contents of a DataTree object via the DataTree.ds attribute is now forbidden, which prevents any possibility of the contents of a DataTree object and its .ds attribute diverging. (:issue:`38`, :pull:`99`) By Tom Nicholas.
  • Fixed a bug so that names of children now always match keys under which parents store them (:pull:`99`). By Tom Nicholas.

Documentation

  • Added Data Structures page describing the internal structure of a DataTree object, and its relation to xarray.Dataset objects. (:pull:`103`) By Tom Nicholas.
  • API page updated with all the methods that are copied from xarray.Dataset. (:pull:`41`) By Tom Nicholas.

Internal Changes

  • Refactored DataTree class to store a set of xarray.Variable objects instead of a single xarray.Dataset. This approach means that the DataTree class now effectively copies and extends the internal structure of xarray.Dataset. (:pull:`41`) By Tom Nicholas.
  • Refactored to use intermediate NamedNode class, separating implementation of methods requiring a name attribute from those not requiring it. By Tom Nicholas.
  • Made testing.test_datatree.create_test_datatree into a pytest fixture (:pull:`107`). By Benjamin Woods.

v0.0.6 (06/03/2022)

Various small bug fixes, in preparation for more significant changes in the next version.

Bug fixes

v0.0.5 (05/05/2022)

  • Major refactor of internals, moving from the DataTree.children attribute being a Tuple[DataTree] to being a OrderedDict[str, DataTree]. This was necessary in order to integrate better with xarray's dictionary-like API, solve several issues, simplify the code internally, remove dependencies, and enable new features. (:pull:`76`) By Tom Nicholas.

New Features

  • Syntax for accessing nodes now supports file-like paths, including parent nodes via "../", relative paths, the root node via "/", and the current node via ".". (Internally it actually uses pathlib now.) By Tom Nicholas.
  • New path-like API methods, such as .relative_to, .find_common_ancestor, and .same_tree.
  • Some new dictionary-like methods, such as DataTree.get and DataTree.update. (:pull:`76`) By Tom Nicholas.
  • New HTML repr, which will automatically display in a jupyter notebook. (:pull:`78`) By Tom Nicholas.
  • New delitem method so you can delete nodes. (:pull:`88`) By Tom Nicholas.
  • New to_dict method. (:pull:`82`) By Tom Nicholas.

Breaking changes

  • Node names are now optional, which means that the root of the tree can be unnamed. This has knock-on effects for a lot of the API.
  • The __init__ signature for DataTree has changed, so that name is now an optional kwarg.
  • Files will now be loaded as a slightly different tree, because the root group no longer needs to be given a default name.
  • Removed tag-like access to nodes.
  • Removes the option to delete all data in a node by assigning None to the node (in favour of deleting data by replacing the node's .ds attribute with an empty Dataset), or to create a new empty node in the same way (in favour of assigning an empty DataTree object instead).
  • Removes the ability to create a new node by assigning a Dataset object to ``DataTree.__setitem__`.
  • Several other minor API changes such as .pathstr -> .path, and from_dict's dictionary argument now being required. (:pull:`76`) By Tom Nicholas.

Deprecations

Bug fixes

Documentation

Internal Changes

  • Basically every file was changed in some way to accommodate (:pull:`76`).
  • No longer need the utility functions for string manipulation that were defined in utils.py.
  • A considerable amount of code copied over from the internals of anytree (e.g. in render.py and iterators.py). The Apache license for anytree has now been bundled with datatree. (:pull:`76`). By Tom Nicholas.

v0.0.4 (31/03/2022)

v0.0.3 (30/03/2022)

  • First released version available on both pypi (as xarray-datatree)!