Skip to content

Avoid to invoke logging.info before calling logging.basicConfig. - #61

Merged
hzhangxyz merged 1 commit into
mainfrom
fix/missing-logging
Jul 2, 2025
Merged

Avoid to invoke logging.info before calling logging.basicConfig.#61
hzhangxyz merged 1 commit into
mainfrom
fix/missing-logging

Conversation

@hzhangxyz

Copy link
Copy Markdown
Member

Description

When we call logging.info before calling logging.basicConfig, logging.basicConfig may fail, so in the previous code, if our electron number is missing, we would see an empty logging. So this commit does not logging the information about missing electron number instead to save the logging basic config.

Checklist:

When we call logging.info before calling logging.basicConfig,
logging.basicConfig may fail, so in the previous code, if our electron number is
missing, we would see an empty logging. So this commit does not logging the
information about missing electron number instead to save the logging basic
config.
Copilot AI review requested due to automatic review settings July 1, 2025 15:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the logging.info call that was previously invoked before logging.basicConfig is set up, to avoid potential logging configuration issues. Additionally, the code comment for electron_number has been updated to clarify its behavior for half-filling.

  • Removed the logging.info call in the post_init method.
  • Updated the comment for electron_number to indicate it remains empty for half-filling.
Comments suppressed due to low confidence (1)

qmb/hubbard.py:40

  • If the removed logging message provided valuable debugging information, consider documenting this behavior or reintroducing logging after logging.basicConfig is correctly set up.
            self.electron_number = self.m * self.n

@hzhangxyz
hzhangxyz requested a review from CuSO4Deposit July 1, 2025 15:14
@hzhangxyz

Copy link
Copy Markdown
Member Author

手动at @stevapple @CuSO4Deposit @msg-bq @BrevityD

@hzhangxyz
hzhangxyz merged commit 5a1b5a9 into main Jul 2, 2025
8 checks passed
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