Dantro

Latest version: v0.20.2

Safety actively analyzes 714919 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 9

0.15.0

Features and Improvements
- !202 adds [meta-operations](https://dantro.readthedocs.io/en/latest/data_io/transform.html#meta-operations) to the data transformation framework (174), thereby allowing to define function-like constructs which help with modularization.
- !218 improves path handling within the data tree:
- Item access now allows accessing the parent object (via `../`) or the object itself (`./`), similar to navigating within POSIX paths.
- Addressing 220, error messages are improved to more accurately show where item access went wrong, and even provide a hint for the correct key.
- Features and improvements in the **plotting framework**:
- !222 adds the [`multiplot`](https://dantro.readthedocs.io/en/latest/plotting/plot_functions.html) function allowing configuration-based consecutive calls of any plot function that does not create a new figure and operates on the current axis. Most [`matplotlib`](https://matplotlib.org) plot functions, as well as many [`seaborn`](http://seaborn.pydata.org/index.html) plot functions, are readily accessible.
- !224 adds the `errorbars` plot, which supports faceting and is additionally available via `kind: errorbars` in the general `facet_grid` plot.
- !211 makes it possible to [use data transformation results inside other parts of the plot configuration](https://dantro.readthedocs.io/en/latest/plotting/plot_data_selection.html#using-data-transformation-results-in-the-plot-configuration), e.g. to specify plot helper arguments or `multiplot` arguments.
- !215 adds the [`auto_encoding` feauture](https://dantro.readthedocs.io/en/latest/plotting/plot_functions.html#auto-encoding-of-plot-layout) to the generic plot functions `facet_grid` and `errorbar`, allowing more data-averse plot configurations. (!221 and !224 improve it further.)
- !224 adds the [`make_facet_grid_plot` decorator](https://dantro.readthedocs.io/en/latest/plotting/plot_functions.html#add-custom-plot-kinds-that-support-faceting) which simplifies defining plots that support faceting.
Plot functions that are decorated like this will also become available as a plot `kind` in the general `facet_grid` plot.
- !225 improves error messages upon invalid `based_on` argument.
- Various `PlotHelper` improvements:
- !210 adds the `set_ticks` helper function, enabling setting tick locations and labels.
- !224 adds the seaborn-based `despine` helper, working on individual axes
- !224 adds distinctions between figure-level helpers and helpers that operate on a single axis.
- !224 adds the `track_handles_labels` method, which allows to keep track of artists that should appear in a legend.
The `set_legend` helper is extended accordingly and the `set_figlegend` function is added which supplies the same functionality but for a figure legend.
- !224 improves `set_suptitle` and `set_figlegend` such that the created artist no longer overlaps with the existing subplots grid.
- !224 allows to provide an axis object to `select_axis` to sync the `PlotHelper` to that axis.
- !225 lets the `PlotHelper` skip helper invocation if an axis has no artists associated with it; this reduces warnings arising from working on empty axes.
This behavior is enabled by default, but can be controlled for each helper via the `skip_empty_axes` argument.
- !207 improves the computation time for data selection in the `GraphGroup`.
- !208 addresses 199 by adding the `keep_dim` option in the `GraphGroup` to specify dimensions that are not squeezed during data selection.
- !217 improves the `GraphGroup`, now storing selection information as graph attribute (in `g.graph`) whenever data is added to the graph object.
- !204 makes pickling of the data tree possible. If building the data tree takes a long time, storing its structure to a tree cache file and restoring it can bring a speed-up.
- Data tree objects can be pickled and unpickled manually. To be more versatile, dantro now uses [dill](https://pypi.org/project/dill/) for pickling.
- The `DataManager.dump` method can be used to store the full tree.
- The `DataManager.restore` method allows to populate an existing `DataManager` with the content of a stored data tree, either clearing existing data or merging them.
- !205 adds default file path handling, controlled via the `default_tree_cache_path` argument to the `DataManager` or a class variable.
- !220 improves error messages upon missing data operations
- !223 improves the `LabelledDataGroup` selection interface, making it more consistent with xarray.
- !226 improves the performance of `KeyOrderedDict` and `IndexedDataGroup` by using insertion hints. This reduces the insertion complexity to constant for in-order or hinted insertions.
- **Minor API additions:**
- !204 implements `BaseDataGroup.clear` to remove all entries from a group.
- !204 adds the `overwrite` argument to `BaseDataGroup.recursive_update`.
- !204 adds the `BasicComparisonMixin`, which supplies a simple `__eq__` magic method.
- !216 extends the operations database with commonly used operations and makes operations on the `nx.` module easier.

Breaking changes and deprecations
- As of !204, the `PickleLoaderMixin` no longer allows choosing which load function to use via a class variable but _always_ uses `dill.load`.
- !226 removes the `print_params` argument of the `hdf5` data loader, replacing it with a trimmed down `progress_params` argument.
- With !224, the `errorbar` plot is deprecated in favour of the `errorbars` plot, which supports faceting.
- With the changes to path handling in !218, there are the following notable changes that depart from the behavior of the previous interface:
- In addition to the `/` character, names of data containers or group may no longer contain a set of characters (e.g. `*` or `?`) as these may interfere with operations on paths.
- The `BaseDataGroup.__contains__` method now returns true if the given path-like argument (e.g. `foo/bar`) is a valid argument to `__getitem__`
and there is an object at that path.
Previously, this check was implemented independently, thus behaving slightly differently.
For group- or container-like arguments, the behavior remains as it was: a non-recursive check whether the _object_ is part of this group, using `is` comparison.
- The `BaseDataGroup.new_group` method used to raise a `KeyError` if an intermediate path segment was not available; now, the intermediate groups will automatically be created and no such error is raised.

Bug fixes
- !205 addresses scipy netcdf warnings by requiring a more recent version.
- !206 fixes a regression in the [generic `errorbar` and `errorbands` plot functions](https://dantro.readthedocs.io/en/latest/plotting/plot_functions.html) where size-1 dimensions were not always squeezed out.
- !215 fixes passing on the file format to the `FileWriters`' `savefig` function in cases where it cannot be deduced from the filename.
- !214 makes dantro compatible to the latest h5py version, addressing 212, and sets the minimum version to 3.1.
- !211 fixes a bug that lead to an outdated `logstr` after renaming a group or container.
- !224 addresses an issue where a custom `style` context was lost upon a switch of animation mode (173)
- !223 fixes the handling of non-dimension coordinates and of the ``drop`` argument in the `LabelledDataGroup` selection interface (234)

Internal
- !209 addresses 125 by reformatting all code using [black](https://black.readthedocs.io/en/stable/).
- !209 sets up [pre-commit infrastructure](https://pre-commit.com/) to automate code formatting.
- !218 moves custom dantro exception types into their own module and provides a common base class.

0.14.1

- !199 and !201 update the GitLab CI/CD configuration using latest GitLab features, e.g. to show code coverage inside Merge Request diffs.
- !200 fixes an error in data operation `create_mask` when `data.name` was `None`

0.14.0

Features and Improvements
- `PlotHelper` extensions and improvements (94)
- !181 improves error message handling, now composing a single error message for _all_ encountered errors and providing axis-specific information on the errors.
- !181 extends `set_legend` to allow gathering handles and labels from already existing `matplotlib.legend.Legend` objects.
- !181 improves docstrings of helper methods to convey more clearly which kinds of arguments are expected.
- The plotting framework now *experimentally* supports skipping of plots.
Skipping is triggered via a custom `SkipPlot` exception, that users may raise in their plot functions.
Additionally, the `MultiversePlotCreator` allows skipping a plot if the dimensionality of the associated multiverse is not in a set of expected dimensionalities.
- Documentation:
- !163 adds the paper published in the [Journal of Open Source Software](https://joss.theoj.org) and corresponding information on how to cite it.
- !187 adds links to the source files from which example code is included into the documentation.
- !189 improves the names of the introductory guides, as proposed in 190.
- !190 makes using the IPython directive possible, simplifying the embedding of code examples, addressing 188.
- !190 adds a section describing the "Universe and Multiverse" terminology.
- Improvements of the README
- !186 adds a dependency table and adds the `dev` installation extra to include all development-related dependencies.
- !193 adds installation instructions for `conda` as an alternative to `pip` (see 184)

Bug fixes
- !185 renames licensing-related files in order to concur with the official LGPLv3 criteria and let [licensee](https://github.com/licensee/licensee/) correctly detect it.
- !184 addresses a bug in the `PlotHelper` that prevented helper invocations after the first error, see 181.

0.13.4

- !191 fixes a bug that prohibited a coordinate to be named `tolerance` in `UniversePlotCreator`, see 192.

0.13.3

- !183 fixes a bug in the specification of the `np.`, `xr.` and `scipy.` data operations.

0.13.2

- !181 adds DAG-based generic plot functions [`errorbar` and `errorbands`](https://dantro.readthedocs.io/en/latest/plotting/plot_functions.html).

Page 3 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.