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

Fail LFS pull if label not present #2975

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

atharva-2001
Copy link
Member

@atharva-2001 atharva-2001 commented Feb 17, 2025

📝 Description

Type: 🪲 bugfix | 🚀 feature | ☣️ breaking change | 🚦 testing | 📝 documentation | 🎢 infrastructure

Adds a check that fails LFS pulls if label not present in pull requests.
Proof that label check works
https://github.com/tardis-sn/tardis/actions/runs/13371304706/job/37340450315

LFS pulls are allowed in master.

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

@tardis-bot
Copy link
Contributor

tardis-bot commented Feb 17, 2025

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

12	W291	[*] Trailing whitespace
8	W293	[*] Blank line contains whitespace
4	E999	[ ] SyntaxError: Expected an expression

Complete output(might be large):

.github/workflows/benchmarks.yml:3:4: E999 SyntaxError: Expected an expression
.github/workflows/benchmarks.yml:20:5: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:92:49: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:122:81: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:123:54: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:210:1: W293 [*] Blank line contains whitespace
.github/workflows/benchmarks.yml:229:22: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:230:170: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:232:84: W291 [*] Trailing whitespace
.github/workflows/benchmarks.yml:249:1: W293 [*] Blank line contains whitespace
.github/workflows/build-docs.yml:7:4: E999 SyntaxError: Expected an expression
.github/workflows/lfs-cache.yml:1:12: E999 SyntaxError: Simple statements must be separated by newlines or semicolons
.github/workflows/lfs-cache.yml:43:1: W293 [*] Blank line contains whitespace
.github/workflows/lfs-cache.yml:62:1: W293 [*] Blank line contains whitespace
.github/workflows/lfs-cache.yml:65:78: W291 [*] Trailing whitespace
.github/workflows/lfs-cache.yml:70:1: W293 [*] Blank line contains whitespace
.github/workflows/lfs-cache.yml:73:45: W291 [*] Trailing whitespace
.github/workflows/lfs-cache.yml:74:78: W291 [*] Trailing whitespace
.github/workflows/lfs-cache.yml:78:1: W293 [*] Blank line contains whitespace
.github/workflows/lfs-cache.yml:81:46: W291 [*] Trailing whitespace
.github/workflows/lfs-cache.yml:82:78: W291 [*] Trailing whitespace
.github/workflows/lfs-cache.yml:86:1: W293 [*] Blank line contains whitespace
.github/workflows/lfs-cache.yml:96:1: W293 [*] Blank line contains whitespace
.github/workflows/tests.yml:7:4: E999 SyntaxError: Expected an expression
Found 24 errors.
[*] 20 fixable with the `--fix` option.

@atharva-2001 atharva-2001 added the git-lfs-pull Allow git lfs pull in PRs label Feb 17, 2025
@atharva-2001 atharva-2001 removed the git-lfs-pull Allow git lfs pull in PRs label Feb 17, 2025
@atharva-2001 atharva-2001 marked this pull request as ready for review February 17, 2025 13:32
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.17%. Comparing base (13c9a31) to head (1fadfa6).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2975      +/-   ##
==========================================
- Coverage   69.54%   69.17%   -0.37%     
==========================================
  Files         228      228              
  Lines       16429    16429              
==========================================
- Hits        11425    11365      -60     
- Misses       5004     5064      +60     

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

@tardis-bot
Copy link
Contributor

tardis-bot commented Feb 17, 2025

*beep* *bop*
Hi human,
I ran benchmarks as you asked comparing master (13c9a31) and the latest commit (1fadfa6).
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 [13c9a314] <release-2025.02.16>   | After [1fadfa61]    | Ratio   | Benchmark (Parameter)                                                                                                               |
|----------|------------------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
|          | 3.36±0.4μs                               | 5.11±5μs            | ~1.52   | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket                                       |
|          | 2.75±0ms                                 | 3.52±0.06ms         | ~1.28   | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter')                                     |
|          | 46.7±20μs                                | 58.0±20μs           | ~1.24   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission                                         |
|          | 1.96±1μs                                 | 2.39±1μs            | ~1.22   | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators       |
|          | 21.0±5μs                                 | 23.7±6μs            | ~1.13   | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
|          | 3.42±1μs                                 | 3.77±0.4μs          | ~1.10   | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell                              |
|          | 51.0±20μs                                | 42.4±20μs           | ~0.83   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter                                          |
|          | 6.70±1μs                                 | 7.20±2μs            | 1.07    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley                                    |
|          | 3.82±0.01ms                              | 4.00±0.03ms         | 1.05    | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom')                                   |
|          | 531±200ns                                | 551±200ns           | 1.04    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation                                      |
|          | 38.5±0.07s                               | 40.0±0.3s           | 1.04    | run_tardis.BenchmarkRunTardis.time_run_tardis                                                                                       |
|          | 1.04±0m                                  | 1.08±0m             | 1.04    | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking                                                                      |
|          | 1.21±0.01μs                              | 1.25±0μs            | 1.04    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary                |
|          | 1.34±0.5μs                               | 1.39±0.4μs          | 1.04    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line                    |
|          | 602±200ns                                | 621±100ns           | 1.03    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation                              |
|          | 38.2±0.03μs                              | 39.0±0.06μs         | 1.02    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list                  |
|          | 64.7±0.6ms                               | 66.0±0.1ms          | 1.02    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe                  |
|          | 735±0.4ns                                | 741±0.3ns           | 1.01    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter                                       |
|          | 2.08±0m                                  | 2.09±0m             | 1.00    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions                                 |
|          | 207±0.2ns                                | 206±0.1ns           | 1.00    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body                                       |
|          | 1.68±0ms                                 | 1.65±0.01ms         | 0.98    | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop                             |
|          | 2.58±0.4ms                               | 2.52±0.5ms          | 0.98    | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop                        |
|          | 611±100ns                                | 582±200ns           | 0.95    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation                                |
|          | 7.16±1μs                                 | 6.61±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

@andrewfullard andrewfullard merged commit b53686a into tardis-sn:master Feb 17, 2025
25 of 34 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.

3 participants