-
Notifications
You must be signed in to change notification settings - Fork 37
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
BUG/TST: support user and password kwargs in remote_file_list #652
Conversation
# Set the user-supplied kwargs | ||
if 'list_remote_files' in self.kwargs.keys(): | ||
kwargs = self.kwargs['list_remote_files'] | ||
else: | ||
kwargs = {} |
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.
Removed this since it reset the kwargs with the defaults rather than user-supplied options.
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.
The problem with talking this out is that it means that the user/password that you can set on instrument instantiation are no longer applied here. This needs to be changed to allow that, not removed.
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'm making a change and testing it.
Re-added the assignment of user kwargs at the Instrument level to the downstream methods.
# Don't overwrite kwargs supplied directly to this routine | ||
if user_key not in kwargs.keys(): | ||
kwargs[user_key] = self.kwargs[rtn_key][user_key] |
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.
@jklenzing I decided to prioritize kwargs supplied directly to the routine over those supplied to the Instrument.
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 fixed the thing that was broke, and it works as expected locally.
Tested this locally with the core package, as well as pysatMadrigal and pysatNASA. Everything is working as expected, with the exception of the three cases documented in pysatMadrigal. Looping in @rstoneback for a review. |
Oops. Didn't see the approval. Thanks! |
Description
Addresses pysat/pysatMadrigal#5
Currently, user and password are not supported by the
remote_file_list
andremote_date_range
methods. This updates the syntax to pass all kwargs through both routines.Additionally, updates the test class to pass these through for packages like pysatMadrigal.
Type of change
How Has This Been Tested?
Tested with the
tst/remote_file_list
branch of pysatMadrigal. See pysat/pysatMadrigal#38. Currently works with most of the methods there, but requires some bug fixes to some of the jro_isr data products.Or, to test all routines in the pysatMadrigal home directory
Test Configuration:
Checklist:
develop
(notmain
) branchCHANGELOG.md
, summarizing the changes