-
-
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
Ensures consistency across codebase to ensure consistent codestyle #2951
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 55a190d.
*beep* *bop* 5 E712 [*] Avoid equality comparisons to `False`; use `if not ...:` for false checks
4 INP001 [ ] File `tardis/io/model/readers/tests/test_arepo_parser.py` is part of an implicit namespace package. Add an `__init__.py`.
2 PT013 [ ] Incorrect import of `pytest`; use `import pytest` instead
2 I001 [*] Import block is un-sorted or un-formatted
2 F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
2 F811 [ ] Redefinition of unused `monkeysession` from line 5
1 B017 [ ] `pytest.raises(Exception)` should be considered evil
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/io/model/readers/tests/test_cmfgen_reader.py:1:1: INP001 File `tardis/io/model/readers/tests/test_cmfgen_reader.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_cmfgen_reader.py:4:1: PT013 Incorrect import of `pytest`; use `import pytest` instead
tardis/io/model/readers/tests/test_csvy_reader.py:1:1: INP001 File `tardis/io/model/readers/tests/test_csvy_reader.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_csvy_reader.py:48:10: B017 `pytest.raises(Exception)` should be considered evil
tardis/io/model/readers/tests/test_stella_reader.py:1:1: INP001 File `tardis/io/model/readers/tests/test_stella_reader.py` is part of an implicit namespace package. Add an `__init__.py`.
tardis/io/model/readers/tests/test_stella_reader.py:5:1: PT013 Incorrect import of `pytest`; use `import pytest` instead
tardis/visualization/widgets/tests/test_line_info.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/tests/test_line_info.py:7:36: F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
tardis/visualization/widgets/tests/test_line_info.py:43:20: E712 Avoid equality comparisons to `False`; use `if not species_interactions_df.all(axis=None):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:66:12: E712 Avoid equality comparisons to `False`; use `if not species_interactions_df.all(axis=None):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:89:20: E712 Avoid equality comparisons to `False`; use `if not last_line_counts_df.all(axis=None):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:145:66: F811 Redefinition of unused `monkeysession` from line 7
tardis/visualization/widgets/tests/test_line_info.py:289:16: E712 Avoid equality comparisons to `False`; use `if not bool(selected_species):` for false checks
tardis/visualization/widgets/tests/test_line_info.py:335:12: E712 Avoid equality comparisons to `False`; use `if not ...:` for false checks
tardis/visualization/widgets/tests/test_shell_info.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/widgets/tests/test_shell_info.py:5:36: F401 [*] `tardis.tests.test_util.monkeysession` imported but unused
tardis/visualization/widgets/tests/test_shell_info.py:144:50: F811 Redefinition of unused `monkeysession` from line 5
Found 18 errors.
[*] 4 fixable with the `--fix` option (5 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.74% 69.39% -0.35%
==========================================
Files 224 224
Lines 16313 16313
==========================================
- Hits 11377 11320 -57
- Misses 4936 4993 +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 [5e2d0bb3] <master> | After [6316bd88] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 22.1±5μs | 33.7±10μs | ~1.53 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 3.16±0.6μs | 3.74±0.5μs | ~1.18 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
| | 1.45±0.3μs | 1.67±0.4μs | ~1.15 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 51.3±30μs | 57.9±40μs | ~1.13 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 3.43±0.5μs | 3.07±0.4μs | ~0.89 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 3.52±0.02ms | 2.55±0.01ms | ~0.72 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 7.00±1μs | 7.65±3μs | 1.09 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
| | 40.0±20μs | 42.3±20μs | 1.06 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission |
| | 2.79±0.5ms | 2.95±0.5ms | 1.06 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 521±100ns | 531±100ns | 1.02 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 726±0.3ns | 737±0.2ns | 1.02 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 1.68±0ms | 1.72±0.01ms | 1.02 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 37.5±0.1μs | 38.2±0μs | 1.02 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
| | 1.05±0m | 1.06±0m | 1.01 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
| | 1.20±0μs | 1.21±0μs | 1.01 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 562±100ns | 561±100ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 39.5±0.3s | 39.4±0.2s | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 2.09±0m | 2.09±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 204±0.09ns | 203±0.1ns | 0.99 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
| | 66.4±0.2ms | 65.5±0.1ms | 0.99 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 3.99±0.1ms | 3.83±0.05ms | 0.96 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 2.15±2μs | 2.04±1μs | 0.95 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 622±200ns | 581±100ns | 0.93 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 7.52±0.9μs | 6.99±0.9μs | 0.93 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
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. |
📝 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