Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Should data nodes and tree nodes be unrelated classes? #4

Closed
@TomNicholas

Description

@TomNicholas

Currently a DatasetNode is both a node of the tree (so can have children) and can wrap a single xarray.Dataset. If we followed #3 , we could instead choose to make TreeNodes unable to wrap Datasets directly, in favour of instead storing Dataset objects as children.

This would mean that multiple Datasets could be stored as the children of a single node, but I'm not sure if that's desirable or not. It would also ensure that the class representing a node of the tree is totally distinct from an xarray.Dataset (neither inheriting from xarray.Dataset nor wrapping it, only pointing to it as a child).

In conjunction with #3 this would mean that the syntax for selecting the variable 'pressure' from the dataset stored under the node 'weather' would be simply dt['weather']['pressure']. (Although then selecting via dt['weather/pressure'] would become trickier.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions