-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix DataTree.coords.__setitem__
by adding DataTreeCoordinates
class
#9451
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
Merged
TomNicholas
merged 50 commits into
pydata:main
from
TomNicholas:datatree_coords_setitem
Sep 11, 2024
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
704db79
add a DataTreeCoordinates class
TomNicholas 417e3e9
passing read-only properties tests
TomNicholas 9562e92
tests for modifying in-place
TomNicholas 0e7de82
WIP making the modification test pass
TomNicholas 839858f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9370b9b
get to the delete tests
TomNicholas 9b50567
test
TomNicholas c466f8d
improve error message
TomNicholas 0397eca
implement delitem
TomNicholas 85bb221
test KeyError
TomNicholas 7802c63
Merge branch 'delitem' into datatree_coords_setitem
TomNicholas 1bf5082
subclass Coordinates instead of DatasetCoordinates
TomNicholas e8620cf
use Frozen(self._data._coord_variables)
TomNicholas 1108504
Simplify when to raise KeyError
TomNicholas 0a7201b
correct bug in suggestion
TomNicholas 51e11bc
Update xarray/core/coordinates.py
TomNicholas 7ecdd16
simplify _update_coords by creating new node data first
TomNicholas dfcdb6d
Merge branch 'main' into datatree_coords_setitem
TomNicholas 3278153
Merge branch 'main' into datatree_coords_setitem
TomNicholas f672c5e
update indexes correctly
TomNicholas 7fb1622
passes test
TomNicholas 897b7c4
update ._drop_indexed_coords
TomNicholas b5a56f4
Merge branch 'main' into datatree_coords_setitem
TomNicholas fdae5bc
some mypy fixes
TomNicholas 9dc845a
remove the apparently-unused _drop_indexed_coords method
TomNicholas 6595fe9
Merge branch 'datatree_coords_setitem' of https://github.com/TomNicho…
TomNicholas ed87554
fix import error
TomNicholas c155bc1
test that Dataset and DataArray constructors can handle being passed …
TomNicholas 217cb84
test dt.coords can be passed to DataTree constructor
TomNicholas 540bb0f
improve readability of inline comment
TomNicholas 7126efa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8486227
initial tests with inherited coords
TomNicholas 12f24df
Merge branch 'datatree_coords_setitem' of https://github.com/TomNicho…
TomNicholas 8f09c93
ignore typeerror indicating dodgy inheritance
TomNicholas d23105f
try to avoid Unbound type error
TomNicholas 978e05e
cast return value correctly
TomNicholas bd47575
cehck that .coords works with inherited coords
TomNicholas 8ef94df
Merge branch 'main' into datatree_coords_setitem
TomNicholas 10b8a78
Merge branch 'main' into datatree_coords_setitem
TomNicholas b9ede22
fix data->dataset
TomNicholas 540a825
fix return type of __getitem__
TomNicholas b30d5e0
Use .dataset instead of .to_dataset()
TomNicholas 639ad07
_check_alignment -> check_alignment
TomNicholas 0a9a328
remove dict comprehension
TomNicholas 80bc0bd
KeyError message formatting
TomNicholas a366bf6
keep generic types for .dims and .sizes
TomNicholas 4d352bd
test verifying you cant delete inherited coord
TomNicholas 4626fa8
fix mypy complaint
TomNicholas ea8a195
type hint as accepting objects
TomNicholas af94af4
update note about .dims returning all dims
TomNicholas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.