-
Notifications
You must be signed in to change notification settings - Fork 224
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
Use sphinx-gallery to manage examples and tutorials #268
Conversation
This way, packages that depend on us can use GMT maps in their galleries
Replace the first steps notebook with a gallery tutorial
Need to finish the tutorials part
@@ -17,11 +22,9 @@ | |||
"sphinx.ext.intersphinx", | |||
"numpydoc", | |||
"nbsphinx", |
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.
@leouieda I tried it locally. It's really nice!!!
Don't forget to remove nbsphinx, since we no longer use notebooks after this PR is merged.
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.
Forget it. I just saw your comments in #269.
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.
Thanks! I quite like it too.
I'm leaving it because I'll want to have one notebook in there as a "Using PyGMT in Jupyter" tutorial (#269).
Description of proposed changes
Enables the usage of sphinx-gallery with PyGMT. For now, requires features that aren't yet released so we need to install from the Github master branch of sphinx-gallery. Implements an image scrapper for
pygmt.Figure
that captures them and saves to the correct file names. Need to add a global figure registry (SHOWED_FIGURES
inpygmt/figure.py
) so that we can request all figure objects that have called theirshow
method. Replace the current jupyter notebooks by gallery notebook style.py
files, which are easier to maintain on version control.TODO: