Skip to content

Conversation

@jmeyers314
Copy link
Contributor

No description provided.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

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

Quick comment about log message conventions: (1) f-strings should not be used in debug log messages (I didn't comment on every place) (2) some of your logs are missing the %s.

posi = galsim.PositionI(pt.x//1, pt.y//1)
if logger:
logger.debug(f"Adding fake source at {pt}")
logger.debug(f"Adding fake source {gsObj} at {pt}")
Copy link
Member

Choose a reason for hiding this comment

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

I know there is some debate over f-strings in warning and info level messages but for debug we should be using deferred stringifcation so that the final string is only formed if the debug message is going to be issued.

'select'
)
if replace_dict:
self.log.debug("Replacing columns:", replace_dict)
Copy link
Member

Choose a reason for hiding this comment

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

This should be:

self.log.debug("Replacing columns: %s", replace_dict)

copy=False
)
if replace_dict:
self.log.debug("Replacing columns:", replace_dict)
Copy link
Member

Choose a reason for hiding this comment

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

Same as above. The log message should include the %s.

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.

3 participants