`logging.basicConfig` call in `mcs.py` configures the `root` logger, despite the module already having one

Open Beginner friendly
#180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

The problem is the logging.basicConfig call inside the MCS class in src/lomap/mcs.py (around line 655), which configures the root logger. Look at the module-level logger that the file already defines and check how the class's messages are emitted. Done means the class logs through that module logger, the root logger gets no new handler, and the existing tests in the repository still pass.

Written by the indexing model from the issue text.

Description

This line in mcs.py appears to change the root logger, adding a handler for the INFO level. This has the downstream impact that all messages sent to the root logger at this level and below are output in e.g. Jupyter once an MCS instance is initialized, creating a lot of unnecessary noise from any package that logs.

Instead, the MCS class should consider using the logger already initialized in the module.

Dominant language
Python
Stars
45
Forks
15
Avg merge
18h 11m
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenFreeEnergy/Lomap

All issues in OpenFreeEnergy/Lomap

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.