tardis-sn / tardis

TARDIS - Temperature And Radiative Diffusion In Supernovae
https://tardis-sn.github.io/tardis
204 stars 406 forks source link

Cleanup codestyle workflow #2860

Closed KasukabeDefenceForce closed 3 weeks ago

KasukabeDefenceForce commented 1 month ago

:pencil: Description

Type: :beetle: bugfix | :rocket: feature | :biohazard: breaking change | :vertical_traffic_light: testing | :memo: documentation | :roller_coaster: infrastructure

This PR aims at cleaning up the codestyle workflow by removing redundant steps and replace them with setup_env workflow.

Sample run: https://github.com/KasukabeDefenceForce/tardis/actions/runs/11359919762/job/31596798258

:pushpin: Resources

Examples, notebooks, and links to useful references.

:vertical_traffic_light: Testing

How did you test these changes?

:ballot_box_with_check: Checklist

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

tardis-bot commented 1 month ago

*beep* *bop* Hi human, I ran ruff on the latest commit (1597bf557d707980d47355d6cd6f61176f47a7ca). Here are the outputs produced. Results can also be downloaded as artifacts here. Summarised output:

```diff 7 W293 [*] Blank line contains whitespace 5 W291 [*] Trailing whitespace 2 E701 [ ] Multiple statements on one line (colon) 1 E999 [ ] SyntaxError: Expected an expression ```

Complete output(might be large):

```diff .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:39:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:43:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:51:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:63:26: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:67:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:75:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:86:22: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:87:89: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:89:84: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:105:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:109:1: W293 [*] Blank line contains whitespace Found 15 errors. [*] 12 fixable with the `--fix` option. ```
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.70%. Comparing base (81ec6e8) to head (1597bf5). Report is 8 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2860 +/- ## ========================================== - Coverage 71.08% 70.70% -0.39% ========================================== Files 213 213 Lines 15823 15923 +100 ========================================== + Hits 11248 11258 +10 - Misses 4575 4665 +90 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tardis-bot commented 1 month ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing master (81ec6e8eccfacc831c386a2061ffd2d0c570e739) and the latest commit (1597bf557d707980d47355d6cd6f61176f47a7ca). Here are the logs produced by ASV. Results can also be downloaded as artifacts here.

Significantly changed benchmarks:

```diff ```

All benchmarks:

```diff Benchmarks that have stayed the same: | Change | Before [6ae9446d] | After [1597bf55] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 491±100ns | 551±200ns | ~1.12 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 1.60±0.2μs | 1.79±0.4μs | ~1.12 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 4.06±0ms | 3.57±0ms | ~0.88 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 3.43±0.5μs | 3.03±0.4μs | ~0.88 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 3.88±0.2μs | 3.26±0.3μs | ~0.84 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 52.0±20μs | 42.6±30μs | ~0.82 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 6.92±2μs | 7.40±2μs | 1.07 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 1.64±0.02ms | 1.69±0.02ms | 1.04 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | 30.3±0μs | 31.4±0.02μs | 1.04 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 24.5±6μs | 25.3±7μs | 1.03 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 6.49±1μs | 6.55±0.7μs | 1.01 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 40.0±0.05s | 40.1±0.1s | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 2.07±0m | 2.07±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 2.02±1μs | 2.02±0.9μs | 1.00 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 205±0.2ns | 203±0.05ns | 0.99 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 42.3±20μs | 41.8±20μs | 0.99 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | 611±100ns | 601±200ns | 0.98 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 2.67±0.01ms | 2.63±0.01ms | 0.98 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 1.08±0m | 1.06±0m | 0.98 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 1.20±0μs | 1.18±0μs | 0.98 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 2.52±0.5ms | 2.48±0.4ms | 0.98 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 67.7±0.05ms | 65.5±0.07ms | 0.97 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 737±0.09ns | 704±1ns | 0.95 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 561±100ns | 521±100ns | 0.93 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | ```

If you want to see the graph of the results, you can check it here