scilus / scilpy

The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox
Other
60 stars 60 forks source link

Fix and uniformize verbose #905

Closed karanphil closed 7 months ago

karanphil commented 7 months ago

Quick description

Second attempt at uniformizing the verbose option. I added this line: logging.getLogger().setLevel(logging.getLevelName(args.verbose)) to all scripts, and modified the way the verbose argument is used (in scilpy.io.utils). I also cleaned a bit some modules, so when there was only debug logging, they are now info logging.

There might be some scripts like scil_dwi_compute_snr.py that used logging.info to print some results, but with the new default as warning, they won't work properly without -v. I don't know all the script in scilpy so I would need some help to know if I broke anything. :) ...

Type of change

Check the relevant options.

Provide data, screenshots, command line to test (if relevant)

...

Checklist

codecov[bot] commented 7 months ago

Codecov Report

Attention: 92 lines in your changes are missing coverage. Please review.

Comparison is base (1c4b850) 65.92% compared to head (24375d7) 66.47%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #905 +/- ## ========================================== + Coverage 65.92% 66.47% +0.54% ========================================== Files 386 386 Lines 21573 21655 +82 Branches 3540 3490 -50 ========================================== + Hits 14222 14395 +173 + Misses 5720 5671 -49 + Partials 1631 1589 -42 ``` | [Components](https://app.codecov.io/gh/scilus/scilpy/pull/905/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scilus) | Coverage Δ | | |---|---|---| | [Scripts](https://app.codecov.io/gh/scilus/scilpy/pull/905/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scilus) | `68.05% <79.53%> (+0.76%)` | :arrow_up: | | [Library](https://app.codecov.io/gh/scilus/scilpy/pull/905/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scilus) | `63.60% <69.56%> (+0.13%)` | :arrow_up: |