-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Datatree import #8656
Datatree import #8656
Conversation
Define all Dataset properties on DataTree
…finition Add API methods in class definition
Expose dataset reduce operations
Add basic CI setup
* black reformatting * add setup.cfg to configure flake8/black/isort/mypy * add setup.cfg to configure flake8/black/isort/mypy xarray-contrib/datatree#22 * passes flake8 * disabled mypy for now Co-authored-by: Joseph Hamman <[email protected]>
* first attempt at to_netcdf * lint * add test for roundtrip and support empty nodes * Apply suggestions from code review Co-authored-by: Tom Nicholas <[email protected]> * update roundtrip test, improves empty node handling in IO Co-authored-by: Tom Nicholas <[email protected]>
* pseudocode ideas for generalizing map_over_subtree * pseudocode for a generalized map_over_subtree (still only one return arg) + a new mapping.py file * pseudocode for mapping but now multiple return values * pseudocode for mapping but with multiple return values * check_isomorphism works and has tests * cleaned up the mapping tests a bit * remove WIP from oter branch * ensure tests pass * map_over_subtree in the public API properly * linting
* add test for roundtrip and support empty nodes * update roundtrip test, improves empty node handling in IO * add zarr read/write support * support netcdf4 or h5netcdf * netcdf is optional, zarr too! * Apply suggestions from code review Co-authored-by: Tom Nicholas <[email protected]> Co-authored-by: Tom Nicholas <[email protected]>
* pseudocode ideas for generalizing map_over_subtree * pseudocode for a generalized map_over_subtree (still only one return arg) + a new mapping.py file * pseudocode for mapping but now multiple return values * pseudocode for mapping but with multiple return values * check_isomorphism works and has tests * cleaned up the mapping tests a bit * tests for mapping over multiple trees * incorrect pseudocode attempt to map over multiple subtrees * small improvements * fixed test * zipping of multiple arguments * passes for mapping over a single tree * successfully maps over multiple trees * successfully returns multiple trees * filled out all tests * checking types now works for trees with only one node * improved docstring
c9eb289
to
e137a35
Compare
b4f2199
to
25e8eab
Compare
And there it is, I've made a complete hash of this PR by merging in main from xarray. I suspect I will update with the full |
returns the exclusion to all pre-commit.ci
e293a7d
to
5eeef57
Compare
I think if we have the branch in this PR in its final state, cleaning it should be pretty easy: replay the merge commit on top of current |
I don't think we want the pre-commit.ci changes that happened in 8eb2aa3 though. I am fine doing this again in a new branch (I've already done it in flamingbear:import-datatree-attempt2 to work on open_datatree) with an additional single clean commit that has the information for skipping mypy, doctest and pre-commit.ci for edit: and actually if you wanted me to push up the final prepared datatree repo, you could work with that. I'm not sure what needs to happen to make this ready for merging. |
The conversation on this PR will stay, but won't make it into any of the commits. So I don't think we lose much by closing it instead of merging (in the end, PRs are just a way to discuss the changes from branches / commits). We could link to this PR from the merge commit, though. As far as making it ready for merging, I believe we only need to make sure it doesn't interfere with the rest of the repository (in particular CI and So I guess the packaging issue aside this should already be ready? |
Yes, I think this is ready, or I am ready to create a new one that references this one as needed. I am not sure what to do about excluding |
My naive approach would be to delete the directory before each build in the workflows?
probably - name: Build tarball and wheels
run: |
git clean -xdf
git restore -SW .
rm -rf xarray/datatree_
python -m build
|
it took me a while to figure that out, but a |
I've tried multiple ways to cherry-pick / rebase a merge commit, but I don't think this is going to work very well. So that leaves us with redoing the merge, and cherry-picking the commits you/we did to prepare the final merge on top of it (my goal is to do a fast-forward merge into Would you be up for doing that, @flamingbear? Otherwise I'll do it, but could you confirm that all the preparation you did on the |
I'm prepared to do that again. And I can confirm that rewritten-datatree is |
Well, if you're prepared to do that yourself I don't even need to know, I'll just verify the result and do the merge (and I've put the decision on whether to merge the cleaned version of this on the agenda of the meeting today) |
@keewis I have updated rewritten-datatree with the repository used in the cleaner PR: #8688 |
I missed this, I will add this to the skips ci commit in #8688 Edit: ✅ complete |
I hope you didn't understand this as me saying you have to use the state from |
Nope, I didn't think that, but in the interest of transparency I pushed up the full repo I had prepared locally. I'll go look at the note on the other pr. |
This PR imports xarray-contrib/datatree and its history to pydata/xarray/xarray/datatree_
Step one of issue #8572.
This imports the datatree code without exposing
DataTree
as a public API.git filter repo https://github.com/newren/git-filter-repo was used to preserve some history for the merge.
Datatree tags were renamed to
legacy-datatree-{tag}
:Links to xarray-contrib/datatree original PRs are preserved by rewriting the messages using a
replace-message
file.Links to the xarray-contrib/datatree Issues are preserved with a
replace-text
file.The datatree repo was relocated to a subdirectory
and the prepared datatree repository was added as a remote and merged into xarray.
This should allow work to begin on the rest of the steps in #8572