-
-
Notifications
You must be signed in to change notification settings - Fork 220
Merging the initial repo with @rossbar's simple setup #8
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Minimal makefile for Sphinx documentation | ||
| # | ||
|
|
||
| # You can set these variables from the command line, and also | ||
| # from the environment for the first two. | ||
| SPHINXOPTS ?= | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = . | ||
| BUILDDIR = _build | ||
|
|
||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| .PHONY: help Makefile | ||
|
|
||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <h3>Source</h3> | ||
|
|
||
| <ul> | ||
| <li><a href="../../../{{ pagename }}.ipynb">Download .ipynb file</a></li> | ||
| <li><a href="../../jupyter_execute/{{ pagename }}.py">Download .py file</a></li> | ||
| </ul> | ||
|
|
||
| <br> | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <h3><a href="{{ pathto(master_doc) }}">{{ _('All Tutorials') }}</a></h3> | ||
| {{ toctree() }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <h3>Resources</h3> | ||
| <ul> | ||
| <li><a href="https://numpy.org/">NumPy.org website</a></li> | ||
| <li><a href="https://scipy.org/">Scipy.org website</a></li> | ||
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # This file only contains a selection of the most common options. For a full | ||
| # list see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
|
||
| # -- Path setup -------------------------------------------------------------- | ||
|
|
||
| # If extensions (or modules to document with autodoc) are in another directory, | ||
| # add these directories to sys.path here. If the directory is relative to the | ||
| # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
| # | ||
| # import os | ||
| # import sys | ||
| # sys.path.insert(0, os.path.abspath('.')) | ||
|
|
||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
|
|
||
| project = 'NumPy Tutorials' | ||
| copyright = '2020, NumPy Community' | ||
| author = 'NumPy Community' | ||
|
|
||
| # The full version, including alpha/beta/rc tags | ||
| # release = '0.0.1-dev' | ||
|
|
||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
|
|
||
| # Add any Sphinx extension module names here, as strings. They can be | ||
| # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
| # ones. | ||
| extensions = [ | ||
| "myst_nb", | ||
| ] | ||
|
|
||
| # Add any paths that contain templates here, relative to this directory. | ||
| templates_path = ['_templates'] | ||
|
|
||
| # List of patterns, relative to source directory, that match files and | ||
| # directories to ignore when looking for source files. | ||
| # This pattern also affects html_static_path and html_extra_path. | ||
| exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'README.md'] | ||
|
|
||
| # -- Notebook execution options --------------------------------------------- | ||
|
|
||
| # Valid options: "off", "force", "auto", and "cache" | ||
| jupyter_execute_notebooks = "auto" | ||
|
|
||
|
|
||
| # -- Options for HTML output ------------------------------------------------- | ||
|
|
||
| # The theme to use for HTML and HTML Help pages. See the documentation for | ||
| # a list of builtin themes. | ||
| # | ||
| #html_theme = 'pyramid' | ||
| html_theme = 'sphinx_book_theme' | ||
| html_theme_options = { | ||
| "launch_buttons": { | ||
| "binderhub_url": "https://mybinder.org/v2/gh/numpy/numpy-tutorials/master" | ||
| }, | ||
| "repository_url": "https://github.com/numpy/numpy-tutorials", | ||
| "repository_branch": "master", | ||
| "path_to_docs": "content", | ||
| } | ||
|
|
||
| # Add any paths that contain custom static files (such as style sheets) here, | ||
| # relative to this directory. They are copied after the builtin static files, | ||
| # so a file named "default.css" will overwrite the builtin "default.css". | ||
| html_static_path = ['_static'] | ||
| html_title = 'NumPy Tutorials' | ||
| html_sidebars = {'index': ['indexsidebar.html'], | ||
| '**': ['localtoc.html', 'customsidebar.html', 'globaltoc.html']} | ||
|
|
||
| html_copy_source = True | ||
| #html_domain_indices = False | ||
| #html_file_suffix = '.html' | ||
| #html_sourcelink_suffix = [ '.ipynb', '.py' ] | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What was the tradeoff between
myst_nbandnbsphinx? I've other projects which use the latter, but if the former was found to be the better choice then I might be interested in swapping over my projects too.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 not an expert here but I can at least try to provide a little background.
myst-nbis one part of the larger executablebooks project that aims to improve the tooling around the generation of scientific content in a way that supports many input formats. I have not usednbsphinxextensively, but the two main reasons I really likemyst-nbare:The first point probably isn't so relevant if you already have a bunch of content in traditional
.ipynbform (though jupytext supports bi-directional conversion betweenipynbandmystnbformat, making it easy to try out the text-based format with your existing content).Execution caching is another nice feature, especially if you have a lot of different source notebooks/files. Note that jupyter-cache is a separate project, so it's probably possible to get it working with
nbsphinx. However, it's included by default withmyst-nb(since it's also part of executablebooks).There are other reasons as well (
nbsphinxhas an external dependency onpandocwhereas (AFAICT)myst-nbhas no external [non-Python] dependencies). This is by no means an exhaustive list of the differences, just some of the reasons that I proposedmyst-nbfor this project.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.
On the rendering side, I've also noticed that
myst-nbis a bit more polished, whereas there were some formatting issues withnbsphinx(these are cosmetic details but I think those are important here).