tardis-sn / tardis

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

Fix file formats #2801

Closed andrewfullard closed 3 months ago

andrewfullard commented 3 months ago

:pencil: Description

Type: :beetle: bugfix

Resolves black formatting issues.

tardis-bot commented 3 months ago

*beep* *bop* Hi human, I ran ruff on the latest commit (01bba3761a6b3501061c2e5128c4d9560c4ba1a4). 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 4 D202 [*] No blank lines allowed after function docstring (found 1) 2 E701 [ ] Multiple statements on one line (colon) 2 UP004 [*] Class `MacroAtomSolver` inherits from `object` 1 I001 [*] Import block is un-sorted or un-formatted 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: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:46:8: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:63:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:65:15: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:69:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:78:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:82:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:90:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:102:26: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:106:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:114:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:125:22: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:126:89: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:128:84: W291 [*] Trailing whitespace .github/workflows/codestyle.yml:144:1: W293 [*] Blank line contains whitespace .github/workflows/codestyle.yml:148:1: W293 [*] Blank line contains whitespace tardis/opacities/macro_atom/macroatom_solver.py:8:23: UP004 [*] Class `MacroAtomSolver` inherits from `object` tardis/opacities/macro_atom/macroatom_solver.py:14:9: D202 [*] No blank lines allowed after function docstring (found 1) tardis/opacities/macro_atom/macroatom_solver.py:28:9: D202 [*] No blank lines allowed after function docstring (found 1) tardis/opacities/macro_atom/macroatom_solver.py:90:9: D202 [*] No blank lines allowed after function docstring (found 1) tardis/opacities/opacity_solver.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/opacities/opacity_solver.py:9:21: UP004 [*] Class `OpacitySolver` inherits from `object` tardis/opacities/opacity_solver.py:17:9: D202 [*] No blank lines allowed after function docstring (found 1) Found 25 errors. [*] 22 fixable with the `--fix` option. ```
codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 69.37%. Comparing base (714cffc) to head (01bba37). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2801 +/- ## ========================================== - Coverage 69.91% 69.37% -0.55% ========================================== Files 206 206 Lines 15523 15523 ========================================== - Hits 10853 10769 -84 - Misses 4670 4754 +84 ```

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

tardis-bot commented 3 months ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing master (714cffc8dd478b3db3bc6601bb205130b331b7f6) and the latest commit (01bba3761a6b3501061c2e5128c4d9560c4ba1a4). 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 [714cffc8] | After [01bba376] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 7.51±2μs | 9.24±2μs | ~1.23 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 52.8±30μs | 47.4±30μs | ~0.90 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 47.3±20μs | 42.1±20μs | ~0.89 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | 2.26±2μs | 1.97±2μs | ~0.87 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 1.84±0.2μs | 1.55±0.5μs | ~0.84 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 63.3±0.08ms | 66.0±0.4ms | 1.04 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 1.68±0.02ms | 1.74±0.03ms | 1.03 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | 31.2±0.02μs | 32.0±0μs | 1.02 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 3.89±0.6μs | 3.96±0.5μs | 1.02 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 1.06±0m | 1.07±0m | 1.01 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 2.78±0.6ms | 2.81±0.6ms | 1.01 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 551±100ns | 551±100ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 612±100ns | 611±200ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 3.79±0.06ms | 3.81±0ms | 1.00 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 39.9±0.07s | 40.0±0.01s | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 2.07±0m | 2.08±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 201±0.6ns | 201±0.02ns | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 3.31±0.3μs | 3.24±0.6μs | 0.98 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 744±1ns | 719±0.6ns | 0.97 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 22.9±5μs | 22.3±6μs | 0.97 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 601±100ns | 571±100ns | 0.95 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 1.25±0μs | 1.18±0μs | 0.94 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 3.29±0.02ms | 3.03±0.02ms | 0.92 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 6.80±0.5μs | 6.25±1μs | 0.92 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | ```

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