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

Fixed IPython Displaying the Plasma Stratification (Table) even when the Logger is turned Off #1739

Merged
merged 2 commits into from
Jul 20, 2021

Conversation

DhruvSondhi
Copy link
Contributor

@DhruvSondhi DhruvSondhi commented Jul 17, 2021

This PR aims to fix a bug that had been introduced when we merged #1684. Currently, the Plasma Stratification table is displayed even when the logger is turned off. This needed to be fixed. I have added the IPython App logger for considering the log level status when configuring the logger. This fixes the bug.

Description

Motivation and context

How has this been tested?

  • Testing pipeline.
  • Other.

Examples

This is the Current bug.
image

This is the fixed version.
image

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.

Preview Available here: https://dhruvsondhi.github.io/tardis/branch/fix_jupyter_display_log/io/optional/logging_configuration.html

@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.

@codecov
Copy link

codecov bot commented Jul 17, 2021

Codecov Report

Merging #1739 (e28c9f5) into master (eca735f) will not change coverage.
The diff coverage is n/a.

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

@@           Coverage Diff           @@
##           master    #1739   +/-   ##
=======================================
  Coverage   61.87%   61.87%           
=======================================
  Files          63       63           
  Lines        5852     5852           
=======================================
  Hits         3621     3621           
  Misses       2231     2231           
Impacted Files Coverage Δ
tardis/tardis/io/logger/logger.py 91.80% <0.00%> (ø)

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 eca735f...ec9100f. Read the comment docs.

@DhruvSondhi DhruvSondhi marked this pull request as draft July 18, 2021 15:30
@DhruvSondhi DhruvSondhi force-pushed the fix_jupyter_display_log branch from 335233a to af756ea Compare July 18, 2021 16:33
@DhruvSondhi DhruvSondhi marked this pull request as ready for review July 18, 2021 16:55
tardis/io/logger/logger.py Show resolved Hide resolved
tardis/io/logger/logger.py Outdated Show resolved Hide resolved
@DhruvSondhi DhruvSondhi force-pushed the fix_jupyter_display_log branch from ee06c8f to f1e4fe2 Compare July 19, 2021 14:56
@DhruvSondhi DhruvSondhi force-pushed the fix_jupyter_display_log branch from f1e4fe2 to 521b6b6 Compare July 19, 2021 14:57
import warnings
import pyne.data

Copy link
Member

Choose a reason for hiding this comment

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

why a newline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to demarcate the different levels of imports. Native library imports, imports from external modules, etc

@andrewfullard andrewfullard merged commit 2af6d0c into tardis-sn:master Jul 20, 2021
@DhruvSondhi DhruvSondhi deleted the fix_jupyter_display_log branch July 20, 2021 15:46
DhruvSondhi added a commit to DhruvSondhi/tardis that referenced this pull request Aug 1, 2021
…the Logger is turned Off (tardis-sn#1739)

* Fixed Ipython Display showing up even when the logger is turned off

* [build docs]
DhruvSondhi added a commit to DhruvSondhi/tardis that referenced this pull request Aug 9, 2021
…the Logger is turned Off (tardis-sn#1739)

* Fixed Ipython Display showing up even when the logger is turned off

* [build docs]
DhruvSondhi added a commit to DhruvSondhi/tardis that referenced this pull request Aug 9, 2021
…the Logger is turned Off (tardis-sn#1739)

* Fixed Ipython Display showing up even when the logger is turned off

* [build docs]
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
…the Logger is turned Off (tardis-sn#1739)

* Fixed Ipython Display showing up even when the logger is turned off

* [build docs]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants