Uh oh!
There was an error while loading. Please reload this page.
Move absolute path finder from open_mfdataset to own function - #7968
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| else: | ||
| paths = sorted(glob(_normalize_path(paths))) | ||
| elif isinstance(paths, os.PathLike): | ||
| paths = [os.fspath(paths)] |
There was a problem hiding this comment.
I know that this is just moved from the previous location, but is there a reason why we don't convert to absolute path here and below?
There was a problem hiding this comment.
I'm not sure, it's a little odd to me as well.
I haven't really felt the need for os.PathLike in my normal usage so I don't have much experience with that part though.
Co-authored-by: Michael Niklas <mick.niklas@gmail.com>
TomNicholas
commented
Jul 10, 2023
@Illviljan see also xarray-contrib/datatree#51 |
Illviljan
commented
Jul 10, 2023
@TomNicholas I've found the current open_datatree implementations too focused on zarr and netcdf. Which is fine, it's the most popular after all. |
* main: Remove hue_style from plot1d docstring (pydata#7925) Add new what's new section (pydata#7986) Release summary for v2023.07.0 (pydata#7979) Improve explanation in example "Working with Multidimensional Coordinates" (pydata#7984) Fix typo in zarr.py (pydata#7983) Examples added to docstrings (pydata#7936) [pre-commit.ci] pre-commit autoupdate (pydata#7973) Skip broken tests on python 3.11 and windows (pydata#7972) Use another repository for upstream testing (pydata#7970) Move absolute path finder from open_mfdataset to own function (pydata#7968) ensure no forward slashes in names for HDF5-based backends (pydata#7953) Chunked array docs (pydata#7951) [pre-commit.ci] pre-commit autoupdate (pydata#7959) manually unshallow the repository on RTD (pydata#7961) Update minimum version of typing extensions in pre-commit (pydata#7960) Docstring examples (pydata#7881)
A simple refactor to make it easier to retrieve the proper paths that
open_mfdatasetuses and passes on the engine.I've been thinking how to make use of DataTree and one idea I wanted to try was:
_find_absolute_path).xr.open_mfdataset(..., group=group)