-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
Ruff on tardis/simulation #2847
Conversation
*beep* *bop* 7 G004 Logging statement uses f-string
1 RET505 Unnecessary `else` after `return` statement
1 RET506 Unnecessary `else` after `raise` statement
1 TRY300 Consider moving this statement to an `else` block
Complete output(might be large): 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:654:25: G004 Logging statement uses f-string
tardis/simulation/base.py:657:13: G004 Logging statement uses f-string
tardis/simulation/base.py:662:13: G004 Logging statement uses f-string
tardis/simulation/base.py:713:13: TRY300 Consider moving this statement to an `else` block
tardis/simulation/base.py:715:26: G004 Logging statement uses f-string
Found 10 errors.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2847 +/- ##
==========================================
- Coverage 70.87% 70.51% -0.37%
==========================================
Files 209 209
Lines 15589 15589
==========================================
- Hits 11049 10992 -57
- Misses 4540 4597 +57 ☔ View full report in Codecov by Sentry. |
*beep* *bop* Significantly changed benchmarks: All benchmarks: Benchmarks that have stayed the same:
| Change | Before [43413319] <master> | After [09b693f5] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 21.0±5μs | 34.1±10μs | ~1.62 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 2.08±1μs | 2.66±1μs | ~1.28 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 3.19±0.01ms | 3.80±0.1ms | ~1.19 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 1.53±0.4μs | 1.71±0.3μs | ~1.12 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 3.13±0.5μs | 3.46±0.5μs | ~1.11 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
| | 2.78±0.4μs | 3.03±0.6μs | 1.09 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 7.59±2μs | 8.32±2μs | 1.09 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
| | 704±0.4ns | 758±0.8ns | 1.08 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 7.70±7μs | 8.25±5μs | 1.07 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 1.70±0ms | 1.81±0.01ms | 1.06 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 2.60±0.5ms | 2.73±0.4ms | 1.05 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 70.2±30μs | 72.5±40μs | 1.03 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 63.5±0.1ms | 63.9±0.4ms | 1.01 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 2.09±0m | 2.10±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 1.21±0μs | 1.21±0.05μs | 1.00 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 207±0.2ns | 205±0.3ns | 0.99 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
| | 38.9±0s | 38.0±0.2s | 0.98 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 32.1±0.01μs | 31.3±0.01μs | 0.98 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
| | 561±200ns | 541±100ns | 0.96 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 4.09±0ms | 3.91±0ms | 0.96 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 44.4±20μs | 42.7±30μs | 0.96 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission |
| | 561±100ns | 521±200ns | 0.93 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 621±200ns | 571±100ns | 0.92 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 1.15±0m | 1.05±0.01m | 0.92 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
If you want to see the graph of the results, you can check it here |
📝 Description
Type: 🪲
bugfix
| 🚀feature
| ☣️breaking change
| 🚦testing
| 📝documentation
| 🎢infrastructure
📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label