-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
Adds a missing import in custom_abundance.py #2942
base: master
Are you sure you want to change the base?
Conversation
*beep* *bop* 2 RET505 [ ] Unnecessary `else` after `return` statement
2 F811 [ ] Redefinition of unused `input_d_time_0_eventhandler` from line 1714
2 UP032 [*] Use f-string instead of `format` call
1 RET506 [ ] Unnecessary `else` after `raise` statement
1 SIM103 [*] Return the condition directly
1 I001 [*] Import block is un-sorted or un-formatted
1 E712 [*] Avoid equality comparisons to `True`; use `if obj.new:` for truth checks
1 UP031 [*] Use format specifiers instead of percent format
Complete output(might be large): tardis/visualization/widgets/custom_abundance.py:2:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/custom_abundance.py:33:60: F811 [*] Redefinition of unused `quantity_linspace` from line 17
tardis/visualization/widgets/custom_abundance.py:605:47: UP032 [*] Use f-string instead of `format` call
tardis/visualization/widgets/custom_abundance.py:738:9: SIM103 Return the condition directly
tardis/visualization/widgets/custom_abundance.py:742:9: RET505 Unnecessary `else` after `return` statement
tardis/visualization/widgets/custom_abundance.py:918:12: E712 Avoid equality comparisons to `True`; use `if obj.new:` for truth checks
tardis/visualization/widgets/custom_abundance.py:1131:9: RET505 Unnecessary `else` after `return` statement
tardis/visualization/widgets/custom_abundance.py:1422:9: RET506 Unnecessary `else` after `raise` statement
tardis/visualization/widgets/custom_abundance.py:1474:27: UP031 Use format specifiers instead of percent format
tardis/visualization/widgets/custom_abundance.py:1689:36: UP032 [*] Use f-string instead of `format` call
tardis/visualization/widgets/custom_abundance.py:1725:9: F811 Redefinition of unused `input_d_time_0_eventhandler` from line 1714
Found 11 errors.
[*] 4 fixable with the `--fix` option (3 hidden fixes can be enabled with the `--unsafe-fixes` option).
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2942 +/- ##
==========================================
- Coverage 70.39% 70.03% -0.36%
==========================================
Files 222 222
Lines 16157 16158 +1
==========================================
- Hits 11373 11317 -56
- Misses 4784 4841 +57 ☔ View full report in Codecov by Sentry. |
*beep* *bop* Significantly changed benchmarks: All benchmarks: Benchmarks that have stayed the same:
| Change | Before [5e2d0bb3] <master> | After [0462b65c] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 2.29±2μs | 3.72±3μs | ~1.62 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 1.68±0.3μs | 1.97±0.5μs | ~1.17 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 3.01±0ms | 2.73±0.01ms | ~0.91 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 43.4±3μs | 39.3±0.02μs | ~0.90 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
| | 7.35±2μs | 6.58±2μs | ~0.90 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
| | 25.1±7μs | 21.0±5μs | ~0.84 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 50.4±30μs | 41.3±30μs | ~0.82 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 5.28±1μs | 3.23±0.5μs | ~0.61 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 551±200ns | 571±200ns | 1.04 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 572±100ns | 591±400ns | 1.03 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 38.6±0s | 38.8±0s | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 2.08±0m | 2.08±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 1.20±0μs | 1.20±0μs | 1.00 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 66.5±0.2ms | 66.4±0.3ms | 1.00 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 2.58±0.4ms | 2.59±0.4ms | 1.00 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 1.06±0m | 1.06±0m | 0.99 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
| | 45.5±20μs | 45.0±20μs | 0.99 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission |
| | 1.75±0.02ms | 1.73±0.02ms | 0.99 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 759±1ns | 725±0.2ns | 0.96 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 4.40±0.3ms | 4.13±0.06ms | 0.94 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 7.20±0.6μs | 6.67±0.6μs | 0.93 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 3.54±0.5μs | 3.26±0.5μs | 0.92 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
| | 581±200ns | 531±200ns | 0.91 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 226±0.06ns | 206±0.1ns | 0.91 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
If you want to see the graph of the results, you can check it here |
Hi @atharva-2001 @andrewfullard @jvshields , |
Why is this the correct fix? There is also a |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This reverts commit 19591f5.
Hi @andrewfullard , |
Also, yes, I think this is the correct fix. |
Hi @atharva-2001 @KasukabeDefenceForce @andrewfullard , |
Hello! Are you planning to apply to Google Summer of Code? |
@andrewfullard |
Great! I think we have seen enough of your capabilities with the number of contributions you have made. Please respond to reviews and comments on your existing PRs before writing more. Thanks! |
Thank you so much for your kind words and for recognizing my contributions. |
Is there a way you could demonstrate what errors this fixes? Aside from linting errors in an IDE. |
The change specifically fixes the undefined |
Yes, and what impact does that have on running the code? Since our documentation and tests work using part of this code, what is the error that is produced as part of normal running? |
📝 Description
Type: 🪲
bugfix
Added a missing import
from IPython.display import display
to resolve the undefined name error 'display' incustom_abundance.py
Closes #2941
📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label