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
MAINT: Update use_header
handling
#1149
Conversation
Removed `use_header` as a standard kwarg for `load`. Adjusted deprecation warning to notify user of the end of support for the optional kwarg.
Updated basic tutorial by changing the description of the old `use_header` kwarg.
Removed the `use_header` kwarg from the test suite and updated the deprecation test.
Added a description of the changes to the changelog.
Appears that there's no new uncovered lines, just changes due to changes in the number of lines per file. |
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.
Testing this against other packages that still set use_header
on instrument instantiation, line 367 of _instrument.py produces an error when checking for other kwargs.
# Test for user supplied keys that are not used
missing_keys = []
for custom_key in kwargs:
if custom_key not in saved_keys and (custom_key not in exp_keys):
missing_keys.append(custom_key)
if len(missing_keys) > 0:
> raise ValueError('unknown keyword{:s} supplied: {:}'.format(
'' if len(missing_keys) == 1 else 's', missing_keys))
E ValueError: unknown keyword supplied: ['use_header']
../pysat/pysat/_instrument.py:367: ValueError
Probably need to check here as well
Make sure the `use_header` kwarg is allowed for `load` at initialization.
This would only appear if they apply |
Looks good. Works with pysatNASA tests now. |
Description
Partially addresses #1020 by removing
use_header
as a standard kwarg fromInstrument.load
. Updated the DeprecationWarning and removed unnecessary use ofuse_header
from the test suite.Type of change
Please delete options that are not relevant.
to not work as expected)
How Has This Been Tested?
Test Configuration:
Checklist:
develop
(notmain
) branchCHANGELOG.md
, summarizing the changesIf this is a release PR, replace the first item of the above checklist with the release
checklist on the wiki: https://github.com/pysat/pysat/wiki/Checklist-for-Release