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

Making Changes to Several Tutorials #1763

Merged
merged 18 commits into from
Sep 17, 2021

Conversation

isaacgsmith
Copy link
Member

@isaacgsmith isaacgsmith commented Jul 29, 2021

Description

Changes include:

  • Some general formatting of notebooks.
  • Adding the download_atom_data function to every notebook that needs it so that the notebooks will run properly in binder.
    • In doing this, I fixed the print statement in tardis/io/atom_data/util.py to use the correct import.
  • Addressing errors in all tutorials that had them (except for docs/io/configuration/components/models/Custom_TARDIS_Model_Tutorial.ipynb which is supposed to have those error -- I will be returning to this notebook in a later PR).
  • Clearing the output in all tutorials (besides docs/io/configuration/components/models/Custom_TARDIS_Model_Tutorial.ipynb) so that they will be executed by nbsphinx.
  • Adding in a small HDF to docs/io/visualization/ so that the visualization notebooks can run. Because I cleared the output in docs/io/visualization/sdec_plot.ipynb, this PR will still decrease the overall size of the repo.
  • Removing some of the plotly plots from docs/io/visualization/sdec_plot.ipynb so that the built file is <100 MB (GH pages requirement).
  • Deleting a duplicate notebook (docs/io/configuration/components/models/densitycust/Custom_Density_And_Boundary_Velocities.ipynb).
  • Adding a note to the quickstart guide.
  • Rewriting docs/io/optional/callback_example.ipynb.
  • Adding more text to docs/io/configuration/read_configuration.ipynb and including information about reading configuration dictionaries.
  • Moving docs/io/output/hdf_writer.ipynb to be under docs/outdated, allowing me to make our section about writing a simulation to an HDF much more simple.

NOTE: the docs building now takes way too long. I am exploring options to fix this.

Motivation and context

Now, nearly all of the TARDIS tutorials we want to work are actually working and formatted properly.

How has this been tested?

  • Testing pipeline.
  • Docs built locally and on GitHub.

Examples

https://smithis7.github.io/tardis/branch/notebook_format_doc/

Type of change

  • Bug fix.
  • New feature.
  • Breaking change.
  • None of the above.

Checklist

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
    • (optional) I have built the documentation on my fork following the instructions.
  • I have assigned and requested two reviewers for this pull request.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #1763 (255d67b) into master (058adb5) will not change coverage.
The diff coverage is n/a.

❗ Current head 255d67b differs from pull request most recent head b6668f5. Consider uploading reports for the commit b6668f5 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1763   +/-   ##
=======================================
  Coverage   58.42%   58.42%           
=======================================
  Files          66       66           
  Lines        6684     6684           
=======================================
  Hits         3905     3905           
  Misses       2779     2779           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 058adb5...b6668f5. Read the comment docs.

@isaacgsmith isaacgsmith force-pushed the notebook_format_doc branch 2 times, most recently from 93da632 to 749ce23 Compare August 2, 2021 16:02
@isaacgsmith isaacgsmith changed the title Notebook format doc Making Changes to several tutorials Aug 2, 2021
@isaacgsmith isaacgsmith changed the title Making Changes to several tutorials Making Changes to Several Tutorials Aug 2, 2021
@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

@isaacgsmith isaacgsmith marked this pull request as ready for review August 2, 2021 17:53
@tardis-sn tardis-sn deleted a comment from tardis-bot Aug 4, 2021
@andrewfullard
Copy link
Contributor

I think we definitely need to be careful about removing information (e.g. the SDEC plot examples) but otherwise generally good

@@ -14,384 +14,28 @@
"cell_type": "markdown",
Copy link
Member

Choose a reason for hiding this comment

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

Nice note at bottom :)


Reply via ReviewNB

@@ -2,14 +2,13 @@
"cells": [
Copy link
Member

Choose a reason for hiding this comment

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

I think @wkerzendorf mentioned to show INFO level logs!


Reply via ReviewNB

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking is that we want to show the defaults in quickstart. @wkerzendorf to my memory talked about changing it so "info" is the default.

Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

These changes are so thoughtful - awesome work @smithis7 🎉

There are few things:

  • Can you rename "TARDIS Grid Tutorial" to "TARDIS Grid" - I think tutorial looks bit odd considering how its sibling sections are named
  • It needs rebase, there are merge conflicts in logging notebook
  • Your created hdf don't show up Ar for real packet population but shows up for virtual - can you please fix that we really want to show same colorscale in both packets_mode to avoid confusion
  • About adding hdf to visualization folder seems reasonable to make it run on binder and since you've freed lot of space by removing outputs. But I'd ask @wkerzendorf to have a final say on this!

@andrewfullard andrewfullard marked this pull request as draft August 6, 2021 13:10
@isaacgsmith isaacgsmith marked this pull request as ready for review August 19, 2021 20:08
@isaacgsmith
Copy link
Member Author

These changes are so thoughtful - awesome work @smithis7 🎉

There are few things:

  • Can you rename "TARDIS Grid Tutorial" to "TARDIS Grid" - I think tutorial looks bit odd considering how its sibling sections are named
  • It needs rebase, there are merge conflicts in logging notebook
  • Your created hdf don't show up Ar for real packet population but shows up for virtual - can you please fix that we really want to show same colorscale in both packets_mode to avoid confusion
  • About adding hdf to visualization folder seems reasonable to make it run on binder and since you've freed lot of space by removing outputs. But I'd ask @wkerzendorf to have a final say on this!

I have rebased and fixed the hdf issue. And I did talk to Wolfgang about adding the HDF before I submitted this PR.

For the "TARDIS Grid" page, there are a few things on that that are being talked about (i.e. the filename will be changed and we may move the file and possibly come up with a different name), so I think we should make any changes to that page all at once. And, Marc will make the changes to the file name so it still shows him as the page author.

@isaacgsmith isaacgsmith linked an issue Sep 2, 2021 that may be closed by this pull request
Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

Sorry, it took me so long to review this - well done!

@jaladh-singhal jaladh-singhal merged commit b579fc1 into tardis-sn:master Sep 17, 2021
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
* changing hdf notebooks

* formatting physical_quantities.ipynb

* updating atom data error message

* formatting read_configuration notebook

* deleting duplicate notebook

* actually deleting duplicate notebook

* fixing visualization notebooks that require hdf

* shrinking hdf

* clearning notebook outputs

* removing some sdec examples

* small changes in many tutorials

* redoing callback example and adding note to quickstart

* a few changes to stella_to_tardis

* adding atomic data to grid tutorial

* clearing output in stella_to_tardis

* adding missing import statement

* fixing typos

* changing hdf so that Ar shows in real SDEC plot
@isaacgsmith isaacgsmith deleted the notebook_format_doc branch October 4, 2021 18:37
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.

Visualization notebooks are pre-run
4 participants