-
Notifications
You must be signed in to change notification settings - Fork 340
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
Repair notebook prolog #828
Repair notebook prolog #828
Conversation
…the Gitub maser branch, comment out the nbviewer script
Hello @rocco8773! Thanks for updating your pull request.
Comment last updated at 2020-06-03 17:37:11 UTC |
Codecov Report
@@ Coverage Diff @@
## master #828 +/- ##
=======================================
Coverage 95.88% 95.88%
=======================================
Files 56 56
Lines 5123 5123
=======================================
Hits 4912 4912
Misses 211 211 Continue to review full report at Codecov.
|
docs/conf.py
Outdated
Interactive online version: | ||
<a href="https://mybinder.org/v2/gh/PlasmaPy/PlasmaPy/{{ env.config.release|e }}?filepath={{ docname|e }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>. | ||
<a href="https://mybinder.org/v2/gh/PlasmaPy/PlasmaPy/master/?filepath={{ docname|e }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Admittedly this was mostly copypasted from the doc examples, but I think it'd make sense to - if we were to release 0.4 tomorrow - link from 0.4 docs to 0.4 examples. This way, you're linking from every version's docs to the master branch, which seems like an antipattern.
Perhaps there's a way around this? If there's any module in the docs that'll have version information, that'd be conf.py
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general and practice I'd agree that would be the better option. However, we literally do not have release
branch to point back to on GitHub. The only options I can think of that don't require manual work during each deployment are...
- Pointing back to a commit tree like this (https://github.com/PlasmaPy/PlasmaPy/blob/c1f9482e030beda87f65b5558d40322536d36dd0/docs/notebooks/physics.ipynb), but I don't know If sphinx knows anything about the commit ids.
- If RTD the has any stored pacakge data and if we can point to that instead.
In order to get a fix in now, I say we merge this PR and open to improve the link back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm willing to bet I can take
Lines 79 to 85 in 25c8127
# The full version, including alpha/beta/rc tags. | |
# Note: If plasmapy.__version__ can not be defined then it is set to 'unknown'. | |
# However, release needs to be a semantic style version number, so set | |
# the 'unknown' case to ''. | |
release = "" if release == "unknown" else release | |
# The short X.Y version. | |
version = ".".join(release.split(".")[:2]) |
Look to my commit at... wow, what time is it over there... er... look to my commit before the first light of the fourth day of June, at dawn, look to the, er, the commit's gonna come from your east so I guess that checks out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah, versioning got in my way. When working off 0.3.1, we get 0.3.2 dev for some crazy setuptools_scm related reason... I'll have to do a couple of RTD tests to get this done. Future issue, definitely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think I go the notebooks to point to the git tree, but I setup a fallback to master. Here's the current doc build where it seems to be working...https://plasmapy--828.org.readthedocs.build/en/828/notebooks/physics.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continuing with the magical theme for these reviews... yer a wizard, @rocco8773. Works great on the test doc build! I'm half expecting this to break at one point during our next release, but hey, since it's your code, not mine... I have high hopes! 😆 Thanks for doing this! :)
I thought you'd get a kick out of this one! |
I mean, yeah, looking at you delving into the depths of Jinja2 was... something. 😆 |
doc/notebook/
instead ofdocs/notebook/
release
variable defined inconf.py
...now it's pointing directly tomaster
nbviewer
link. The RTD page is already behaving as a viewer.