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

Use sphinx-gallery to manage examples and tutorials #268

Merged
merged 23 commits into from
Jan 24, 2019
Merged

Conversation

leouieda
Copy link
Member

@leouieda leouieda commented Jan 22, 2019

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 in pygmt/figure.py) so that we can request all figure objects that have called their show method. Replace the current jupyter notebooks by gallery notebook style .py files, which are easier to maintain on version control.

TODO:

  • Make a notebook example to check that it works
  • Add instructions for adding examples in CONTRIBUTING and ask people to submit them

@leouieda leouieda changed the title Use sphinx-gallery to manage examples and tutorials WIP Use sphinx-gallery to manage examples and tutorials Jan 22, 2019
@leouieda leouieda changed the title WIP Use sphinx-gallery to manage examples and tutorials Use sphinx-gallery to manage examples and tutorials Jan 24, 2019
@@ -17,11 +22,9 @@
"sphinx.ext.intersphinx",
"numpydoc",
"nbsphinx",
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants