Skip to content
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

Cleanup codestyle workflow #2860

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

KasukabeDefenceForce
Copy link
Contributor

@KasukabeDefenceForce KasukabeDefenceForce commented Oct 16, 2024

📝 Description

Type: 🪲 bugfix | 🚀 feature | ☣️ breaking change | 🚦 testing | 📝 documentation | 🎢 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

📌 Resources

Examples, notebooks, and links to useful references.

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

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

@KasukabeDefenceForce KasukabeDefenceForce marked this pull request as ready for review October 16, 2024 06:12
@tardis-bot
Copy link
Contributor

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

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):

.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.

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tardis-bot
Copy link
Contributor

tardis-bot commented Oct 16, 2024

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

Significantly changed benchmarks:

All benchmarks:

Benchmarks that have stayed the same:

| Change   | Before [6ae9446d] <master>   | 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

@atharva-2001 atharva-2001 requested review from a team and removed request for a team October 25, 2024 10:54
@jvshields jvshields merged commit 494d625 into tardis-sn:master Oct 28, 2024
30 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants