Skip to content

Delay message formatting#301

Open
fraimondo wants to merge 5 commits intomainfrom
enh/delay_msg_format
Open

Delay message formatting#301
fraimondo wants to merge 5 commits intomainfrom
enh/delay_msg_format

Conversation

@fraimondo
Copy link
Contributor

Currently, we have quite some calls to logger.debug and logger.info that print large messages, like this:

logger.info(f"Features: {X}")

The problem is that first the message is formatted and then the logging level is checked.

This PR introduces a mechanism to delay message formatting until the moment they are needed.

@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 92.59259% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.94%. Comparing base (225f225) to head (94f6e02).

Files with missing lines Patch % Lines
julearn/pipeline/pipeline_creator.py 91.66% 2 Missing ⚠️
julearn/prepare.py 77.77% 1 Missing and 1 partial ⚠️
julearn/model_selection/_skopt_searcher.py 66.66% 1 Missing ⚠️
...n/transformers/target/ju_generated_target_model.py 66.66% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (92.59%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #301      +/-   ##
==========================================
+ Coverage   89.92%   89.94%   +0.01%     
==========================================
  Files          58       58              
  Lines        2800     2825      +25     
  Branches      497      498       +1     
==========================================
+ Hits         2518     2541      +23     
- Misses        181      182       +1     
- Partials      101      102       +1     
Flag Coverage Δ
docs 100.00% <ø> (ø)
julearn 89.94% <92.59%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
julearn/api.py 88.77% <100.00%> (+0.06%) ⬆️
julearn/config.py 100.00% <100.00%> (ø)
julearn/model_selection/_optuna_searcher.py 84.09% <100.00%> (+0.36%) ⬆️
julearn/model_selection/available_searchers.py 94.44% <100.00%> (+0.15%) ⬆️
julearn/models/available_models.py 100.00% <100.00%> (ø)
julearn/scoring/available_scorers.py 90.41% <100.00%> (+0.13%) ⬆️
julearn/transformers/available_transformers.py 100.00% <100.00%> (ø)
julearn/transformers/dataframe/drop_columns.py 87.87% <100.00%> (+0.37%) ⬆️
julearn/transformers/dataframe/pick_columns.py 80.00% <100.00%> (+0.51%) ⬆️
julearn/transformers/dataframe/set_column_types.py 100.00% <100.00%> (ø)
... and 6 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

github-actions bot commented Mar 25, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://juaml.github.io/julearn/pr-preview/pr-301/

Built to branch gh-pages at 2026-03-25 14:00 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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.

2 participants