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
DM-26696: Fixes to fix_header usage #43
Conversation
timj
commented
Oct 30, 2020
- Trap bad corrections yaml files
- Add filename and obsid to MetadataTranslator.fix_header class method
If a YAML corrections file exists but is not in the right format because it uses lists or only has a comment but no mapping, ignore it and warn.
This lets people use the information in log messages.
To give the option of including it in log messages.
b27556a
to
b725d6c
Compare
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.
OK
|
||
def assertObservationInfo(self, header, check_wcs=True, wcs_params=None, **kwargs): # noqa: N802 | ||
def assertObservationInfo(self, header, filename=None, check_wcs=True, # noqa: N802 |
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 being dense, but what's the N802 infraction here?
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.
It's a naming complaint. This package tries to use underscores but in this particular method it's matching the non-standard convention of unittest.TestCase.
This allows all translators to use the filename+obsid or obsid depending on the availability of the filename.