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

Remove nbsphinx extension #931

Merged
merged 4 commits into from
Feb 19, 2021
Merged

Remove nbsphinx extension #931

merged 4 commits into from
Feb 19, 2021

Conversation

maxrjones
Copy link
Member

Description of proposed changes

This PR removes the nbsphinx extension because it is no longer needed after #268 and produces unnecessary warnings about duplicate files.

Fixes #920

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@maxrjones maxrjones requested a review from seisman February 19, 2021 01:30
@seisman
Copy link
Member

seisman commented Feb 19, 2021

More things should be done:

  1. remove nbsphinx from environment.yml

    - nbsphinx

  2. If you look at the old documentation (https://www.pygmt.org/0.0.1a0/tutorials/plot-data-points.html), you will see a "Download notebook" button at the top right. That was added by the template, and we no longer need it. So the following lines should be safe to remove. (These lines check if the suffix of the source file is .ipynb. If yes, then add the download button).

{% if suffix == ".ipynb" %}
<a href="https://github.com/{{ github_repo }}/raw/{{ github_version }}/{{ doc_path }}/{{ pagename }}{{ suffix }}"
class="fa fa-download"> Download notebook</a>
{% endif %}

and the top comments should also be updated accordingly:

{# Extend the RTD template to include "Edit on GitHub" and option to download
notebook generated pages from nbsphinx #}

@seisman seisman added the maintenance Boring but important stuff for the core devs label Feb 19, 2021
@seisman seisman added this to the 0.3.1 milestone Feb 19, 2021
@maxrjones maxrjones marked this pull request as draft February 19, 2021 01:42
@maxrjones
Copy link
Member Author

More things should be done:

1. remove `nbsphinx` from `environment.yml`
   https://github.com/GenericMappingTools/pygmt/blob/0fd514e03c4e87515967140e8c3c47234380511a/environment.yml#L26

2. If you look at the old documentation (https://www.pygmt.org/0.0.1a0/tutorials/plot-data-points.html), you will see a "Download notebook" button at the top right. That was added by the template, and we no longer need it. So the following lines should be safe to remove. (These lines check if the suffix of the source file is `.ipynb`. If yes, then add the download button).

{% if suffix == ".ipynb" %}
<a href="https://github.com/{{ github_repo }}/raw/{{ github_version }}/{{ doc_path }}/{{ pagename }}{{ suffix }}"
class="fa fa-download"> Download notebook</a>
{% endif %}

and the top comments should also be updated accordingly:

{# Extend the RTD template to include "Edit on GitHub" and option to download
notebook generated pages from nbsphinx #}

Thanks, I made those changes.

@seisman seisman marked this pull request as ready for review February 19, 2021 19:29
@seisman seisman merged commit 1e451cc into master Feb 19, 2021
@seisman seisman deleted the sphinx-warnings branch February 19, 2021 19:55
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
* Remove nbsphinx extension
* Remove nbsphinx from environment.yml
* Remove nbsphinx from breadcrumbs

Co-authored-by: Dongdong Tian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suppress the sphinx + sphinx-gallery warnings
2 participants