-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix for typo? in filetype docstring #208
base: main
Are you sure you want to change the base?
Conversation
I just ran into a minor, but confusing issue with the docstrings for the `filetype` input for `open_virtual_dataset`. When I look at the docstring (specifically [this line](https://github.com/zarr-developers/VirtualiZarr/blob/b34a1ee47572901ed6a3623c97d340157a0fa62a/virtualizarr/xarray.py#L61)), it suggests that this would work: ```python from virtualizarr import open_virtual_dataset vds = open_virtual_dataset( ..., filetype='netCDF3', ) ``` but it raises the following error <details> </details> the following works: ```python vds = open_virtual_dataset( ..., filetype='netcdf3', ) ``` Looking at the [tests](https://github.com/zarr-developers/VirtualiZarr/blob/b34a1ee47572901ed6a3623c97d340157a0fa62a/virtualizarr/tests/test_xarray.py#L341), I suspect this is simply a typo in the docstring (upercase `'CDF'` vs lowercase `'cdf'`), but maybe I am missing something? Happy to add more if desired.
@@ -58,7 +58,7 @@ def open_virtual_dataset( | |||
File path to open as a set of virtualized zarr arrays. | |||
filetype : FileType, default None | |||
Type of file to be opened. Used to determine which kerchunk file format backend to use. | |||
Can be one of {'netCDF3', 'netCDF4', 'HDF', 'TIFF', 'GRIB', 'FITS', 'zarr_v3'}. | |||
Can be one of {'netcdf3', 'netcdf4', 'hdf4', 'tiff', 'grib', 'fits', 'zarr_v3'}. |
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.
I am not entirely shure about the other cases here, specifically 'hdf4'
and 'hdf5'
?
This should work, because we call VirtualiZarr/virtualizarr/kerchunk.py Line 90 in b34a1ee
What error did you get? You didn't actually paste it into the comment above. |
Ughh I am a moron, haha. Let me change the test here to demonstrate. |
Hmm that is odd, I cannot reproduce this error here. I might have some time later to try to surface this again, sorry for the messyness.. |
I just ran into a minor, but confusing issue with the docstrings for the
filetype
input foropen_virtual_dataset
.When I look at the docstring (specifically this line), it suggests that this would work:
but it raises the following error
the following works:
Looking at the tests, I suspect this is simply a typo in the docstring (upercase
'CDF'
vs lowercase'cdf'
), but maybe I am missing something?Happy to add more if desired.
docs/releases.rst
api.rst