-
Notifications
You must be signed in to change notification settings - Fork 322
DOC: Dataset -> xr.DataArray #1146
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
base: main
Are you sure you want to change the base?
Conversation
In the docstring for `Scene.__init__`, rephrase the code example that was referring to `Dataset`. Use `xarray.DataArray` instead.
|
👉 View analysis in DeepCode’s Dashboard |
djhoese
left a comment
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.
We should probably have a Satpy-wide docstring review since the word Dataset probably appears a lot (sometimes referring to the xarray object, sometimes the legacy satpy object).
Could you rename the title of this PR to something that would work in the release notes? Our release process takes issue/PR titles and puts them in the change log.
Codecov Report
@@ Coverage Diff @@
## master #1146 +/- ##
==========================================
- Coverage 89.60% 89.60% -0.01%
==========================================
Files 200 200
Lines 29484 29484
==========================================
- Hits 26420 26419 -1
- Misses 3064 3065 +1
Continue to review full report at Codecov.
|
mraspaud
left a comment
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.
Looks good. Just some adjustment needed. I also agree with @djhoese about changing the title of the PR to something like Replace a mention of Dataset with DataArray in the documentation.
|
|
||
| scn = Scene() | ||
| scn['my_dataset'] = Dataset(my_data_array, **my_info) | ||
| scn['my_dataset'] = xr.DataArray(my_data_array, **my_info) |
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.
| scn['my_dataset'] = xr.DataArray(my_data_array, **my_info) | |
| scn['my_dataset'] = xr.DataArray(my_data_array, attrs=my_metadata) |
my_info is supposed to be metadata.
| then the available readers will be searched for a Reader that can support the provided files. This can take | ||
| a considerable amount of time so it is recommended that `reader` always be provided. Note without `filenames` | ||
| the Scene is created with no Readers available requiring Datasets to be added manually:: | ||
| the Scene is created with no Readers available requiring DataArrays to be added manually:: |
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.
could you make this link to the xarray api documentation ?
|
A user just bumped into this issue, saying that "creating a Dataset doesn't work" :) |
|
Just want to mention I've been using "product" as the generic term for DataArrays used in Satpy, especially when talking to people unfamiliar with xarray/python. Could be useful as an alternative to "dataset" for docstrings and documentation where we want it to be non-programmer friendly but also not confuse programmers familiar with xarray. |
In the docstring for
Scene.__init__, rephrase the code example that was referring toDataset. Usexarray.DataArrayinstead.flake8 satpy