tardis-sn / tardis

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

Remove black from codestyle workflow #2853

Closed KasukabeDefenceForce closed 1 month 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 removing black formatter from the codebase.

Also, link issues affected by this pull request by using the keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves or resolved.

: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 (4d12f4e0077654aeb4094c1407c1c27ac9d35f61). Here are the outputs produced. Results can also be downloaded as artifacts here. Summarised output:

```diff 9 W293 [*] Blank line contains whitespace 6 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:38:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:40:15: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:44:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:53:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:57:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:65:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:77:26: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:81:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:89:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:100:22: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:101:89: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:103:84: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:119:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:123:1: W293 [*] Blank line contains whitespace Found 18 errors. [*] 15 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.49%. Comparing base (b3af245) to head (4d12f4e). Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2853 +/- ## ========================================== - Coverage 70.87% 70.49% -0.39% ========================================== Files 209 209 Lines 15580 15580 ========================================== - Hits 11043 10983 -60 - Misses 4537 4597 +60 ```

: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 (b3af2456ebddac308c8f63f8864cbfb732c830f1) and the latest commit (4d12f4e0077654aeb4094c1407c1c27ac9d35f61). 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 [b3af2456] | After [4d12f4e0] | Ratio | Benchmark (Parameter) | |----------|------------------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 602±200ns | 1.12±0.2μs | ~1.86 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 2.97±0.4μs | 3.91±0.6μs | ~1.32 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 5.76±1μs | 7.42±0.9μs | ~1.29 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 2.92±0.4μs | 3.69±0.6μs | ~1.26 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 3.97±0.04ms | 4.68±0.01ms | ~1.18 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 2.85±0.02ms | 3.18±0.02ms | ~1.11 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 27.2±2μs | 24.0±6μs | ~0.88 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 2.25±1μs | 1.94±1μs | ~0.86 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 2.19±0.3μs | 1.59±0.4μs | ~0.73 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 571±100ns | 622±200ns | 1.09 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 46.1±20μs | 48.8±20μs | 1.06 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 1.65±0ms | 1.72±0.03ms | 1.05 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | 2.76±0.5ms | 2.89±0.5ms | 1.05 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 64.8±0.03ms | 67.2±0.09ms | 1.04 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 581±100ns | 601±200ns | 1.03 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 1.03±0m | 1.06±0m | 1.03 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 44.5±20μs | 46.0±20μs | 1.03 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | 37.9±0.03s | 38.7±0.1s | 1.02 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 31.3±0.06μs | 31.8±0.01μs | 1.02 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 2.09±0m | 2.09±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 205±0.02ns | 205±0.7ns | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 1.21±0μs | 1.20±0μs | 1.00 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 736±2ns | 717±0.6ns | 0.97 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 7.61±1μs | 7.13±2μs | 0.94 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | ```

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