-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Consider renaming DataTree.ds and/or the data
argument in DataTree.__init__
#9458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That's a fair criticism.
We don't in the API, but we do everywhere in the examples, e.g.
A node and zero or more children, to be really pedantic. As the type of
This is fairly neat idea. The downsides are that "node" doesn't really imply data/dataset-like to me, and that currently we have a lot of explanation (and probably variable names / comments in code too) that uses "node" to mean " Essentially if a tree "node" is no longer the thing that stores data, but is the data itself, we need a new word for what used to be called the "node". (In computer science lingo I think we would call each In computer science terms a |
I think I'm way too deep in the weeds here, and would appreciate perspective from others in @pydata/xarray on what they think the most intuitive names for these parts of the tree would be. Now, before we release in |
Did we ever write the doc on DataTree terminology? That could be a good place to sort this all out. |
There is a short, outdated terminology page on the xarray-contrib/datatree docs, but I think that's it. Being able to make separate PRs for these docs additions before releasing I think is a reason to make a dedicated (temporary) branch for the datatree docs (see #9033 (comment)). |
How about simply PS: |
That makes the intent quite clear, but
👎 to this lol |
Thanks @dcherian for the suggestions. In the DataTree meeting today, we agreed to switch both names to |
Closed by #9476 |
What is your issue?
It is not inherently clear to that
DataTree(data=...)
andDataTree.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 anode
andchildren
, with optionalname
andparent
.Example usage:
CC @flamingbear @TomNicholas @eni-awowale @owenlittlejohns
The text was updated successfully, but these errors were encountered: