This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Data structures docs #103
Merged
TomNicholas
merged 54 commits into
xarray-contrib:main
from
TomNicholas:data_structures_docs2
Jun 26, 2022
Merged
Data structures docs #103
TomNicholas
merged 54 commits into
xarray-contrib:main
from
TomNicholas:data_structures_docs2
Jun 26, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 52ef23b.
for more information, see https://pre-commit.ci
…s/datatree into data_structures_docs2
TomNicholas
commented
Jun 16, 2022
malmans2
approved these changes
Jun 20, 2022
We can update a datatree in-place using Python's standard dictionary syntax, similar to how we can for Dataset objects. | ||
For example, to create this example datatree from scratch, we could have written: | ||
|
||
# TODO update this example using ``.coords`` and ``.data_vars`` as setters, |
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.
did you forget to do this, or are you leaving it for another PR?
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 some undocumented bugs I noticed with trying to use .coords
since #41 I think, so I was going to leave that problem to a future PR.
flamingbear
pushed a commit
to flamingbear/rewritten-datatree
that referenced
this pull request
Jan 19, 2024
* sketching out changes needed to integrate variables into DataTree * fixed some other basic conflicts * fix mypy errors * can create basic datatree node objects again * child-variable name collisions dectected correctly * in-progres * add _replace method * updated tests to assert identical instead of check .ds is expected_ds * refactor .ds setter to use _replace * refactor init to use _replace * refactor test tree to avoid init * attempt at copy methods * rewrote implementation of .copy method * xfailing test for deepcopying * pseudocode implementation of DatasetView * Revert "pseudocode implementation of DatasetView" This reverts commit 52ef23baaa4b6892cad2d69c61b43db831044630. * removed duplicated implementation of copy * reorganise API docs * expose data_vars, coords etc. properties * try except with calculate_dimensions private import * add keys/values/items methods * don't use has_data when .variables would do * explanation of basic properties * add data structures page to index * revert adding documentation in favour of that going in a different PR * explanation of basic properties * add data structures page to index * create tree node-by-node * create tree from dict * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * dict-like interface * correct deepcopy tests * use .data_vars in copy tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * black * whatsnew * data contents * dictionary-like access * TODOs * test assigning int * allow assigning coercible values * simplify example using #115 * add note about fully qualified names Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds detailed explanation of the structure of a
DataTree
, trying to copy the style of the main xarray page on data structures.Builds on #41 in the sense that the explanation assumes that model.
pre-commit run --all-files
docs/source/whats-new.rst