StingraySoftware / stingray

Anything can happen in the next half hour (including spectral timing made easy)!
https://stingray.science/stingray
MIT License
176 stars 144 forks source link

Eliminated the usage of astropy logging #799

Closed kr-2003 closed 9 months ago

kr-2003 commented 9 months ago

Encapsulated the logging setup in a function in a separate file(loggingconfig.py), then called this function from different files where logging is needed.

pep8speaks commented 9 months ago

Hello @kr-2003! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2024-02-11 20:25:16 UTC
kr-2003 commented 9 months ago

@matteobachetti Kindly review this PR.

matteobachetti commented 9 months ago

@kr-2003 could you post a screenshot of the new logger in action?

codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (5285c23) 96.35% compared to head (004f1ae) 94.37%.

Files Patch % Lines
stingray/filters.py 66.66% 1 Missing :warning:
stingray/pulse/accelsearch.py 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #799 +/- ## ========================================== - Coverage 96.35% 94.37% -1.98% ========================================== Files 43 44 +1 Lines 8784 8824 +40 ========================================== - Hits 8464 8328 -136 - Misses 320 496 +176 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kr-2003 commented 9 months ago
Screenshot 2024-02-11 at 6 35 35 PM Screenshot 2024-02-11 at 7 13 16 PM
kr-2003 commented 9 months ago

@matteobachetti Most of the changes were related to logging.info.

matteobachetti commented 9 months ago

@kr-2003 thanks for your contribution! Please note that there are tests failing related to the absence of a changelog (in towncrier format) and the formatting of files (using black). Please review the contribution workflow at https://docs.stingray.science/en/latest/contributing.html#contribution-workflow

kr-2003 commented 9 months ago

@matteobachetti I passed the tests related to towncrier and black. Now CI Tests / ci-tests (Slow tests on Linux, Py3.11, all deps and coverage, ubuntu-latest, 3.11, py311-test-all... (pull_request) Failing after 10m and codecov/project — 94.37% (-1.98%) compared to 5285c23 are failing.

kr-2003 commented 9 months ago

Actually logger.info is not getting coverage in two files.