Skip to content

Installation Fixes in tests.yml and compare-regdata.yml #3168

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

Merged
merged 7 commits into from
Jul 8, 2025

Conversation

atharva-2001
Copy link
Member

@atharva-2001 atharva-2001 commented Jun 30, 2025

📝 Description

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

https://github.com/tardis-sn/tardis/actions/runs/15975377264/job/45056400569?pr=3168 Fails
This fixes the installation(adds --no-deps in tardisbase and compare-regdata)

📌 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

*beep* *bop*

Hi, human.

I'm the @tardis-bot and I noticed that your email is not associated with an ORCID ID in our database.

Please add your email and ORCID ID to the .orcid.csv file in your current branch and push the changes to this pull request.

If you don't have an ORCID ID yet, you can create one for free at orcid.org. ORCID IDs help ensure you get proper credit for your scientific contributions.

The format should be:

email,orcid
[email protected],0000-0000-0000-0000

@tardis-bot
Copy link
Contributor

tardis-bot commented Jun 30, 2025

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

5781	      	[ ] syntax-error
79	W293  	[ ] blank-line-with-whitespace
26	E701  	[ ] multiple-statements-on-one-line-colon
11	W291  	[ ] trailing-whitespace
 4	E402  	[ ] module-import-not-at-top-of-file
 4	E702  	[ ] multiple-statements-on-one-line-semicolon
 3	COM818	[ ] trailing-comma-on-bare-tuple
 3	F401  	[ ] unused-import
 2	W292  	[ ] missing-newline-at-end-of-file
 2	I001  	[*] unsorted-imports
 1	RUF022	[*] unsorted-dunder-all
Found 5916 errors.
[*] 3 fixable with the `--fix` option.

Complete output(might be large):

tardis/__init__.py:6:1: I001 [*] Import block is un-sorted or un-formatted
tardis/__init__.py:12:11: RUF022 [*] `__all__` is not sorted
tardis/__init__.py:16:1: E402 Module level import not at top of file
tardis/__init__.py:17:1: E402 Module level import not at top of file
tardis/__init__.py:34:1: E402 Module level import not at top of file
tardis/__init__.py:34:25: F401 `tardis.base.run_tardis` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/__init__.py:35:1: E402 Module level import not at top of file
tardis/__init__.py:35:46: F401 `tardis.io.util.yaml_load_file` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
tardis/visualization/tools/tests/test_lineid_plotter.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/visualization/tools/tests/test_lineid_plotter.py:7:12: F401 `lineid_plot` imported but unused; consider using `importlib.util.find_spec` to test for availability
Found 10 errors.
[*] 3 fixable with the `--fix` option.

@atharva-2001 atharva-2001 added the run-generation-tests Run refdata generation tests on pull requests label Jun 30, 2025
andrewfullard
andrewfullard previously approved these changes Jun 30, 2025
@andrewfullard andrewfullard self-requested a review June 30, 2025 14:09
@andrewfullard
Copy link
Contributor

Check if --no-deps breaks things and use it if not.

@andrewfullard
Copy link
Contributor

Looks like --no-deps seems to be preventing the TARDIS defined dependencies from being installed

@tardis-bot
Copy link
Contributor

tardis-bot commented Jun 30, 2025

*beep* *bop*
Hi human,
I ran benchmarks as you asked comparing master (04ded3b) and the latest commit (69f5422).
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 [52faad48] <master>   | After [69f54221]    | Ratio   | Benchmark (Parameter)                                                                                                               |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
|          | 41.2±20μs                    | 58.8±20μs           | ~1.43   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission                                         |
|          | 2.20±1μs                     | 2.45±1μs            | ~1.12   | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators       |
|          | 441±200ns                    | 490±200ns           | ~1.11   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation                                      |
|          | 1.55±0.5μs                   | 1.40±0.4μs          | ~0.90   | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line                    |
|          | 3.21±0ms                     | 2.81±0.02ms         | ~0.88   | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter')                                     |
|          | 51.5±30μs                    | 43.7±30μs           | ~0.85   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter                                          |
|          | 24.7±7μs                     | 26.5±8μs            | 1.07    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
|          | 37.6±0.01μs                  | 40.1±0.04μs         | 1.07    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list                  |
|          | 551±100ns                    | 581±200ns           | 1.05    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation                              |
|          | 521±100ns                    | 541±200ns           | 1.04    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation                                |
|          | 57.7±0.02ms                  | 60.1±0.08ms         | 1.04    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe                  |
|          | 1.18±0μs                     | 1.20±0μs            | 1.02    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary                |
|          | 2.63±0.01ms                  | 2.67±0ms            | 1.02    | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop                             |
|          | 196±0.4ns                    | 198±0.1ns           | 1.01    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body                                       |
|          | 6.96±2μs                     | 7.01±2μs            | 1.01    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley                                    |
|          | 3.95±0.01ms                  | 3.94±0.07ms         | 1.00    | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom')                                   |
|          | 59.9±0.08s                   | 60.0±0.1s           | 1.00    | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking                                                                      |
|          | 2.10±0m                      | 2.10±0m             | 1.00    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions                                 |
|          | 662±1ns                      | 652±0.4ns           | 0.99    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter                                       |
|          | 39.1±0.1s                    | 38.1±0.1s           | 0.98    | run_tardis.BenchmarkRunTardis.time_run_tardis                                                                                       |
|          | 3.04±0.7μs                   | 2.97±0.6μs          | 0.98    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket                                       |
|          | 3.77±0.3μs                   | 3.69±0.2μs          | 0.98    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell                              |
|          | 2.86±0.3ms                   | 2.75±0.4ms          | 0.96    | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop                        |
|          | 6.11±0.9μs                   | 5.68±0.6μs          | 0.93    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket                                           |

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

Copy link

codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.87%. Comparing base (cec1e75) to head (69f5422).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3168      +/-   ##
==========================================
+ Coverage   69.86%   69.87%   +0.01%     
==========================================
  Files         241      241              
  Lines       17307    17309       +2     
==========================================
+ Hits        12091    12095       +4     
+ Misses       5216     5214       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -76,12 +76,13 @@ jobs:
- name: Install tardis editable
if: ${{ !inputs.pip_git }}
run: |
pip install -e ".[tardisbase,viz]"
pip install -e ".[tardisbase]"
pip install --no-deps qgridnext lineid_plot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure that this action fails if the install fails.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would happen automatically right?

@atharva-2001 atharva-2001 added the pip-git-tests Run pip git tests label Jul 7, 2025

- name: Install package git
if: ${{ inputs.pip_git }}
run: |
pip install git+https://github.com/tardis-sn/tardis.git@master
pip install "tardis[tardisbase,viz] @ git+https://github.com/tardis-sn/tardis.git@master"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure this is --no-deps too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or remove

@andrewfullard
Copy link
Contributor

Change title, add description

@atharva-2001 atharva-2001 changed the title Release Fixes Installation Fixes in tests.yml and compare-regdata.yml Jul 8, 2025
@andrewfullard andrewfullard enabled auto-merge (squash) July 8, 2025 13:23
@wkerzendorf wkerzendorf disabled auto-merge July 8, 2025 13:24
@wkerzendorf wkerzendorf merged commit 7aee1a9 into tardis-sn:master Jul 8, 2025
26 of 28 checks passed
Knights-Templars pushed a commit to Knights-Templars/tardis that referenced this pull request Jul 15, 2025
* tardisbase installations

* empty commit

* no deps

* pip git tests

* no deps separate flag

* matrix name

* similar installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pip-git-tests Run pip git tests run-generation-tests Run refdata generation tests on pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants