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: Support new fix_header API #267

Merged
merged 3 commits into from Nov 4, 2020
Merged

DM-26696: Support new fix_header API #267

merged 3 commits into from Nov 4, 2020

Conversation

timj
Copy link
Member

@timj timj commented Oct 30, 2020

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

"""
modified = False

# Prefer filename to obsid for log messages
log_label = filename or obsid
Copy link
Member

Choose a reason for hiding this comment

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

Is this pattern documented? I might well have put both into the log message (I think your choice is fine)

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 not documented because it's currently a decision specifically for this method. We could have a class method that is given the file and obsid and returns a consistent string. You are allowed to put both in but you have to handle the case where there is no file known so we could instead do something like

log_label = f"{filename}:{obsid}" if filename else obsid

I'm fine either way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Following your comment above I have standardized this in a single method and switched all logging to use it. I did add the filename and obsid if filename is defined.

@timj timj merged commit 9763d8c into master Nov 4, 2020
@timj timj deleted the tickets/DM-26696 branch November 4, 2020 18:26
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