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

Changed Formatting for the logger based on Log Level #1710

Merged
merged 3 commits into from
Feb 23, 2022

Conversation

DhruvSondhi
Copy link
Contributor

@DhruvSondhi DhruvSondhi commented Jul 13, 2021

This PR aims to add Logging Formatting based on log level. Debug Level has different formatting due to the number of messages that would be printed to the strerr. All other logging level follow the existing formatting (with the \n\t formatting).

Description

Motivation and context

How has this been tested?

  • Testing pipeline.
  • Other.

Examples

Type of change

  • Bug fix.
  • New feature.
  • Breaking change.
  • None of the above.

Checklist

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
    • (optional) I have built the documentation on my fork following the instructions.
  • I have assigned and requested two reviewers for this pull request.

@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

1 similar comment
@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

Copy link
Contributor Author

@DhruvSondhi DhruvSondhi left a comment

Choose a reason for hiding this comment

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

Explained some of the changes done in this PR.

@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #1710 (119ff8c) into master (1c3322b) will decrease coverage by 0.76%.
The diff coverage is n/a.

❗ Current head 119ff8c differs from pull request most recent head 82b1e79. Consider uploading reports for the commit 82b1e79 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1710      +/-   ##
==========================================
- Coverage   62.65%   61.89%   -0.77%     
==========================================
  Files          65       63       -2     
  Lines        6036     5855     -181     
==========================================
- Hits         3782     3624     -158     
+ Misses       2254     2231      -23     
Impacted Files Coverage Δ
tardis/tardis/io/logger/logger.py 91.37% <0.00%> (-0.43%) ⬇️
tardis/tardis/simulation/base.py 82.88% <0.00%> (-0.29%) ⬇️
tardis/tardis/io/atom_data/base.py 89.77% <0.00%> (ø)
tardis/tardis/scripts/cmfgen2tardis.py 0.00% <0.00%> (ø)
tardis/tardis/grid/base.py
...dis/tardis/visualization/tools/convergence_plot.py
tardis/tardis/io/logger/montecarlo_tracking.py
tardis/tardis/io/logger/montecarlo_logger.py 59.25% <0.00%> (ø)
tardis/tardis/visualization/widgets/shell_info.py 96.00% <0.00%> (+0.04%) ⬆️
tardis/tardis/base.py 57.69% <0.00%> (+0.54%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea86abf...82b1e79. Read the comment docs.

@DhruvSondhi DhruvSondhi changed the title Changed Formatting for the logger based on Log Level & Removed existing Formatting Changed Formatting for the logger based on Log Level Jul 13, 2021
@DhruvSondhi DhruvSondhi marked this pull request as draft July 15, 2021 14:38
@@ -164,7 +164,7 @@ def from_hdf(cls, fname=None):
try:
dataframes[name] = store[name]
except KeyError:
logger.debug("Dataframe does not contain NAME column")
logger.debug(f"Dataframe does not contain {name} column")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andrewfullard @Rodot- This change needs to be merged. What should be done here? The PR will remain Draft.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants