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

Prevent empty convergence plot Error when n_iteration=1 #2371

Merged

Conversation

DeerWhale
Copy link
Contributor

📝 Description

Type: 🪲 bugfix

When running a tardis simulation with n_iteration =1 in the config file and export_convergence_plots=True, the simulation can be successfully returned due to an error that caused by a empty plot in the convergence_plots.

Hence, adding an argument to check if the plots inside simulation.convergence_plots is empty before export the convergence_plot.

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

…orting the plot, prevent the sim fail due to plot is empty
@tardis-bot
Copy link
Contributor

*beep* *bop*

Hi, human.

I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently.

Please add your name and email to .mailmap in your current branch and push the changes to this pull request.

In case you need to map an existing alias, follow this example.

@DeerWhale DeerWhale marked this pull request as ready for review July 26, 2023 17:08
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #2371 (5e2c690) into master (9107f26) will decrease coverage by 1.61%.
Report is 12 commits behind head on master.
The diff coverage is 31.55%.

❗ Current head 5e2c690 differs from pull request most recent head 83894c2. Consider uploading reports for the commit 83894c2 to get more accurate results

@@            Coverage Diff             @@
##           master    #2371      +/-   ##
==========================================
- Coverage   72.14%   70.53%   -1.61%     
==========================================
  Files         137      138       +1     
  Lines       12507    12866     +359     
==========================================
+ Hits         9023     9075      +52     
- Misses       3484     3791     +307     
Files Changed Coverage Δ
.../montecarlo/montecarlo_numba/single_packet_loop.py 24.28% <0.00%> (ø)
tardis/montecarlo/montecarlo_numba/vpacket.py 20.35% <0.00%> (ø)
tardis/transport/r_packet_transport.py 17.77% <0.00%> (ø)
tardis/visualization/widgets/grotrian.py 0.00% <0.00%> (ø)
tardis/analysis.py 31.83% <14.63%> (-2.02%) ⬇️
tardis/montecarlo/montecarlo_numba/macro_atom.py 53.12% <16.66%> (ø)
tardis/montecarlo/montecarlo_numba/r_packet.py 60.60% <25.00%> (ø)
tardis/montecarlo/montecarlo_numba/interaction.py 28.16% <26.92%> (ø)
tardis/montecarlo/montecarlo_numba/opacities.py 38.18% <33.33%> (ø)
tardis/util/base.py 73.07% <37.50%> (-1.13%) ⬇️
... and 18 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonachitchyan
Copy link
Member

Do we know/care why docstr-cov fails here? @andrewfullard

@sonachitchyan
Copy link
Member

Do we know/care why docstr-cov fails here? @andrewfullard

okay the fail seems irrelevant to the PR here?

@sonachitchyan sonachitchyan merged commit 0cb1929 into tardis-sn:master Jul 26, 2023
@DeerWhale DeerWhale deleted the fix_ploterror_when_only_one_iteration branch July 26, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants