Skip to content

Consider renaming DataTree.ds and/or the data argument in DataTree.__init__ #9458

Closed
@shoyer

Description

@shoyer

What is your issue?

It is not inherently clear to that DataTree(data=...) and DataTree.ds refer to the same thing, or that it refers specifically to the dataset associated with the node. We also do not use the abbreviation .ds anywhere else in Xarray.

Instead, what about calling this argument node? This makes the data model of DataTree much more transparent, it's just a node and children, with optional name and parent.

Example usage:

tree = DataTree(node=Dataset(...))
tree.node = Dataset(...)

CC @flamingbear @TomNicholas @eni-awowale @owenlittlejohns

Metadata

Metadata

Assignees

No one assigned

    Labels

    API designtopic-DataTreeRelated to the implementation of a DataTree class

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions