-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
DAS-2155 - Merge datatree documentation into main docs. #9033
base: main
Are you sure you want to change the base?
DAS-2155 - Merge datatree documentation into main docs. #9033
Conversation
I would be fine with adding The only alternative I can think of would be to do this in a separate PR and merge that, then sync this PR with |
I agree with @keewis
This might a little neater, but the result is the same either way. |
@TomNicholas - So the alternative here is exposing things in the public API, then updating this PR to have the correct references and merging this afterwards? (Just checking I read your last comment correctly) Maybe I'm being a bit keen, but I'm tempted to keep both pieces (adding to the main API and including DataTree in the documentation) in the same PR to keep the documentation and public API in-sync. |
I have added |
…hildfree_tree_factory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are lots of little bitty things, but this looks great and the docs read well.
doc/user-guide/datatree.rst
Outdated
|
||
DataTrees | ||
--------- | ||
|
||
:py:class:`DataTree` is a tree-like container of :py:class:`xarray.DataArray` objects, organised into multiple mutually alignable groups. | ||
:py:class:`xarray.DataTree` is a tree-like container of :py:class:`xarray.DataArray` objects, organised into multiple mutually allignable groups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that misspelling was misspelled.
:py:class:`xarray.DataTree` is a tree-like container of :py:class:`xarray.DataArray` objects, organised into multiple mutually allignable groups. | |
:py:class:`xarray.DataTree` is a tree-like container of :py:class:`xarray.DataArray` objects, organised into multiple mutually alignable groups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed this doc back in the datatree contrib repo before starting this and except for my comments inline, this looks fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flamingbear - I've updated in most places you've suggested. Thanks for going through this so rigorously!
doc/user-guide/data-structures.rst
Outdated
|
||
Alternatively you can also create a ``DataTree`` object from | ||
|
||
- An ``xarray.Dataset`` using ``Dataset.to_node()`` (not yet implemented), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed it in the latest commit.
These should probably be added to the |
@TomNicholas - to clarify your previous comment about those exceptions: would you like those 3 exceptions added to the public I can definitely add them to the public API, but hadn't as those exceptions were not listed in #8572. |
@owenlittlejohns however it's already done for xarray's |
Thanks for the guidance. I just added those three exceptions to the public API, so they are now consistent with |
Co-authored-by: Matt Savoie <github@flamingbear.com>
I approved the changes here, but I don't know how to mark this as waiting for an event. (numpy 2) |
This PR migrates documentation for datatree from
xarray/datatree_/docs
into the maindoc
directory.It seems a little iffy that a bunch of the references to the
DataTree
class, associated methods and other migrated functions all need to point to lower level locations (such asxarray.core.datatree.DataTree
. WhenDataTree
and friends are added to the publicxarray
API these references can be significantly simplified. This makes me wonder if we should couple the documentation change with that ability to access these classes from the main public API? (And if so, whether this PR is the time to do it?)Tests addedwhats-new.rst
api.rst