Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-nbsphinx for openSUSE:Factory
checked in at 2022-02-27 22:43:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nbsphinx (Old)
and /work/SRC/openSUSE:Factory/.python-nbsphinx.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nbsphinx"
Sun Feb 27 22:43:08 2022 rev:10 rq:957877 version:0.8.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nbsphinx/python-nbsphinx.changes
2021-07-02 13:29:09.939969835 +0200
+++
/work/SRC/openSUSE:Factory/.python-nbsphinx.new.1958/python-nbsphinx.changes
2022-02-27 22:44:16.706651106 +0100
@@ -1,0 +2,13 @@
+Sun Feb 27 00:58:44 UTC 2022 - Arun Persaud <[email protected]>
+
+- specfile:
+ * update copyright year
+
+- update to version 0.8.8:
+ * Support for the sphinx_codeautolink extension
+ * Basic support for the text builder
+
+- changes from version 0.8.7:
+ * Fix assertion error in LaTeX build with Sphinx 4.1.0+
+
+-------------------------------------------------------------------
Old:
----
nbsphinx-0.8.6.tar.gz
New:
----
nbsphinx-0.8.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-nbsphinx.spec ++++++
--- /var/tmp/diff_new_pack.wYjhCn/_old 2022-02-27 22:44:17.078651214 +0100
+++ /var/tmp/diff_new_pack.wYjhCn/_new 2022-02-27 22:44:17.082651215 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-nbsphinx
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-nbsphinx
-Version: 0.8.6
+Version: 0.8.8
Release: 0
Summary: Jupyter Notebook Tools for Sphinx
License: MIT
++++++ nbsphinx-0.8.6.tar.gz -> nbsphinx-0.8.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/.circleci/config.yml
new/nbsphinx-0.8.8/.circleci/config.yml
--- old/nbsphinx-0.8.6/.circleci/config.yml 2021-05-29 09:51:21.000000000
+0200
+++ new/nbsphinx-0.8.8/.circleci/config.yml 2021-12-07 13:02:04.000000000
+0100
@@ -25,8 +25,8 @@
- run:
name: Installing apt Packages
command: |
- apt-get update
- apt-get install -y python3-pip librsvg2-bin
+ apt-get -y update
+ apt-get install -y --no-install-recommends python3-pip librsvg2-bin
- restore_cache:
keys:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/.github/workflows/linkcheck.yml
new/nbsphinx-0.8.8/.github/workflows/linkcheck.yml
--- old/nbsphinx-0.8.6/.github/workflows/linkcheck.yml 2021-04-29
17:22:53.000000000 +0200
+++ new/nbsphinx-0.8.8/.github/workflows/linkcheck.yml 2021-12-07
13:02:04.000000000 +0100
@@ -10,7 +10,7 @@
fetch-depth: 0
- name: Install pandoc
run: |
- sudo apt-get install pandoc
+ sudo apt-get install -y --no-install-recommends pandoc
- name: Set up Python
uses: actions/setup-python@v1
with:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/CONTRIBUTING.rst
new/nbsphinx-0.8.8/CONTRIBUTING.rst
--- old/nbsphinx-0.8.6/CONTRIBUTING.rst 2021-05-15 10:02:14.000000000 +0200
+++ new/nbsphinx-0.8.8/CONTRIBUTING.rst 2021-12-29 21:01:15.000000000 +0100
@@ -10,8 +10,12 @@
Development Installation
------------------------
-Instead of pip-installing the latest release from PyPI_, you should get the
-newest development version (a.k.a. "master") with Git::
+.. _prerequisites: https://nbsphinx.readthedocs.io/installation.html
+ #nbsphinx-Prerequisites
+
+Make sure that the necessary prerequisites_ are installed.
+Then, instead of ``pip``-installing the latest release from PyPI_,
+you should get the newest development version (a.k.a. "master") with Git::
git clone https://github.com/spatialaudio/nbsphinx.git
cd nbsphinx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/NEWS.rst new/nbsphinx-0.8.8/NEWS.rst
--- old/nbsphinx-0.8.6/NEWS.rst 2021-06-03 10:39:23.000000000 +0200
+++ new/nbsphinx-0.8.8/NEWS.rst 2021-12-31 13:24:53.000000000 +0100
@@ -1,3 +1,16 @@
+Version 0.8.8 -- 2021-12-31 -- PyPI__ -- diff__
+ * Support for the ``sphinx_codeautolink`` extension
+ * Basic support for the ``text`` builder
+
+__ https://pypi.org/project/nbsphinx/0.8.8/
+__ https://github.com/spatialaudio/nbsphinx/compare/0.8.7...0.8.8
+
+Version 0.8.7 -- 2021-08-10 -- PyPI__ -- diff__
+ * Fix assertion error in LaTeX build with Sphinx 4.1.0+
+
+__ https://pypi.org/project/nbsphinx/0.8.7/
+__ https://github.com/spatialaudio/nbsphinx/compare/0.8.6...0.8.7
+
Version 0.8.6 -- 2021-06-03 -- PyPI__ -- diff__
* Support for Jinja2 version 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/PKG-INFO new/nbsphinx-0.8.8/PKG-INFO
--- old/nbsphinx-0.8.6/PKG-INFO 2021-06-03 10:40:14.222266200 +0200
+++ new/nbsphinx-0.8.8/PKG-INFO 2021-12-31 13:26:09.230423000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: nbsphinx
-Version: 0.8.6
+Version: 0.8.8
Summary: Jupyter Notebook Tools for Sphinx
Home-page: https://nbsphinx.readthedocs.io/
Author: Matthias Geier
@@ -9,38 +9,6 @@
Project-URL: Documentation, https://nbsphinx.readthedocs.io/
Project-URL: Source Code, https://github.com/spatialaudio/nbsphinx/
Project-URL: Bug Tracker, https://github.com/spatialaudio/nbsphinx/issues/
-Description: Jupyter Notebook Tools for Sphinx
- =================================
-
- ``nbsphinx`` is a Sphinx_ extension that provides a source parser for
- ``*.ipynb`` files.
- Custom Sphinx directives are used to show `Jupyter Notebook`_ code
cells (and of
- course their results) in both HTML and LaTeX output.
- Un-evaluated notebooks -- i.e. notebooks without stored output cells
-- will be
- automatically executed during the Sphinx build process.
-
- Quick Start:
- #. Install ``nbsphinx``
-
- #. Edit your ``conf.py`` and add ``'nbsphinx'`` to ``extensions``.
-
- #. Edit your ``index.rst`` and add the names of your ``*.ipynb``
files
- to the ``toctree``.
-
- #. Run Sphinx!
-
- Online documentation (and example of use):
- http://nbsphinx.readthedocs.io/
-
- Source code repository (and issue tracker):
- https://github.com/spatialaudio/nbsphinx/
-
- License:
- MIT -- see the file ``LICENSE`` for details.
-
- .. _Sphinx: https://www.sphinx-doc.org/
- .. _Jupyter Notebook: https://jupyter.org/
-
Keywords: Sphinx,Jupyter,notebook
Platform: any
Classifier: Framework :: Sphinx
@@ -54,3 +22,38 @@
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Documentation :: Sphinx
Requires-Python: >=3.6
+License-File: LICENSE
+
+Jupyter Notebook Tools for Sphinx
+=================================
+
+``nbsphinx`` is a Sphinx_ extension that provides a source parser for
+``*.ipynb`` files.
+Custom Sphinx directives are used to show `Jupyter Notebook`_ code cells (and
of
+course their results) in both HTML and LaTeX output.
+Un-evaluated notebooks -- i.e. notebooks without stored output cells -- will be
+automatically executed during the Sphinx build process.
+
+Quick Start:
+ #. Install ``nbsphinx``
+
+ #. Edit your ``conf.py`` and add ``'nbsphinx'`` to ``extensions``.
+
+ #. Edit your ``index.rst`` and add the names of your ``*.ipynb`` files
+ to the ``toctree``.
+
+ #. Run Sphinx!
+
+Online documentation (and example of use):
+ https://nbsphinx.readthedocs.io/
+
+Source code repository (and issue tracker):
+ https://github.com/spatialaudio/nbsphinx/
+
+License:
+ MIT -- see the file ``LICENSE`` for details.
+
+.. _Sphinx: https://www.sphinx-doc.org/
+.. _Jupyter Notebook: https://jupyter.org/
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/README.rst
new/nbsphinx-0.8.8/README.rst
--- old/nbsphinx-0.8.6/README.rst 2020-04-08 21:36:23.000000000 +0200
+++ new/nbsphinx-0.8.8/README.rst 2021-12-07 13:02:04.000000000 +0100
@@ -19,7 +19,7 @@
#. Run Sphinx!
Online documentation (and example of use):
- http://nbsphinx.readthedocs.io/
+ https://nbsphinx.readthedocs.io/
Source code repository (and issue tracker):
https://github.com/spatialaudio/nbsphinx/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/a-normal-rst-file.rst
new/nbsphinx-0.8.8/doc/a-normal-rst-file.rst
--- old/nbsphinx-0.8.6/doc/a-normal-rst-file.rst 2021-04-29
17:22:53.000000000 +0200
+++ new/nbsphinx-0.8.8/doc/a-normal-rst-file.rst 2021-12-22
10:19:14.000000000 +0100
@@ -171,8 +171,8 @@
References
----------
-There are different ways of handling references, for example you could use the
-`standard Sphinx citations`_, but it might be more practical to use the
+There are different ways of handling references, for example you could use the
+`standard Sphinx citations`_, but it might be more practical to use the
sphinxcontrib.bibtex_ extension.
After installing the sphinxcontrib.bibtex_ extension, you have to enable it in
@@ -205,7 +205,7 @@
:cite:`perez2011python`
You can create similar citations in Jupyter notebooks with a special HTML
-syntax, see the section about
+syntax, see the section about
`citations in Markdown cells <markdown-cells.ipynb#Citations>`__.
You can create a list of references in any reStructuredText file
@@ -230,8 +230,8 @@
Footnote citations
^^^^^^^^^^^^^^^^^^
-With a sphinxcontrib.bibtex_ version of ``>= 2.0.0`` it is
-possible to create footnote bibliographies with footnote
+With a sphinxcontrib.bibtex_ version of ``>= 2.0.0`` it is
+possible to create footnote bibliographies with footnote
citations like :footcite:`perez2011python`.
.. code-block:: rst
@@ -239,22 +239,22 @@
:footcite:`perez2011python`
Also footnote citations can be used within Jupyter notebooks with a special
HTML syntax,
-see the section about
+see the section about
`footnote citations in Markdown cells
<markdown-cells.ipynb#Footnote-citations>`__.
-Footnote citations are restricted to their own source file and the assembly of
the
+Footnote citations are restricted to their own source file and the assembly of
the
bibliography is (analogously to normal citations) invoked with the
.. code-block:: rst
.. footbibliography::
-directive. For example, a footnote bibliography might
+directive. For example, a footnote bibliography might
look like this (in HTML output):
.. footbibliography::
-In the LaTeX/PDF output, there is no list of references appearing right
-here. Instead, the footnote citations are placed into the footnotes of
+In the LaTeX/PDF output, there is no list of references appearing right
+here. Instead, the footnote citations are placed into the footnotes of
their respective pages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/allow-errors.ipynb
new/nbsphinx-0.8.8/doc/allow-errors.ipynb
--- old/nbsphinx-0.8.6/doc/allow-errors.ipynb 2021-05-12 11:20:27.000000000
+0200
+++ new/nbsphinx-0.8.8/doc/allow-errors.ipynb 2021-12-22 09:27:49.000000000
+0100
@@ -68,24 +68,6 @@
"metadata": {},
"outputs": [],
"source": [
- "print 'Hello, world!'"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "6 ~ 7"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
"6 * 7"
]
}
@@ -106,12 +88,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.6.7"
+ "version": "3.9.7"
},
"nbsphinx": {
"allow_errors": true
}
},
"nbformat": 4,
- "nbformat_minor": 2
+ "nbformat_minor": 4
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/code-cells.ipynb
new/nbsphinx-0.8.8/doc/code-cells.ipynb
--- old/nbsphinx-0.8.6/doc/code-cells.ipynb 2021-04-29 17:22:53.000000000
+0200
+++ new/nbsphinx-0.8.8/doc/code-cells.ipynb 2021-12-07 13:02:04.000000000
+0100
@@ -685,7 +685,7 @@
"To obtain more information if widgets are not displayed as expected, you
will need to look at the error message in the web browser console.\n",
"\n",
"> To figure out how to open the web browser console, you may look at the
web browser documentation: \n",
- "> Chrome:
https://developers.google.com/web/tools/chrome-devtools/open#console \n",
+ "> Chrome: https://developer.chrome.com/docs/devtools/open/#console \n",
"> Firefox:
https://developer.mozilla.org/en-US/docs/Tools/Web_Console#opening_the_web_console\n",
"\n",
"The error is most probably linked to the JavaScript files not being
loaded or loaded in the wrong order within the HTML file. To analyze the error,
you can inspect the HTML file within the web browser (e.g.: right-click on the
page and select *View Page Source*) and look at the `<head>` section of the
page. That section should contain\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/conf.py
new/nbsphinx-0.8.8/doc/conf.py
--- old/nbsphinx-0.8.6/doc/conf.py 2021-05-25 10:29:23.000000000 +0200
+++ new/nbsphinx-0.8.8/doc/conf.py 2021-12-31 12:18:04.000000000 +0100
@@ -10,8 +10,19 @@
'sphinxcontrib.rsvgconverter', # for SVG->PDF conversion in LaTeX output
'sphinx_gallery.load_style', # load CSS for gallery (needs SG >= 0.6)
'sphinx_last_updated_by_git', # get "last updated" from Git
+ 'sphinx_codeautolink', # automatic links from code to documentation
+ 'sphinx.ext.intersphinx', # links to other Sphinx projects (e.g. NumPy)
]
+# These projects are also used for the sphinx_codeautolink extension:
+intersphinx_mapping = {
+ 'IPython': ('https://ipython.readthedocs.io/en/stable/', None),
+ 'matplotlib': ('https://matplotlib.org/', None),
+ 'numpy': ('https://docs.scipy.org/doc/numpy/', None),
+ 'pandas': ('https://pandas.pydata.org/docs/', None),
+ 'python': ('https://docs.python.org/3/', None),
+}
+
# Don't add .txt suffix to source files:
html_sourcelink_suffix = ''
@@ -83,6 +94,10 @@
'.md': ['jupytext.reads', {'fmt': 'Rmd'}],
}
+# Import Matplotlib to avoid this message in notebooks:
+# "Matplotlib is building the font cache; this may take a moment."
+import matplotlib.pyplot
+
# -- The settings below this line are not specific to nbsphinx ------------
master_doc = 'index'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/markdown-cells.ipynb
new/nbsphinx-0.8.8/doc/markdown-cells.ipynb
--- old/nbsphinx-0.8.6/doc/markdown-cells.ipynb 2021-06-01 18:09:42.000000000
+0200
+++ new/nbsphinx-0.8.8/doc/markdown-cells.ipynb 2021-12-07 13:02:04.000000000
+0100
@@ -23,6 +23,8 @@
"* Green\n",
"* Blue\n",
"\n",
+ "Note: JupyterLab and JupyterNotebook uses a different Markdown parser
than nbsphinx (which currently uses Pandoc). \n",
+ "In case that your Bulletpoints do render in the notebook and do not
render with nbsphinx, please add one blank line before the bulletpoints.\n",
"***\n",
"\n",
"1. One\n",
@@ -642,7 +644,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.2"
+ "version": "3.9.5"
}
},
"nbformat": 4,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/prolog-and-epilog.ipynb
new/nbsphinx-0.8.8/doc/prolog-and-epilog.ipynb
--- old/nbsphinx-0.8.6/doc/prolog-and-epilog.ipynb 2021-04-29
18:34:24.000000000 +0200
+++ new/nbsphinx-0.8.8/doc/prolog-and-epilog.ipynb 2021-12-07
13:02:04.000000000 +0100
@@ -21,14 +21,14 @@
"The prolog and epilog strings can hold arbitrary
[reST](https://www.sphinx-doc.org/rest.html) markup.\n",
"Particularly, the
[only](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-only)
and
[raw](https://docutils.sourceforge.io/docs/ref/rst/directives.html#raw-data-pass-through)
directives can be used to have different content for HTML and LaTeX output.\n",
"\n",
- "Those strings are also processed by the [Jinja2](http://jinja.pocoo.org/)
templating engine.\n",
+ "Those strings are also processed by the
[Jinja2](https://jinja.palletsprojects.com/) templating engine.\n",
"This means you can run Python-like code within those strings.\n",
"You have access to the current [Sphinx build
environment](https://www.sphinx-doc.org/en/master/extdev/envapi.html) via the
variable `env`.\n",
"Most notably, you can get the file name of the current notebook with\n",
"\n",
" {{ env.doc2path(env.docname, base=None) }}\n",
"\n",
- "Have a look at the [Jinja2 template
documentation](http://jinja.pocoo.org/docs/latest/templates/) for more
information.\n",
+ "Have a look at the [Jinja2 template
documentation](https://jinja.palletsprojects.com/templates/) for more
information.\n",
"\n",
"<div class=\"alert alert-warning\">\n",
"\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/requirements.txt
new/nbsphinx-0.8.8/doc/requirements.txt
--- old/nbsphinx-0.8.6/doc/requirements.txt 2021-05-15 10:56:06.000000000
+0200
+++ new/nbsphinx-0.8.8/doc/requirements.txt 2021-12-22 09:27:49.000000000
+0100
@@ -8,3 +8,4 @@
sphinx-gallery
jupytext
sphinx-last-updated-by-git
+sphinx-codeautolink
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/doc/usage.ipynb
new/nbsphinx-0.8.8/doc/usage.ipynb
--- old/nbsphinx-0.8.6/doc/usage.ipynb 2021-04-29 20:03:57.000000000 +0200
+++ new/nbsphinx-0.8.8/doc/usage.ipynb 2021-12-07 13:02:04.000000000 +0100
@@ -64,7 +64,7 @@
"### Sphinx Configuration Values\n",
"\n",
"All configuration values are described in the\n",
- "[Sphinx
documentation](http://www.sphinx-doc.org/en/master/usage/configuration.html),\n",
+ "[Sphinx
documentation](https://www.sphinx-doc.org/en/master/usage/configuration.html),\n",
"here we mention only the ones which may be relevant\n",
"in combination with `nbsphinx`."
]
@@ -80,7 +80,7 @@
"whether you want to use them or not.\n",
"If you want certain source files not to be built,\n",
"specify them in\n",
-
"[exclude_patterns](http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-exclude_patterns).\n",
+
"[exclude_patterns](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-exclude_patterns).\n",
"For example, you might want to ignore source files in your build
directory:\n",
"\n",
"```python\n",
@@ -101,7 +101,7 @@
"\n",
"This is the only required value.\n",
"You have to add `'nbsphinx'` to the list of\n",
-
"[extensions](http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-extensions),\n",
+
"[extensions](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-extensions),\n",
"otherwise it won't work.\n",
"\n",
"Other interesting extensions are:\n",
@@ -137,12 +137,12 @@
"\n",
"By default, a `.txt` suffix is added to source files.\n",
"This is only relevant if the chosen HTML theme supports source links and
if\n",
-
"[html_show_sourcelink](http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_show_sourcelink)\n",
+
"[html_show_sourcelink](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_show_sourcelink)\n",
"is `True`.\n",
"\n",
"Jupyter notebooks with the suffix `.ipynb.txt` are normally not very
useful,\n",
"so if you want to avoid the additional suffix, set\n",
-
"[html_sourcelink_suffix](http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sourcelink_suffix)
to the empty string:\n",
+
"[html_sourcelink_suffix](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sourcelink_suffix)
to the empty string:\n",
"\n",
"```python\n",
"html_sourcelink_suffix = ''\n",
@@ -155,7 +155,7 @@
"source": [
"#### `latex_additional_files`\n",
"\n",
-
"[latex_additional_files](http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_additional_files)\n",
+
"[latex_additional_files](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_additional_files)\n",
"can be useful if you are using BibTeX files, see\n",
"[References](a-normal-rst-file.rst#references)."
]
@@ -401,7 +401,7 @@
"\n",
"If you use a local file,\n",
"it should be located in a directory listed in\n",
-
"[html_static_path](http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_static_path).\n",
+
"[html_static_path](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_static_path).\n",
"\n",
"Set to empty string to disable loading RequireJS."
]
@@ -470,7 +470,7 @@
"\n",
"If you use a local file,\n",
"it should be located in a directory listed in\n",
-
"[html_static_path](http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_static_path).\n",
+
"[html_static_path](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_static_path).\n",
"\n",
"For loading the widgets resources,\n",
"RequireJS is needed,\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/src/nbsphinx.egg-info/PKG-INFO
new/nbsphinx-0.8.8/src/nbsphinx.egg-info/PKG-INFO
--- old/nbsphinx-0.8.6/src/nbsphinx.egg-info/PKG-INFO 2021-06-03
10:40:14.000000000 +0200
+++ new/nbsphinx-0.8.8/src/nbsphinx.egg-info/PKG-INFO 2021-12-31
13:26:09.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: nbsphinx
-Version: 0.8.6
+Version: 0.8.8
Summary: Jupyter Notebook Tools for Sphinx
Home-page: https://nbsphinx.readthedocs.io/
Author: Matthias Geier
@@ -9,38 +9,6 @@
Project-URL: Documentation, https://nbsphinx.readthedocs.io/
Project-URL: Source Code, https://github.com/spatialaudio/nbsphinx/
Project-URL: Bug Tracker, https://github.com/spatialaudio/nbsphinx/issues/
-Description: Jupyter Notebook Tools for Sphinx
- =================================
-
- ``nbsphinx`` is a Sphinx_ extension that provides a source parser for
- ``*.ipynb`` files.
- Custom Sphinx directives are used to show `Jupyter Notebook`_ code
cells (and of
- course their results) in both HTML and LaTeX output.
- Un-evaluated notebooks -- i.e. notebooks without stored output cells
-- will be
- automatically executed during the Sphinx build process.
-
- Quick Start:
- #. Install ``nbsphinx``
-
- #. Edit your ``conf.py`` and add ``'nbsphinx'`` to ``extensions``.
-
- #. Edit your ``index.rst`` and add the names of your ``*.ipynb``
files
- to the ``toctree``.
-
- #. Run Sphinx!
-
- Online documentation (and example of use):
- http://nbsphinx.readthedocs.io/
-
- Source code repository (and issue tracker):
- https://github.com/spatialaudio/nbsphinx/
-
- License:
- MIT -- see the file ``LICENSE`` for details.
-
- .. _Sphinx: https://www.sphinx-doc.org/
- .. _Jupyter Notebook: https://jupyter.org/
-
Keywords: Sphinx,Jupyter,notebook
Platform: any
Classifier: Framework :: Sphinx
@@ -54,3 +22,38 @@
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Documentation :: Sphinx
Requires-Python: >=3.6
+License-File: LICENSE
+
+Jupyter Notebook Tools for Sphinx
+=================================
+
+``nbsphinx`` is a Sphinx_ extension that provides a source parser for
+``*.ipynb`` files.
+Custom Sphinx directives are used to show `Jupyter Notebook`_ code cells (and
of
+course their results) in both HTML and LaTeX output.
+Un-evaluated notebooks -- i.e. notebooks without stored output cells -- will be
+automatically executed during the Sphinx build process.
+
+Quick Start:
+ #. Install ``nbsphinx``
+
+ #. Edit your ``conf.py`` and add ``'nbsphinx'`` to ``extensions``.
+
+ #. Edit your ``index.rst`` and add the names of your ``*.ipynb`` files
+ to the ``toctree``.
+
+ #. Run Sphinx!
+
+Online documentation (and example of use):
+ https://nbsphinx.readthedocs.io/
+
+Source code repository (and issue tracker):
+ https://github.com/spatialaudio/nbsphinx/
+
+License:
+ MIT -- see the file ``LICENSE`` for details.
+
+.. _Sphinx: https://www.sphinx-doc.org/
+.. _Jupyter Notebook: https://jupyter.org/
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbsphinx-0.8.6/src/nbsphinx.py
new/nbsphinx-0.8.8/src/nbsphinx.py
--- old/nbsphinx-0.8.6/src/nbsphinx.py 2021-06-03 10:38:13.000000000 +0200
+++ new/nbsphinx-0.8.8/src/nbsphinx.py 2021-12-31 13:21:36.000000000 +0100
@@ -23,7 +23,7 @@
https://nbsphinx.readthedocs.io/
"""
-__version__ = '0.8.6'
+__version__ = '0.8.8'
import collections.abc
import copy
@@ -61,7 +61,7 @@
logger = sphinx.util.logging.getLogger(__name__)
-_BROKEN_THUMBNAIL = object()
+_BROKEN_THUMBNAIL = None
# See nbconvert/exporters/html.py:
DISPLAY_DATA_PRIORITY_HTML = (
@@ -162,6 +162,10 @@
{{ output.data[datatype] | escape_latex | ansi2latex | indent | indent }}
\\end{sphinxVerbatim}
+ .. raw:: text
+
+{{ output.data[datatype] | indent | indent }}
+
{%- elif datatype in ['image/svg+xml', 'image/png', 'image/jpeg',
'application/pdf'] %}
.. image:: {{ output.metadata.filenames[datatype] | posix_path }}
@@ -644,7 +648,7 @@
}
/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
-.prompt a.copybtn {
+.prompt .copybtn {
display: none;
}
@@ -795,7 +799,12 @@
'save_attachments': save_attachments,
'replace_attachments': replace_attachments,
'get_output_type': _get_output_type,
- 'json_dumps': json.dumps,
+ 'json_dumps': lambda s: re.sub(
+ r'<(/script)',
+ r'<\\\1',
+ json.dumps(s),
+ flags=re.IGNORECASE,
+ ),
'basename': os.path.basename,
'dirname': os.path.dirname,
})
@@ -1056,6 +1065,8 @@
env.config.nbsphinx_prolog).render(env=env)
rst.Parser.parse(self, prolog, document)
rst.Parser.parse(self, '.. highlight:: none', document)
+ if 'sphinx_codeautolink' in env.config.extensions:
+ rst.Parser.parse(self, '.. autolink-concat:: on', document)
rst.Parser.parse(self, rststring, document)
if env.config.nbsphinx_epilog:
epilog = exporter.environment.from_string(
@@ -1229,14 +1240,14 @@
"""Wrap GalleryToc arount toctree."""
ret = super().run()
try:
- toctree_wrapper, = ret
+ toctree_wrapper = ret[-1]
toctree, = toctree_wrapper
- except ValueError:
+ except (IndexError, TypeError, ValueError):
return ret
if not isinstance(toctree, sphinx.addnodes.toctree):
return ret
gallerytoc = GalleryToc()
- gallerytoc += toctree_wrapper
+ gallerytoc.extend(ret)
return [gallerytoc]
@@ -1864,6 +1875,8 @@
def config_inited(app, config):
+ if '.ipynb' not in config.source_suffix:
+ app.add_source_suffix('.ipynb', 'jupyter_notebook')
for suffix in config.nbsphinx_custom_formats:
app.add_source_suffix(suffix, 'jupyter_notebook')
@@ -1874,6 +1887,26 @@
# see https://github.com/spatialaudio/nbsphinx/issues/409
app.connect('builder-inited', load_requirejs)
+ # http://docs.mathjax.org/en/v3.1-latest/options/document.html
+ # http://docs.mathjax.org/en/v2.7-latest/options/preprocessors/tex2jax.html
+ mathjax_inline_math = [['$', '$'], ['\\(', '\\)']]
+ mathjax_ignore_class = (
+ 'tex2jax_ignore' # MathJax 2 default
+ '|'
+ 'mathjax_ignore' # Mathjax 3 default
+ '|'
+ 'document' # Main page content
+ )
+ mathjax_process_class = (
+ 'tex2jax_process' # MathJax 2 default
+ '|'
+ 'mathjax_process' # Mathjax 3 default
+ '|'
+ 'math' # Used by Sphinx
+ '|'
+ 'output_area' # Jupyter code cells
+ )
+
# See also https://github.com/sphinx-doc/sphinx/pull/5504
if hasattr(config, 'mathjax3_config') and config.mathjax2_config is None:
# NB: If mathjax_path is used in Sphinx >= 4 to load MathJax v2,
@@ -1882,14 +1915,14 @@
config.mathjax3_config = {}
mathjax3_config = config.mathjax3_config
tex = {
- 'inlineMath': [['$', '$'], ['\\(', '\\)']],
+ 'inlineMath': mathjax_inline_math,
'processEscapes': True,
}
tex.update(mathjax3_config.get('tex', {}))
mathjax3_config['tex'] = tex
options = {
- 'ignoreHtmlClass': 'document',
- 'processHtmlClass': 'math|output_area',
+ 'ignoreHtmlClass': mathjax_ignore_class,
+ 'processHtmlClass': mathjax_process_class,
}
options.update(mathjax3_config.get('options', {}))
mathjax3_config['options'] = options
@@ -1905,10 +1938,10 @@
config.mathjax_config = {}
mathjax2_config = config.mathjax_config
tex2jax = {
- 'inlineMath': [['$', '$'], ['\\(', '\\)']],
+ 'inlineMath': mathjax_inline_math,
'processEscapes': True,
- 'ignoreClass': 'document',
- 'processClass': 'math|output_area',
+ 'ignoreClass': mathjax_ignore_class,
+ 'processClass': mathjax_process_class,
}
tex2jax.update(mathjax2_config.get('tex2jax', {}))
mathjax2_config['tex2jax'] = tex2jax
@@ -2106,9 +2139,9 @@
"""Add empty lines before and after the code."""
text = self.body[-1]
text = text.replace('<pre>',
- '<pre>\n' + '\n' * node.get('empty-lines-before', 0))
+ '<pre>' + '<br/>' * node.get('empty-lines-before', 0))
text = text.replace('</pre>',
- '\n' * node.get('empty-lines-after', 0) + '</pre>')
+ '<br/>' * node.get('empty-lines-after', 0) + '</pre>')
self.body[-1] = text
@@ -2148,11 +2181,21 @@
if lines[0].startswith(r'\fvset{'): # Sphinx >= 1.6.6 and < 1.8.3
out.append(lines[0])
del lines[0]
- assert 'Verbatim' in lines[0]
- out.append(lines[0])
+ # Sphinx 4.1.0 added "sphinxuseclass" environments around "sphinxVerbatim"
+ for begin_verbatim, line in enumerate(lines):
+ if line.startswith(r'\begin{sphinxVerbatim}'):
+ break
+ else:
+ assert False
+ for end_verbatim, line in enumerate(reversed(lines)):
+ if line == r'\end{sphinxVerbatim}':
+ break
+ else:
+ assert False
+ out.extend(lines[:begin_verbatim + 1])
code_lines = (
[''] * node.get('empty-lines-before', 0) +
- lines[1:-1] +
+ lines[begin_verbatim + 1:-end_verbatim - 1] +
[''] * node.get('empty-lines-after', 0)
)
prompt = node['prompt']
@@ -2163,8 +2206,7 @@
assert code_lines
code_lines[0] = prefix + code_lines[0]
out.extend(code_lines)
- assert 'Verbatim' in lines[-1]
- out.append(lines[-1])
+ out.extend(lines[-end_verbatim - 1:])
out.append('}') # End of scope for colors
out.append('')
self.body.append('\n'.join(out))
@@ -2218,6 +2260,14 @@
self.body.append('\\end{sphinxadmonition}\n')
+def visit_admonition_text(self, node):
+ self.new_state(0)
+
+
+def depart_admonition_text(self, node):
+ self.end_state()
+
+
def depart_gallery_html(self, node):
for title, uri, filename, tooltip in node['entries']:
if tooltip:
@@ -2250,7 +2300,6 @@
def setup(app):
"""Initialize Sphinx extension."""
- app.add_source_suffix('.ipynb', 'jupyter_notebook')
app.add_source_parser(NotebookParser)
app.add_config_value('nbsphinx_execute', 'auto', rebuild='env')
@@ -2283,16 +2332,20 @@
app.add_directive('nbgallery', NbGallery)
app.add_node(CodeAreaNode,
html=(do_nothing, depart_codearea_html),
- latex=(visit_codearea_latex, depart_codearea_latex))
+ latex=(visit_codearea_latex, depart_codearea_latex),
+ text=(do_nothing, do_nothing))
app.add_node(FancyOutputNode,
html=(do_nothing, do_nothing),
- latex=(visit_fancyoutput_latex, depart_fancyoutput_latex))
+ latex=(visit_fancyoutput_latex, depart_fancyoutput_latex),
+ text=(do_nothing, do_nothing))
app.add_node(AdmonitionNode,
html=(visit_admonition_html, depart_admonition_html),
- latex=(visit_admonition_latex, depart_admonition_latex))
+ latex=(visit_admonition_latex, depart_admonition_latex),
+ text=(visit_admonition_text, depart_admonition_text))
app.add_node(GalleryNode,
html=(do_nothing, depart_gallery_html),
- latex=(do_nothing, do_nothing))
+ latex=(do_nothing, do_nothing),
+ text=(do_nothing, do_nothing))
app.connect('builder-inited', builder_inited)
app.connect('config-inited', config_inited)
app.connect('html-page-context', html_page_context)
@@ -2326,5 +2379,5 @@
'version': __version__,
'parallel_read_safe': True,
'parallel_write_safe': True,
- 'env_version': 3,
+ 'env_version': 4,
}