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-22576: Programmatic header fixups #34

Merged
merged 4 commits into from Dec 13, 2019
Merged

DM-22576: Programmatic header fixups #34

merged 4 commits into from Dec 13, 2019

Conversation

timj
Copy link
Member

@timj timj commented Dec 11, 2019

No description provided.

Copy link
Contributor

@PaulPrice PaulPrice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Only trivial suggestions.

python/astro_metadata_translator/headers.py Outdated Show resolved Hide resolved
python/astro_metadata_translator/headers.py Outdated Show resolved Hide resolved

@classmethod
def fix_header(cls, header):
header["DTSITE"] = "hi"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: what is DTSITE supposed to refer to?

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 header I picked at random from the test header that was being used. It has a value of "ct" in the header and I was checking that this callback triggered and changed it to "hi".

python/astro_metadata_translator/headers.py Outdated Show resolved Hide resolved
The file and resource checks are now private functions.
It's possible that some headers are so broken that the
code trying to fix them up can't work out something.
A date is a good example since an error parsing a date
in a header will cause many date-based corrections to
fail.

Log the problem and hope that a file-based correction
is put in place that allows the translator code to
function properly.
@timj timj merged commit af58843 into master Dec 13, 2019
@timj timj deleted the tickets/DM-22576 branch December 13, 2019 04:02
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