This changes the behavior RAiDER.models.credentials.check_api to only update the one set of credentials in a .netrc file pertinent to RAiDER's operation instead of overwriting the file.
Motivation and Context
Fixes issue #638 where other credentials in .netrc can be lost.
How Has This Been Tested?
Unit tests were added that excerise check_api for every supported weather model to ensure check_api is behaving correctly, and crucially, that it no longer modifies unrelated .netrc credentials.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
[x] I have added an explanation of what your changes do and why you'd like us to include them.
[x] I have written new tests for your core changes, as applicable.
[x] I have successfully ran tests with your changes locally.
[ ] My change requires a change to the documentation.
Description
This changes the behavior
RAiDER.models.credentials.check_api
to only update the one set of credentials in a.netrc
file pertinent to RAiDER's operation instead of overwriting the file.Motivation and Context
Fixes issue #638 where other credentials in
.netrc
can be lost.How Has This Been Tested?
Unit tests were added that excerise
check_api
for every supported weather model to ensurecheck_api
is behaving correctly, and crucially, that it no longer modifies unrelated.netrc
credentials.Type of change
Checklist: