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

Grotrian diagram IPyWidget functionality #2328

Merged

Conversation

AyushiDaksh
Copy link
Contributor

📝 Description

This PR is part of the Grotrian Diagram project, part of Google Summer of Code 2023. Project description and related PRs/Issues can be found on the project page.

This PR aims to integrate the Plotly plot with IPyWidgets menus. In other words, this PR adds functionality to the Grotrian Diagram widget.

Type: 🚀 feature

Also, link issues affected by this pull request by using the keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves or resolved.

📌 Resources

Project Link: https://github.com/users/AyushiDaksh/projects/1
Idea Link: https://tardis-sn.github.io/gsoc_2023/ideas/
GSoC Project Link: https://summerofcode.withgoogle.com/programs/2023/projects/HxymUMRe

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

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@AyushiDaksh AyushiDaksh force-pushed the grotrian-diagram-ipywidget-support branch from c38c1c7 to 2e2d031 Compare July 28, 2023 08:14
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Attention: Patch coverage is 12.38095% with 92 lines in your changes are missing coverage. Please review.

Project coverage is 68.89%. Comparing base (5bca272) to head (e6aed1e).

❗ Current head e6aed1e differs from pull request most recent head d71c714. Consider uploading reports for the commit d71c714 to get more accurate results

Files Patch % Lines
tardis/visualization/widgets/grotrian.py 12.38% 92 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2328      +/-   ##
==========================================
+ Coverage   67.51%   68.89%   +1.37%     
==========================================
  Files         170      165       -5     
  Lines       14228    14081     -147     
==========================================
+ Hits         9606     9701      +95     
+ Misses       4622     4380     -242     

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

@AyushiDaksh AyushiDaksh force-pushed the grotrian-diagram-ipywidget-support branch from 8bcca5e to 1759798 Compare August 4, 2023 22:44
@AyushiDaksh AyushiDaksh marked this pull request as ready for review August 7, 2023 21:03
Copy link
Contributor

@MarkMageeAstro MarkMageeAstro left a comment

Choose a reason for hiding this comment

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

Haven't been able to review the code itself yet, but there are some minor changes to the documentation that should be implemented.

docs/io/visualization/generating_widgets.ipynb Outdated Show resolved Hide resolved
docs/io/visualization/generating_widgets.ipynb Outdated Show resolved Hide resolved
docs/io/visualization/generating_widgets.ipynb Outdated Show resolved Hide resolved
docs/io/visualization/generating_widgets.ipynb Outdated Show resolved Hide resolved
docs/io/visualization/generating_widgets.ipynb Outdated Show resolved Hide resolved
docs/io/visualization/generating_widgets.ipynb Outdated Show resolved Hide resolved
docs/io/visualization/using_widgets.rst Outdated Show resolved Hide resolved
docs/io/visualization/using_widgets.rst Outdated Show resolved Hide resolved
docs/io/visualization/using_widgets.rst Outdated Show resolved Hide resolved
docs/io/visualization/using_widgets.rst Show resolved Hide resolved
@andrewfullard
Copy link
Contributor

Can this be merged?

@jamesgillanders
Copy link
Member

@MarkMageeAstro @jamesgillanders @aoifeboyle(?) to review/test this and make a decision to merge or update

@jamesgillanders
Copy link
Member

@AyushiDaksh we are keen to merge this PR -- can you please rebase it?

@@ -5,16 +5,17 @@
"metadata": {},
Copy link
Contributor

@MarkMageeAstro MarkMageeAstro Feb 2, 2024

Choose a reason for hiding this comment

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

These links don't work for me. Might be a simple rebasing issue


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MarkMageeAstro This is the same link which is present in the latest master branch as well.
https://tardis-sn.github.io/tardis/using/visualization/using_widgets.html

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, can you open an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I've solved the issue in this PR: #2533

docs/io/visualization/generating_widgets.ipynb Outdated Show resolved Hide resolved
Copy link
Contributor

@MarkMageeAstro MarkMageeAstro left a comment

Choose a reason for hiding this comment

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

Minor changes to documentation. Should be good to merge after rebasing. Is that Grotrian mockup notebook still necessary?

docs/io/visualization/using_widgets.rst Outdated Show resolved Hide resolved
docs/io/visualization/using_widgets.rst Outdated Show resolved Hide resolved
@AyushiDaksh
Copy link
Contributor Author

