Skip to content
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

Merged
merged 8 commits into from Nov 4, 2020
Merged

DM-26696: Fixes to fix_header usage #43

merged 8 commits into from Nov 4, 2020

Conversation

timj
Copy link
Member

@timj 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.
Copy link
Member

@RobertLuptonTheGood RobertLuptonTheGood left a 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
Copy link
Member

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?

Copy link
Member Author

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.
@timj timj merged commit 00cc688 into master Nov 4, 2020
@timj timj deleted the tickets/DM-26696 branch November 4, 2020 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants