-
Notifications
You must be signed in to change notification settings - Fork 30
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 kwargs propagation in interfaces module #280
Conversation
- Code review for ioos#280
- Code review for ioos#280 - Rename **kw variables to the name of each library
- Use Optional[Dict] for all third-party libraries kwargs - Code review for ioos#280 Co-authored-by: Filipe <ocefpaf@gmail.com> Co-authored-by: Alex Kerney <abk@mac.com>
- Code review for ioos#280
- Code review for ioos#280
- Code review for ioos#280
Thanks for the code review, please have a look at 7c49ef6 too, I was having this problem before and I think this may be a good fix? |
- Code review for ioos#280
- Code review for ioos#280 - Rename **kw variables to the name of each library
- Use Optional[Dict] for all third-party libraries kwargs - Code review for ioos#280 Co-authored-by: Filipe <ocefpaf@gmail.com> Co-authored-by: Alex Kerney <abk@mac.com>
- Code review for ioos#280
- Code review for ioos#280
- Code review for ioos#280
7c49ef6
to
0ee3c96
Compare
@vinisalazar and @abkfenris I rebased this one and, hopefully, I did not screw it up! Do you mind taking a second look so we can merge this one? |
Hmm, I think the doc test failures we're seeing are the difference in call signatures between the various Lines 334 to 347 in f11ad16
vs What is more worrying is that they aren't being caught by other tests. While the new method matches up better to the underlying functions it breaks things for folks currently using |
Thanks @abkfenris for pointing that out. I found one use case in gliderpy which would surely break. Could this be a possible fix? It preserves the old def to_pandas(
self,
**kw
):
"""Save a data request to a pandas.DataFrame.
Accepts any `pandas.read_csv` keyword arguments, passed as a dictionary to pandas_kwargs.
This method uses the .csvp [1] response as the default for simplicity,
please check ERDDAP's documentation for the other csv options available.
[1] Download a ISO-8859-1 .csv file with line 1: name (units). Times are ISO 8601 strings.
"""
response = kw.pop("response", "csvp")
url = self.get_download_url(response=response, **kw)
return to_pandas(url, pandas_kwargs=dict(**kw)) |
- Code review for ioos#280
- Code review for ioos#280 - Rename **kw variables to the name of each library
- Use Optional[Dict] for all third-party libraries kwargs - Code review for ioos#280 Co-authored-by: Filipe <ocefpaf@gmail.com> Co-authored-by: Alex Kerney <abk@mac.com>
- Code review for ioos#280
- Code review for ioos#280
4ce66d9
to
5892908
Compare
- Code review for ioos#280
@ocefpaf we are getting a |
- Fix kwargs propagation for urlopen and third-party libraries - Improve docstrings - Add typing.Dict for type annotation
- Code review for ioos#280
- Code review for ioos#280 - Rename **kw variables to the name of each library
- Remove auth as positional arg for _nc_dataset method - Pass requests_kwargs dict in ERDDAP.to_xarray method - Remove kw.pop('auth') calls
Co-authored-by: Filipe <ocefpaf@gmail.com>
- Use Optional[Dict] for all third-party libraries kwargs - Code review for ioos#280 Co-authored-by: Filipe <ocefpaf@gmail.com> Co-authored-by: Alex Kerney <abk@mac.com>
- Code review for ioos#280
Adjust tests accordingly after the previous commit.
- Code review for ioos#280
- Code review for ioos#280
- Remove statements initialising empty dict for requests_kwargs - Modify arguments in urlopen function call
- Don't use conditional statements to create <third_party_lib>_kwargs dictionary
This ensures backwards-compatibility with the ERDDAP class. - Use old ERDDAP.to_pandas(**kw) behaviour - Revert 90389be which modified test_to_objects
- Use correct 'dataset_id' in 01a-griddap.ipynb - Convert longitude to required format
- Use ERDDAP Sensors Gold Standard server - Change constraints and dataset_id
- Same as 73128a7, but for xarray, iris, ncCF
ef26473
to
8322e67
Compare
I'll try to fix the docs later today. Let's get this one in! Sorry for the delay Vini! |
Hi,
This is something I caught while running the
ds = e.to_xarray(decode_times=False)
line in02-extras.ipynb
.Summary of changes