Adaptations necessary for deeevolab migration
In order to smoothly transition deeevolab from the deval
package to dantro, some minor adaptations to dantro became necessary.
These should not interfere with other parts of dantro, but be seen more as an enhancement and addition of minor features. All additions and changes are tested.
What does this MR do?
-
Base objects:
- Add an
ObjectContainer
class, which is a general container to store any object - Make
_format_info
a function that is not added as part of a mixin but already in theBaseDataGroup
- Lift the requirement of item access having to be a string; now also allow passing lists, which is the internally used object. This not only reduces string
split
and listjoin
operations, but also allows passing on non-string keys to the leafs of the data tree.
- Add an
-
Data loading:
- Make it possible to pass a base load configuration via class attributes
- Add a
PickleLoaderMixin
to load pickled objects; they are generated asObjectContainer
s - Adjust the
BaseDataManager
to allow loading entries into theattrs
of a data container or group- This happens via the key
load_as_attr
, which performs regular loading but then stores the object in the attributes of the already existing object attarget_path
- This happens via the key
-
Plotting:
- Ignore plot entries that start with
_
; this allows to specify yaml shortcuts in the same file
- Ignore plot entries that start with
- Minor cleanup, re-formatting, and improving documentation
Can this MR be accepted?
-
Implemented changes -
Tests written and/or adjusted -
Pipeline passing -
Added changelog entry -
Bumped version number
Edited by Utopia Developers