-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Logger Widget 2 (based on #2700) #2867
Conversation
…NG/ERROR" instead of the initial five tabs
… INFO, DEBUG and ALL.
…8, where log level "ALL" was not added.
2. Moved the display logic to a function 3. Used a dictionary to manage colors for log levels. 4. Removed the if block from base.py
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
*beep* *bop* 29 W293 [*] Blank line contains whitespace
8 G004 [ ] Logging statement uses f-string
8 W291 [*] Trailing whitespace
7 E902 [ ] No such file or directory (os error 2)
3 FA102 [*] Missing `from __future__ import annotations`, but uses PEP 585 collection
2 E701 [ ] Multiple statements on one line (colon)
2 E999 [ ] SyntaxError: Expected an expression
2 W605 [*] Invalid escape sequence: `\A`
1 RET505 [ ] Unnecessary `else` after `return` statement
1 RET506 [ ] Unnecessary `else` after `raise` statement
1 I001 [*] Import block is un-sorted or un-formatted
1 W292 [*] No newline at end of file
1 D204 [*] 1 blank line required after class docstring
1 F401 [*] `IPython.display.display` imported but unused
1 TRY300 [ ] Consider moving this statement to an `else` block
Complete output(might be large): .github/workflows/codestyle.yml:7:4: E999 SyntaxError: Expected an expression
.github/workflows/codestyle.yml:21:8: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:25:11: E701 Multiple statements on one line (colon)
.github/workflows/codestyle.yml:30:11: E701 Multiple statements on one line (colon)
.github/workflows/codestyle.yml:38:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:40:15: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:44:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:53:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:57:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:65:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:77:26: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:81:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:89:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:100:22: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:101:89: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:103:84: W291 [*] Trailing whitespace
.github/workflows/codestyle.yml:119:1: W293 [*] Blank line contains whitespace
.github/workflows/codestyle.yml:123:1: W293 [*] Blank line contains whitespace
.mailmap:1:38: E999 SyntaxError: Expected an expression
docs/quickstart.ipynb:cell 12:1:39: W291 [*] Trailing whitespace
docs/quickstart.ipynb:cell 12:5:35: W291 [*] Trailing whitespace
docs/quickstart.ipynb:cell 16:10:26: W605 [*] Invalid escape sequence: `\A`
docs/quickstart.ipynb:cell 16:11:40: W605 [*] Invalid escape sequence: `\A`
docs/workflows/simple_workflow.ipynb:1:1: E902 No such file or directory (os error 2)
docs/workflows/standard_workflow.ipynb:1:1: E902 No such file or directory (os error 2)
tardis/io/logger/colored_logger.py:1:1: E902 No such file or directory (os error 2)
tardis/io/logger/logger.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/io/logger/logger.py:9:13: FA102 Missing `from __future__ import annotations`, but uses PEP 585 collection
tardis/io/logger/logger.py:18:13: FA102 Missing `from __future__ import annotations`, but uses PEP 585 collection
tardis/io/logger/logger.py:18:18: FA102 Missing `from __future__ import annotations`, but uses PEP 604 union
tardis/io/logger/logger.py:26:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:43:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:56:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:67:21: G004 Logging statement uses f-string
tardis/io/logger/logger.py:112:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:115:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:120:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:125:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:128:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:140:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:143:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:151:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:157:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:159:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:165:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:169:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:175:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:179:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:186:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:191:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:198:5: D204 [*] 1 blank line required after class docstring
tardis/io/logger/logger.py:201:1: W293 [*] Blank line contains whitespace
tardis/io/logger/logger.py:209:34: W292 [*] No newline at end of file
tardis/simulation/base.py:8:29: F401 [*] `IPython.display.display` imported but unused
tardis/simulation/base.py:197:13: RET506 Unnecessary `else` after `raise` statement
tardis/simulation/base.py:261:17: G004 Logging statement uses f-string
tardis/simulation/base.py:268:9: RET505 Unnecessary `else` after `return` statement
tardis/simulation/base.py:449:13: G004 Logging statement uses f-string
tardis/simulation/base.py:547:13: G004 Logging statement uses f-string
tardis/simulation/base.py:636:21: G004 Logging statement uses f-string
tardis/simulation/base.py:639:13: G004 Logging statement uses f-string
tardis/simulation/base.py:644:13: G004 Logging statement uses f-string
tardis/simulation/base.py:695:13: TRY300 Consider moving this statement to an `else` block
tardis/simulation/base.py:697:26: G004 Logging statement uses f-string
tardis/workflows/__init__.py:1:1: E902 No such file or directory (os error 2)
tardis/workflows/simple_tardis_workflow.py:1:1: E902 No such file or directory (os error 2)
tardis/workflows/standard_tardis_workflow.py:1:1: E902 No such file or directory (os error 2)
tardis/workflows/workflow_logging.py:1:1: E902 No such file or directory (os error 2)
Found 68 errors.
[*] 43 fixable with the `--fix` option (3 hidden fixes can be enabled with the `--unsafe-fixes` option).
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2867 +/- ##
==========================================
- Coverage 71.09% 69.68% -1.42%
==========================================
Files 213 215 +2
Lines 15824 16080 +256
==========================================
- Hits 11250 11205 -45
- Misses 4574 4875 +301 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
tardis/io/logger/logger.py
Outdated
print( | ||
"log_level is defined both in Functional Argument & YAML Configuration {debug section}" | ||
) | ||
print( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly odd for this to be two print statements. Also, even though this refers to the logger, I would still think this would be a logging statement and not a print message. Maybe just at Debug level so that it always displays.
docstr-cov seems to fail too, though I do see plenty of docstrings. |
*beep* *bop* Significantly changed benchmarks: All benchmarks: Benchmarks that have stayed the same:
| Change | Before [6e5ae60d] <master> | After [670d3738] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 41.3±20μs | 50.1±20μs | ~1.21 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission |
| | 541±200ns | 611±100ns | ~1.13 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 601±100ns | 541±100ns | ~0.90 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 3.36±0.6μs | 2.45±0.3μs | ~0.73 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 2.47±0ms | 2.50±0ms | 1.01 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 39.5±0s | 39.8±0.04s | 1.01 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 3.37±0.01ms | 3.35±0ms | 1.00 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 1.05±0m | 1.05±0m | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
| | 2.06±0m | 2.06±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 1.66±0.01ms | 1.65±0ms | 1.00 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 30.9±0.01μs | 31.1±0.04μs | 1.00 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
| | 62.5±0.4ms | 61.6±0.04ms | 0.99 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 3.01±0.5μs | 2.99±0.6μs | 0.99 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
| | 208±0.02ns | 203±0.1ns | 0.98 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
| | 1.21±0μs | 1.19±0μs | 0.98 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 1.35±0.4μs | 1.32±0.3μs | 0.98 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 2.38±0.4ms | 2.32±0.4ms | 0.98 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 6.05±0.6μs | 5.96±0.7μs | 0.98 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 42.1±20μs | 41.0±20μs | 0.97 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 1.97±1μs | 1.88±0.9μs | 0.96 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 571±100ns | 541±100ns | 0.95 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 760±0.6ns | 725±0.5ns | 0.95 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 20.6±5μs | 19.5±4μs | 0.95 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 7.54±1μs | 6.87±1μs | 0.91 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
If you want to see the graph of the results, you can check it here |
Closing since working on a Panel implementation in #2872 |
📝 Description
Type: 🪲
bugfix
| 🚀feature
| ☣️breaking change
| 🚦testing
| 📝documentation
| 🎢infrastructure
Refactors #2700
📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label