Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

213 feature request switch from log class to python logging module #312

Conversation

dodu94
Copy link
Member

@dodu94 dodu94 commented Aug 7, 2024

Description

The custom Log class has been eliminated and the python standard logging module has been implemented instead. logging.INFO level messages are sent to the log file (same directory as before) while logging.WARNING level messages only are sent to console. To be reviewed after merge of PR #300

Fixes #213

Type of change

Please select what type of change this is.

  • Bug fix (non-breaking change which fixes an issue)
  • New benchmark
    • Non-breaking change which entirely uses exisiting classes, structure etc
    • Breaking change which has implemented new/modified classes etc
  • New feature
    • Non-breaking change which adds functionality
    • Breaking change fix or feature that would cause existing functionality to not work as expected

Testing

CI testing has been added as well as manual testing has been performed.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • General testing
    • New and existing unit tests pass locally with my changes
    • Coverage is >80%

@dodu94 dodu94 marked this pull request as ready for review August 7, 2024 10:28
@dodu94 dodu94 requested a review from alexvalentine94 August 7, 2024 10:28
@dodu94 dodu94 linked an issue Aug 7, 2024 that may be closed by this pull request
@dodu94 dodu94 requested a review from sbradnam September 13, 2024 15:37
Copy link
Collaborator

@alexvalentine94 alexvalentine94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduction of logging - changes are clear and also have been tested. There are possibly other areas of the code where print statements can be replaced.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we replace other print statements in this file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the print statements here should remain as they are, if removed, key informations would not be printed to video for the users. I added a few missing calls to log.info though to have a more complete log

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 64.70588% with 30 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
jade/gui.py 5.00% 19 Missing ⚠️
jade/computational.py 55.55% 4 Missing ⚠️
jade/postprocess.py 33.33% 4 Missing ⚠️
jade/configuration.py 0.00% 1 Missing ⚠️
jade/exceptions.py 50.00% 1 Missing ⚠️
jade/main.py 94.11% 1 Missing ⚠️
Files with missing lines Coverage Δ
jade/constants.py 100.00% <100.00%> (ø)
jade/excelsupport.py 99.65% <100.00%> (ø)
jade/output.py 70.98% <100.00%> (ø)
jade/status.py 87.82% <100.00%> (ø)
jade/testrun.py 65.77% <100.00%> (ø)
tests/configuration_test.py 100.00% <100.00%> (ø)
tests/excelsupport_test.py 100.00% <ø> (ø)
tests/main_test.py 100.00% <100.00%> (ø)
tests/testrun_test.py 100.00% <100.00%> (ø)
jade/configuration.py 66.23% <0.00%> (ø)
... and 5 more

@alexvalentine94 alexvalentine94 merged commit b86eb15 into developing Oct 4, 2024
9 checks passed
@alexvalentine94 alexvalentine94 deleted the 213-feature-request---switch-from-log-class-to-python-logging-module branch October 4, 2024 14:31
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.

[Feature request] - Switch from Log class to python logging module
2 participants