-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
Ensures consistency across codebase to ensure consistent codestyle #2951
Conversation
This reverts commit 55a190d.
*beep* *bop* 2 PIE808 [*] Unnecessary `start` argument in `range`
2 E712 [*] Avoid equality comparisons to `False`; use `if not ...:` for false checks
2 F811 [ ] Redefinition of unused `monkeysession` from line 6
1 INP001 [ ] File `tardis/io/model/readers/tests/test_arepo_parser.py` is part of an implicit namespace package. Add an `__init__.py`.
1 I001 [*] Import block is un-sorted or un-formatted
1 F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
Complete output(might be large): tardis/io/model/readers/tests/test_arepo_parser.py:1:1: INP001 File `tardis/io/model/readers/tests/test_arepo_parser.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/transport/montecarlo/tests/conftest.py:14:5: F811 Redefinition of unused `opacity_state_initialize` from line 7
tardis/visualization/tools/tests/test_convergence_plot.py:3:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/tests/test_convergence_plot.py:6:36: F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
tardis/visualization/tools/tests/test_convergence_plot.py:87:24: PIE808 [*] Unnecessary `start` argument in `range`
tardis/visualization/tools/tests/test_convergence_plot.py:111:22: PIE808 [*] Unnecessary `start` argument in `range`
tardis/visualization/tools/tests/test_convergence_plot.py:198:9: E712 Avoid equality comparisons to `False`; use `if not ...:` for false checks
tardis/visualization/tools/tests/test_convergence_plot.py:215:9: E712 Avoid equality comparisons to `False`; use `if not ...:` for false checks
tardis/visualization/tools/tests/test_convergence_plot.py:220:40: F811 Redefinition of unused `monkeysession` from line 6
Found 9 errors.
[*] 4 fixable with the `--fix` option (2 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 #2951 +/- ##
==========================================
- Coverage 69.52% 69.17% -0.35%
==========================================
Files 228 228
Lines 16429 16429
==========================================
- Hits 11422 11365 -57
- Misses 5007 5064 +57 ☔ View full report in Codecov by Sentry. |
Hi @andrewfullard @jvshields @KasukabeDefenceForce , |
*beep* *bop* Significantly changed benchmarks: All benchmarks: Benchmarks that have stayed the same:
| Change | Before [bbe51549] <master> | After [a2a8af9d] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 7.13±2μs | 8.29±2μs | ~1.16 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
| | 202±0.3ns | 225±10ns | ~1.11 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
| | 43.5±30μs | 48.2±20μs | ~1.11 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission |
| | 3.30±0.01ms | 3.63±0.05ms | ~1.10 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 26.9±7μs | 24.1±6μs | ~0.89 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 3.85±0.7μs | 3.37±0.4μs | ~0.87 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 661±100ns | 550±100ns | ~0.83 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 6.90±0.9μs | 7.56±1μs | 1.10 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 714±1ns | 766±4ns | 1.07 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 63.3±30μs | 66.2±30μs | 1.04 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 3.30±0.5μs | 3.42±0.7μs | 1.04 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
| | 40.6±0.02s | 41.4±0.2s | 1.02 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 2.28±2μs | 2.32±2μs | 1.02 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 64.2±0.08ms | 65.3±0.03ms | 1.02 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 4.33±0.06ms | 4.39±0.1ms | 1.01 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 1.23±0μs | 1.24±0.01μs | 1.01 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 2.82±0.4ms | 2.85±0.4ms | 1.01 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 571±100ns | 571±100ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 2.14±0.01m | 2.11±0.01m | 0.99 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 1.49±0.6μs | 1.47±0.4μs | 0.99 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 1.12±0.01m | 1.08±0m | 0.96 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
| | 571±100ns | 530±200ns | 0.93 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 1.89±0.01ms | 1.76±0.03ms | 0.93 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 41.6±0.01μs | 38.5±0.05μs | 0.93 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
If you want to see the graph of the results, you can check it here |
@andrewfullard , |
We appreciate your enthusiasm, but we do not have the capability to review the large number of PRs you are making. Further PRs will not increase your acceptance chance. |
Thank you for your feedback and for taking the time to review my contributions. I understand the need to avoid overwhelming the review process, and I apologize for the large number of PRs I submitted. |
This is a good idea, but I think this PR does the opposite of the behavior that we want. We ignore this in our ruff autolinter, but the suggested formatting is to remove unnecessary parenthesis rather than add them, see https://docs.astral.sh/ruff/rules/pytest-fixture-incorrect-parentheses-style/ |
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.
See comment above, we'd rather remove parentheses than them.
Agreed, my bad, I interchanged the two things, Also you are referring to |
@jvshields , |
📝 Description
Type: 🪲
bugfix
| 🚀feature
| ☣️breaking change
| 🚦testing
| 📝documentation
| 🎢infrastructure
All the occurences of
@pytest.fixture
and@fixture
as suggested were changed to@pytest.fixture()
and@fixture()
, respectively.Closes #2950
📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label