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

Remove black from docs and update with ruff #2855

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

KasukabeDefenceForce
Copy link
Contributor

@KasukabeDefenceForce KasukabeDefenceForce commented Oct 11, 2024

📝 Description

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

This PR updates the doc with our latest formatter tool ruff.

Sample badge:
https://github.com/KasukabeDefenceForce/tardis

📌 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 Oct 11, 2024

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

3	E999	[ ] SyntaxError: Expected a statement
1	B018	[ ] Found useless expression. Either assign it to a variable or remove it.
1	Q003	[*] Change outer quotes to avoid escaping inner quotes
1	W291	[*] Trailing whitespace
1	W292	[*] No newline at end of file

Complete output(might be large):

README_TEMPLATE.rst:1:1: E999 SyntaxError: Expected a statement
docs/_static/ruff_badge.json:1:1: B018 Found useless expression. Either assign it to a variable or remove it.
docs/_static/ruff_badge.json:4:16: Q003 [*] Change outer quotes to avoid escaping inner quotes
docs/_static/ruff_badge.json:8:4: W292 [*] No newline at end of file
docs/contributing/development/code_quality.rst:1:1: E999 SyntaxError: Expected an expression
docs/contributing/development/developer_faq.rst:1:1: E999 SyntaxError: Expected an expression
docs/contributing/development/developer_faq.rst:13:39: W291 [*] Trailing whitespace
Found 7 errors.
[*] 3 fixable with the `--fix` option.

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.49%. Comparing base (b3af245) to head (214f7c8).
Report is 4 commits behind head on master.

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

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

@KasukabeDefenceForce KasukabeDefenceForce marked this pull request as ready for review October 11, 2024 13:39
@tardis-bot
Copy link
Contributor

*beep* *bop*

Hi, human.

The docs workflow has succeeded ✔️

Click here to see your results.

@tardis-bot
Copy link
Contributor

tardis-bot commented Oct 11, 2024

*beep* *bop*
Hi human,
I ran benchmarks as you asked comparing master (b3af245) and the latest commit (214f7c8).
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 [b3af2456] <release-2024.10.14>   | After [214f7c85]    | Ratio   | Benchmark (Parameter)                                                                                                               |
|----------|------------------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
|          | 47.9±20μs                                | 56.3±30μs           | ~1.17   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter                                          |
|          | 541±100ns                                | 622±100ns           | ~1.15   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation                                      |
|          | 4.62±0.1ms                               | 5.33±0.6ms          | ~1.15   | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom')                                   |
|          | 622±200ns                                | 701±70ns            | ~1.13   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation                              |
|          | 44.8±10μs                                | 50.6±30μs           | ~1.13   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission                                         |
|          | 2.74±0.02ms                              | 3.08±0.03ms         | ~1.12   | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter')                                     |
|          | 7.38±1μs                                 | 6.56±0.8μs          | ~0.89   | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket                                           |
|          | 1.56±0.4μs                               | 1.68±0.3μs          | 1.08    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line                    |
|          | 205±0.2ns                                | 217±0.2ns           | 1.06    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body                                       |
|          | 3.15±0.3μs                               | 3.28±0.3μs          | 1.04    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket                                       |
|          | 7.15±1μs                                 | 7.41±2μs            | 1.04    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley                                    |
|          | 3.00±0.8μs                               | 3.13±1μs            | 1.04    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell                              |
|          | 38.4±0s                                  | 39.7±0.1s           | 1.03    | run_tardis.BenchmarkRunTardis.time_run_tardis                                                                                       |
|          | 31.0±0.02μs                              | 31.9±0.01μs         | 1.03    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list                  |
|          | 723±0.2ns                                | 737±2ns             | 1.02    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter                                       |
|          | 1.85±0.05ms                              | 1.87±0.01ms         | 1.01    | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop                             |
|          | 1.06±0m                                  | 1.05±0.01m          | 1.00    | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking                                                                      |
|          | 2.10±0m                                  | 2.09±0m             | 1.00    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions                                 |
|          | 2.45±2μs                                 | 2.44±1μs            | 1.00    | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators       |
|          | 1.24±0μs                                 | 1.22±0μs            | 0.98    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary                |
|          | 67.7±1ms                                 | 65.2±0.1ms          | 0.96    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe                  |
|          | 2.99±0.5ms                               | 2.88±0.4ms          | 0.96    | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop                        |
|          | 581±200ns                                | 551±100ns           | 0.95    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation                                |
|          | 20.9±5μs                                 | 19.7±4μs            | 0.94    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |

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

andrewfullard
andrewfullard previously approved these changes Oct 14, 2024
@andrewfullard andrewfullard merged commit f0e898c into tardis-sn:master Oct 14, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants