Skip to content

Unset loglevel in amici.sim.sundials._swig_wrappers#3150

Merged
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:loglvl
Mar 4, 2026
Merged

Unset loglevel in amici.sim.sundials._swig_wrappers#3150
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:loglvl

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Mar 3, 2026

This way, that logger will inherit the log level from its parents, and users can set the log level with, e.g.,
logging.getLogger("amici.sim.sundials").setLevel(logging.CRITICAL) without exposing any private modules.

Related to #3081.
`

@dweindl dweindl self-assigned this Mar 3, 2026
@dweindl dweindl requested a review from a team as a code owner March 3, 2026 21:11
This way, that logger will inherit the log level from its parents,
and users can set the log level with, e.g.,
`logging.getLogger("amici.sim.sundials").setLevel(logging.CRITICAL)`
without exposing any private modules.

Related to AMICI-dev#3081.
`
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.70%. Comparing base (8d42dcb) to head (1b871df).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3150      +/-   ##
==========================================
- Coverage   77.36%   76.70%   -0.66%     
==========================================
  Files         317      317              
  Lines       20628    20629       +1     
  Branches     1483     1484       +1     
==========================================
- Hits        15958    15823     -135     
- Misses       4662     4798     +136     
  Partials        8        8              
Flag Coverage Δ
cpp 70.42% <100.00%> (-0.02%) ⬇️
cpp_python 37.14% <100.00%> (+<0.01%) ⬆️
petab 47.16% <100.00%> (+<0.01%) ⬆️
python 68.89% <100.00%> (-0.01%) ⬇️
sbmlsuite-jax ?

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

Files with missing lines Coverage Δ
python/sdist/amici/logging.py 79.16% <100.00%> (ø)
python/sdist/amici/sim/sundials/__init__.py 86.66% <100.00%> (+0.95%) ⬆️
python/sdist/amici/sim/sundials/_swig_wrappers.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dweindl dweindl added this pull request to the merge queue Mar 4, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 4, 2026
@dweindl dweindl merged commit b179546 into AMICI-dev:main Mar 4, 2026
24 of 25 checks passed
@dweindl dweindl deleted the loglvl branch March 4, 2026 08:58
dweindl added a commit to dweindl/AMICI that referenced this pull request Mar 11, 2026
Since AMICI-dev#3150, there are log
messages related to changing loglevels during module imports.

I think, we only want notifications for changed loglevels for pre-existing loggers.

When we are changing the loglevel from debug to something higher,
we don't want to see yet another debug message. Therefore, log after
applying the new loglevel.
github-merge-queue bot pushed a commit that referenced this pull request Mar 11, 2026
Since #3150, there are log
messages related to changing loglevels during module imports.

I think, we only want notifications for changed loglevels for pre-existing loggers.

When we are changing the loglevel from debug to something higher,
we don't want to see yet another debug message. Therefore, log after
applying the new loglevel.
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