Skip to content

Conversation

@abhijeetnardele24-hash
Copy link

Summary

Replaced print() statements with proper logging using logger.info() as requested in #467.

Changes

  • Replaced 5 print() statements in cosipy/pipeline/task/task.py with logger.info() calls
  • Affected functions: cosi_bindata() and cosi_threemlfit()
  • Logging was already imported and configured in the file

Fixes #467

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.80%. Comparing base (99bed81) to head (83729b8).
⚠️ Report is 21 commits behind head on develop.

Files with missing lines Coverage Δ
cosipy/data_io/UnBinnedData.py 92.83% <ø> (-0.03%) ⬇️

... and 1 file with indirect coverage changes

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

@israelmcmc
Copy link
Collaborator

Thanks @abhijeetnardele24-hash

  • The print() statemente in cosi_threemlfit are actually OK since this function is meant to be a commandline executable and the print() output will go to stdout. Can you please revert those?
  • Did you see where the "adding XXX ..." from combined_unbinned_data are coming from? I didn't see those in your changes.
  • @GallegoSav can you please confirm that these changes are what you meant to do with issue Remind me to remove the check for old file format for DC4 #428 ?

@GallegoSav
Copy link
Contributor

Thanks @abhijeetnardele24-hash

* The print() statemente in cosi_threemlfit are actually OK since this function is meant to be a commandline executable and the print() output will go to stdout. Can you please revert those?

* Did you see where the "adding XXX ..." from `combined_unbinned_data` are coming from? I didn't see those in your changes.

* @GallegoSav can you please confirm that these changes are what you meant to do with issue [Remind me to remove the check for old file format for DC4 #428](https://github.com/cositools/cosipy/issues/428) ?

@israelmcmc yes abhi's pr would resolve this issue as well

…f logger.info()

The cosi_threemlfit function is a command-line executable and its output
should go to stdout for user consumption, not to the logger.

Addresses reviewer feedback on PR cositools#468.
@GallegoSav GallegoSav merged commit 2dba754 into cositools:develop Feb 9, 2026
2 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.

Print() statement leftovers

4 participants