@MarkMageeAstro @jamesgillanders
Sorry I somehow saw the comments now. Yes we're keen on merging this.
I'll rebase this branch and make the requested changes today

@MarkMageeAstro
Copy link
Contributor

Any luck with this @AyushiDaksh?

@MarkMageeAstro
Copy link
Contributor

@AyushiDaksh can you let us know if you're still interested in this?

@AyushiDaksh
Copy link
Contributor Author

@MarkMageeAstro Sorry I moved to a new city this month so the last couple of weeks were really busy.
I have started work on this now, will wrap it up this weekend

@AyushiDaksh AyushiDaksh force-pushed the grotrian-diagram-ipywidget-support branch from 48a571a to 5c5c068 Compare March 1, 2024 05:22
@AyushiDaksh
Copy link
Contributor Author

AyushiDaksh commented Mar 1, 2024

Minor changes to documentation. Should be good to merge after rebasing. Is that Grotrian mockup notebook still necessary?

I have changed the docs according to the comments and rebased the branch.
The mockup notebook helps the user learn to use the tool quickly. I would suggest keeping it.

@MarkMageeAstro @jamesgillanders

@tardis-bot
Copy link
Contributor

tardis-bot commented Mar 4, 2024

*beep* *bop*

Hi, human.

The docs workflow has succeeded ✔️

Click here to see your results.

Copy link
Contributor

@MarkMageeAstro MarkMageeAstro left a comment

Choose a reason for hiding this comment

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

One minor correction to documentation. Also the mockup notebook didn't show any figures for mean on ReviewNB. Can you generate it again?

Thanks for continuing on this @AyushiDaksh and your hard work getting it done!

@AyushiDaksh
Copy link
Contributor Author

AyushiDaksh commented Mar 8, 2024

@MarkMageeAstro

One minor correction to documentation.

Somehow I'm not able to see your comment. Can you point me to where you need the correction?

Also the mockup notebook didn't show any figures for mean on ReviewNB. Can you generate it again?

Since the Grotrian Widget is a dynamic widget, it doesn't persist in the notebook when it gets saved. This is the same reason why other dynamic widgets don't show up on our documentation page (and we have to resort to GIFs instead).

@MarkMageeAstro
Copy link
Contributor

@MarkMageeAstro

One minor correction to documentation.

Somehow I'm not able to see your comment. Can you point me to where you need the correction?

Hmm, I can't find it either. Must not have been that important. I did spot one other small thing when looking for it thoguh, sorry.

Also the mockup notebook didn't show any figures for mean on ReviewNB. Can you generate it again?

Since the Grotrian Widget is a dynamic widget, it doesn't persist in the notebook when it gets saved. This is the same reason why other dynamic widgets don't show up on our documentation page (and we have to resort to GIFs instead).

Ah, I must have been confused because there were plots in the old version, but that was with the static version of the code

@AyushiDaksh
Copy link
Contributor Author

Hmm, I can't find it either. Must not have been that important. I did spot one other small thing when looking for it thoguh, sorry.

No worries! I have fixed the thing you pointed.

Ah, I must have been confused because there were plots in the old version, but that was with the static version of the code

Yeah we had a static plot during the initial stages of my project, which eventually became dynamic :)

Let me know if this is good to merge @MarkMageeAstro

@AyushiDaksh AyushiDaksh force-pushed the grotrian-diagram-ipywidget-support branch from 16ac28e to e6aed1e Compare March 12, 2024 00:33
@AyushiDaksh
Copy link
Contributor Author

AyushiDaksh commented Mar 12, 2024

Rebased with master and tested the widget locally again, all seems good.

Please look at #2328 (comment) and let me know if anything else is pending here.

Thanks!

@MarkMageeAstro
Copy link
Contributor

Looks good to me and also works on my local install. Thanks @AyushiDaksh!

MarkMageeAstro
MarkMageeAstro previously approved these changes Mar 12, 2024
@AyushiDaksh
Copy link
Contributor Author

Thanks @MarkMageeAstro !

@jamesgillanders Can you please review/approve so we can merge this?

It was great working on this project with TARDIS. Feel free to tag me in future issues/enhacements related to the Grotrian Diagram.

@andrewfullard
Copy link
Contributor

Just one conflict to resolve! Probably due to file renames recently.

@andrewfullard andrewfullard enabled auto-merge (squash) April 12, 2024 14:32
@andrewfullard andrewfullard merged commit 28caa4e into tardis-sn:master Apr 12, 2024
10 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.

9 participants