-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add download notebook link in docs #2363
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2363 +/- ##
=======================================
Coverage 98.22% 98.22%
=======================================
Files 87 87
Lines 4059 4059
=======================================
Hits 3987 3987
Misses 72 72 ☔ View full report in Codecov by Sentry. |
Nice! Thanks for implementing this. One thing I noticed is that it doesn't include the images referenced in the notebook, so for the example you link:
The image at the top doesn't load. In this case it's no big deal since the image is basically just a thumbnail However, in cases where there's a diagram or figure included, it might be confusing to not have it missing. Looking through a handful of examples though, e.g. (layerwise folding, Pennylane, it seems like the vast majority of images that are included in these docs are generated by the code itself, e.g. |
@jordandsullivan I don't see any great solution for that. And in fact it's going to be the same in any implementation of the «Download notebook» if we want to export it as an .ipynb. Unless we overcomplicate it and package it as a zip with images included. Same problem with all implementations I saw around, for example see the notebook that you can download from Jupyter Book chapter: https://inferentialthinking.com/chapters/08/Functions_and_Tables.html A solution could be to use absolute url for images, which are already in our repo. E.g. |
@cosenal Yeah like I said, I think it's fine given that it seems relatively rare the images contain anything crucial in our notebooks. |
Not to complicate things, but if we want to keep the images, we can always embed them as data directly in an |
@andre-a-alves that's an option too, but it will make the .md files more bulky and worse to review/edit. |
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.
LGTM. Nice job!
Fixes #1619.
For a demo, see https://mitiq--2363.org.readthedocs.build/en/2363/examples/calibration-tutorial.html