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

Adding Interactive Initialization Documentation #1589

Merged
merged 20 commits into from
Jun 17, 2021

Conversation

isaacgsmith
Copy link
Member

@isaacgsmith isaacgsmith commented May 25, 2021

This PR creates interactive documentation on energy packet initialization.

Description

The new notebook incorporates the "Discretization" page and elements of the "Propagation" page of the documentation, as well as code that demonstrates how packets are initialized in TARDIS. This PR also fixes hyperlink problems that arose from my changes.

Motivation and context

This is part of a larger problem to make the TARDIS documentation more interactive.

How has this been tested?

  • Testing pipeline.
  • Other.
    The documentation has been built locally and on github (see below)

Examples

You can view the built documentation with my changes here.

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 May 25, 2021

Codecov Report

Merging #1589 (ab201a3) into master (049aa34) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1589   +/-   ##
=======================================
  Coverage   61.92%   61.93%           
=======================================
  Files          62       62           
  Lines        5702     5729   +27     
=======================================
+ Hits         3531     3548   +17     
- Misses       2171     2181   +10     
Impacted Files Coverage Δ
tardis/tardis/util/base.py 75.78% <0.00%> (-1.99%) ⬇️
tardis/tardis/simulation/base.py 85.16% <0.00%> (-0.47%) ⬇️

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 049aa34...ab201a3. Read the comment docs.

Copy link
Contributor

@andrewfullard andrewfullard left a comment

Choose a reason for hiding this comment

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

Looks great just needs a few typos fixed

docs/physics/montecarlo/initialization.ipynb Outdated Show resolved Hide resolved
docs/physics/montecarlo/initialization.ipynb Outdated Show resolved Hide resolved
docs/physics/montecarlo/initialization.ipynb Outdated Show resolved Hide resolved
@isaacgsmith
Copy link
Member Author

isaacgsmith commented May 27, 2021

Looks great just needs a few typos fixed

Fixed. I really need to put my writing into a spelling/grammar check program before I make a PR *insert facepalm emoji*

@isaacgsmith isaacgsmith requested a review from andrewfullard May 27, 2021 19:14
@isaacgsmith isaacgsmith marked this pull request as draft May 27, 2021 19:43
@isaacgsmith
Copy link
Member Author

Converted to draft until #1592 is merged so I can edit this notebook to reflect the changes to the code.

@isaacgsmith isaacgsmith marked this pull request as ready for review June 2, 2021 17:53
@isaacgsmith isaacgsmith requested review from marxwillia and chvogl June 4, 2021 14:43
@github-actions
Copy link

github-actions bot commented Jun 4, 2021

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

  • Is the necessary information provided?
    • Does the PR have a complete description? Does it explain what the PR is attempting to do/fix, does it explain how it does this?
    • Is there an explanation of why this PR is needed?
    • Please use the TARDIS PR template
  • 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 at or very close to 100%.
  • Is the code properly documented?
    • If this modifies existing code, then the docs should be updated. If this adds a new feature, additional documentation should be created.
    • Sphinx and docstrings in the code (in numpydoc format)
  • Does this conform to PEP 8 and the TARDIS style guidelines?
  • Does the PR fix the problem it describes?
    • Make sure it doesn’t e.g. just fix the problem for a specific case
    • Is this the best way of fixing the problem?
  • Is the code tidy?
    • No unnecessary print lines or code comments

@tardis-sn tardis-sn deleted a comment from github-actions bot Jun 7, 2021
@isaacgsmith isaacgsmith requested a review from Rodot- June 16, 2021 16:26
@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.

Copy link
Contributor

@chvogl chvogl left a comment

Choose a reason for hiding this comment

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

This looks great! Really nice job writing up a complex topic. My only concern are some minor PEP 8 issues, which would be good to fix.

docs/physics/montecarlo/initialization.ipynb Outdated Show resolved Hide resolved
docs/physics/montecarlo/initialization.ipynb Outdated Show resolved Hide resolved
docs/physics/montecarlo/initialization.ipynb Outdated Show resolved Hide resolved
@Rodot-
Copy link
Contributor

Rodot- commented Jun 16, 2021

Try to use astropy units when instantiating quantities containing units to keep consistency with the way that constants are access from astropy.

@isaacgsmith isaacgsmith requested a review from chvogl June 17, 2021 19:03
@andrewfullard andrewfullard merged commit 1016ed0 into tardis-sn:master Jun 17, 2021
@isaacgsmith isaacgsmith deleted the initialization_doc branch June 23, 2021 00:50
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
* creating energypackets notebook

* more additions to energypackets page

* finished notebook aspect of energy packet docs

* important small changes

* wrote a section before the python code

* final changes

* fixing typos

* a few changes

* adding more info to the custom_source notebook

* working on custom_source notebook

* grammar

* grammar in the notebook title

* fixing typo

* fixing hyperlink

* fixing hyperlink again

* pep 8

* more pep8

* formatting

* getting opinions

* adding units
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