-
-
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
Import datatree in xarray? #7418
Closed
Closed
Changes from 3 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7c6fa70
list datatree in public API
TomNicholas 5ef43be
attempt to import datatree API on xarray import
TomNicholas d184764
incorporate datatree links into io docs on groups
TomNicholas d986df3
Merge branch 'main' into import_datatree
TomNicholas d2e8ec3
add Dataset.to_datatree() method
TomNicholas 08ff5c4
Merge branch 'import_datatree' of https://github.com/TomNicholas/xarr…
TomNicholas 1401ca5
Merge branch 'main' into import_datatree
TomNicholas b153152
Merge branch 'main' into import_datatree
TomNicholas c5b8d10
add test that DataTree class can be imported
TomNicholas 62b5e27
add to every CI environment that also has flox
TomNicholas ffa53c4
also check we can import accessor
TomNicholas a8f752d
whatsnew
TomNicholas eed3a71
Merge branch 'import_datatree' of https://github.com/TomNicholas/xarr…
TomNicholas 3d3c29f
Update to_node docstring
TomNicholas 74fea3a
Merge branch 'main' into import_datatree
TomNicholas 95d76e6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] caafe90
test .to_datatree method
TomNicholas 462e0b3
Merge branch 'import_datatree' of https://github.com/TomNicholas/xarr…
TomNicholas 91c6ee1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] bc6a538
fix datatree import
TomNicholas 3baf79e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 667d5cd
protect my import from the exacting ruff linter
TomNicholas dfe763b
Merge branch 'import_datatree' of https://github.com/TomNicholas/xarr…
TomNicholas d231055
try installing datatree from main
TomNicholas ae07dfd
Update xarray/__init__.py
TomNicholas 6343104
also import accessor and open_datatree in top-level init
TomNicholas 395a3ae
importorskip whole test file
TomNicholas 7cf1d55
correct package name in wheels
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,12 @@ | |
# Disable minimum version checks on downstream libraries. | ||
__version__ = "999" | ||
|
||
try: | ||
from datatree import DataTree, open_datatree, register_datatree_accessor | ||
except ImportError: | ||
... | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is almost certainly a better way to make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is fine as a temporary solution.
TomNicholas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
# A hardcoded __all__ variable is necessary to appease | ||
# `mypy --strict` running in projects that import xarray. | ||
__all__ = ( | ||
|
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.
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.
Is that intentionally preformatted, or would it make sense to convert it to a link? (that's really minor, though)