[Python-modules-commits] [nbsphinx] 02/04: Import nbsphinx_0.3.1+ds.orig.tar.xz
Jerome Benoit
calculus-guest at moszumanska.debian.org
Fri Jan 19 21:25:38 UTC 2018
This is an automated email from the git hooks/post-receive script.
calculus-guest pushed a commit to branch master
in repository nbsphinx.
commit f054aa3bf94a6437fec4a62cba930d7730ae094e
Author: Jerome Benoit <calculus at rezozer.net>
Date: Fri Jan 19 20:55:51 2018 +0400
Import nbsphinx_0.3.1+ds.orig.tar.xz
---
LICENSE | 2 +-
NEWS.rst | 19 ++++
PKG-INFO | 34 +++----
README.rst | 29 +++---
doc/a-normal-rst-file.rst | 30 ++++--
doc/allow-errors.ipynb | 22 ++---
doc/code-cells.ipynb | 126 +++++++-----------------
doc/conf.py | 41 +++++++-
doc/hidden-cells.ipynb | 14 ++-
doc/images/stickfigure.png | Bin 1167 -> 0 bytes
doc/index.rst | 4 +-
doc/installation.ipynb | 163 ++++++++++++++++++++++++++++++++
doc/links.ipynb | 30 +++++-
doc/markdown-cells.ipynb | 45 ++++++++-
doc/never-execute.ipynb | 6 +-
doc/orphan.ipynb | 12 +--
doc/pre-executed.ipynb | 27 ++----
doc/prolog-and-epilog.ipynb | 122 ++++++++++++++++++++++++
doc/raw-cells.ipynb | 2 +-
doc/requirements.txt | 2 +-
doc/subdir/a-notebook-in-a-subdir.ipynb | 6 +-
doc/subdir/example.ipynb | 87 -----------------
doc/subdir/toctree.ipynb | 2 +-
doc/timeout.ipynb | 6 +-
doc/usage.ipynb | 154 ++++++++++++------------------
setup.py | 8 +-
nbsphinx.py => src/nbsphinx.py | 152 ++++++++++++++++++++++-------
27 files changed, 722 insertions(+), 423 deletions(-)
diff --git a/LICENSE b/LICENSE
index 383db4c..bf642c0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2015-2017 Matthias Geier
+Copyright (c) 2015-2018 Matthias Geier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/NEWS.rst b/NEWS.rst
index 14bce0d..452c63e 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -1,3 +1,22 @@
+Version 0.3.1 (2018-01-17):
+ * Enable notebook translations (NB: The use of reST strings is temporary!)
+
+Version 0.3.0 (2018-01-02):
+ * Add options ``nbsphinx_prolog`` and ``nbsphinx_epilog``
+ * Links from ``*.rst`` files to notebooks have to start with a slash
+
+Version 0.2.18 (2017-12-03):
+ * Fix issue #148
+
+Version 0.2.17 (2017-11-12):
+ * Fix issue #146
+
+Version 0.2.16 (2017-11-07):
+ * Fix issue #142
+
+Version 0.2.15 (2017-11-03):
+ * Links to subsections are now possible in all source files
+
Version 0.2.14 (2017-06-09):
* Add option ``nbsphinx_kernel_name``
diff --git a/PKG-INFO b/PKG-INFO
index e4aaafa..bb27b8c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,11 +1,12 @@
Metadata-Version: 1.1
Name: nbsphinx
-Version: 0.2.14
+Version: 0.3.1
Summary: Jupyter Notebook Tools for Sphinx
-Home-page: http://nbsphinx.rtfd.io/
+Home-page: http://nbsphinx.readthedocs.io/
Author: Matthias Geier
Author-email: Matthias.Geier at gmail.com
License: MIT
+Description-Content-Type: UNKNOWN
Description: Jupyter Notebook Tools for Sphinx
=================================
@@ -16,32 +17,27 @@ Description: Jupyter Notebook Tools for Sphinx
Un-evaluated notebooks -- i.e. notebooks without stored output cells -- will be
automatically executed during the Sphinx build process.
- .. _Sphinx: http://sphinx-doc.org/
- .. _Jupyter Notebook: http://jupyter.org/
+ Quick Start:
+ #. Install ``nbsphinx``
- Documentation (and example of use):
+ #. 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/
- Python Package Index:
- https://pypi.python.org/pypi/nbsphinx/
-
License:
MIT -- see the file ``LICENSE`` for details.
- Quick Start:
- #. Install ``nbsphinx``::
-
- python3 -m pip install nbsphinx --user
-
- #. 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!
+ .. _Sphinx: http://sphinx-doc.org/
+ .. _Jupyter Notebook: http://jupyter.org/
Keywords: Sphinx,Jupyter,notebook
Platform: any
diff --git a/README.rst b/README.rst
index 706d7fb..aa8c301 100644
--- a/README.rst
+++ b/README.rst
@@ -8,29 +8,24 @@ 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.
-.. _Sphinx: http://sphinx-doc.org/
-.. _Jupyter Notebook: http://jupyter.org/
+Quick Start:
+ #. Install ``nbsphinx``
-Documentation (and example of use):
+ #. 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/
-Python Package Index:
- https://pypi.python.org/pypi/nbsphinx/
-
License:
MIT -- see the file ``LICENSE`` for details.
-Quick Start:
- #. Install ``nbsphinx``::
-
- python3 -m pip install nbsphinx --user
-
- #. 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!
+.. _Sphinx: http://sphinx-doc.org/
+.. _Jupyter Notebook: http://jupyter.org/
diff --git a/doc/a-normal-rst-file.rst b/doc/a-normal-rst-file.rst
index 6b6f9fc..d3e945c 100644
--- a/doc/a-normal-rst-file.rst
+++ b/doc/a-normal-rst-file.rst
@@ -9,35 +9,35 @@ Links to Notebooks
------------------
Links to notebooks can be easily created:
-:ref:`subdir/a-notebook-in-a-subdir.ipynb`
+:ref:`/subdir/a-notebook-in-a-subdir.ipynb`
(the notebook title is used as link text).
You can also use
-:ref:`an alternative text <subdir/a-notebook-in-a-subdir.ipynb>`.
+:ref:`an alternative text </subdir/a-notebook-in-a-subdir.ipynb>`.
The above links were created with:
.. code-block:: rst
- :ref:`subdir/a-notebook-in-a-subdir.ipynb`
- :ref:`an alternative text <subdir/a-notebook-in-a-subdir.ipynb>`
+ :ref:`/subdir/a-notebook-in-a-subdir.ipynb`
+ :ref:`an alternative text </subdir/a-notebook-in-a-subdir.ipynb>`
Links to subsections are also possible, e.g.
-:ref:`subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section`
+:ref:`/subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section`
(the subsection title is used as link text) and
-:ref:`alternative text <subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section>`.
+:ref:`alternative text </subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section>`.
These links were created with:
.. code-block:: rst
- :ref:`subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section`
- :ref:`alternative text <subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section>`
+ :ref:`/subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section`
+ :ref:`alternative text </subdir/a-notebook-in-a-subdir.ipynb#A-Sub-Section>`
.. note::
* Spaces in the section title have to be replaced by hyphens!
- * "``../``" is not allowed, you have to specify the full path even if the
- current source file is in a subdirectory!
+ * Notebook paths have to be relative to the top source directory and they
+ have to start with a slash (``/``).
Sphinx Directives for Info/Warning Boxes
----------------------------------------
@@ -65,3 +65,13 @@ This is how an info box looks like:
It may include nested formatting, even another info/warning box:
.. nbwarning:: **Warning:** You should probably not use nested boxes!
+
+Domain Objects
+--------------
+
+.. py:function:: example_python_function(foo)
+
+ This is just for testing domain object links. See
+ :ref:`this section </markdown-cells.ipynb#Links-to-Domain-Objects>`.
+
+ :param str foo: Example string parameter
diff --git a/doc/allow-errors.ipynb b/doc/allow-errors.ipynb
index c67c829..270bd8b 100644
--- a/doc/allow-errors.ipynb
+++ b/doc/allow-errors.ipynb
@@ -41,9 +41,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"nonsense"
@@ -52,9 +50,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"42 / 0"
@@ -63,9 +59,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"print 'Hello, world!'"
@@ -74,9 +68,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"6 ~ 7"
@@ -85,9 +77,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"6 * 7"
@@ -110,7 +100,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.5.1+"
+ "version": "3.6.4"
},
"nbsphinx": {
"allow_errors": true
diff --git a/doc/code-cells.ipynb b/doc/code-cells.ipynb
index 5a4de55..dcd8499 100644
--- a/doc/code-cells.ipynb
+++ b/doc/code-cells.ipynb
@@ -23,9 +23,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": []
},
@@ -39,9 +37,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": [
"\n"
@@ -57,9 +53,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": [
"\n",
@@ -77,9 +71,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"6 * 7"
@@ -95,9 +87,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"print('Hello, world!')"
@@ -113,9 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"print('Hello, world!')\n",
@@ -134,14 +122,12 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"import sys\n",
"\n",
- "print(\"I'll appear on the standard error stream\", file=sys.stderr, flush=True)\n",
+ "print(\"I'll appear on the standard error stream\", file=sys.stderr)\n",
"print(\"I'll appear on the standard output stream\")\n",
"\"I'm the 'normal' output\""
]
@@ -152,15 +138,13 @@
"source": [
"## Cell Magics\n",
"\n",
- "Cells can contain code in other languages by means of [cell magics](http://ipython.readthedocs.io/en/stable/interactive/magics.html#cell-magics):"
+ "IPython can handle code in other languages by means of [cell magics](http://ipython.readthedocs.io/en/stable/interactive/magics.html#cell-magics):"
]
},
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"%%bash\n",
@@ -184,9 +168,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"from IPython.display import display"
@@ -202,9 +184,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"from IPython.display import Image\n",
@@ -215,9 +195,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"display(i)"
@@ -233,9 +211,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"from IPython.display import SVG\n",
@@ -252,9 +228,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"Image(url='https://www.python.org/static/img/python-logo-large.png')"
@@ -263,9 +237,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"Image(url='https://www.python.org/static/img/python-logo-large.png', embed=True)"
@@ -274,9 +246,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"Image(url='http://jupyter.org/assets/nav_logo.svg')"
@@ -285,9 +255,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"Image(url='https://www.python.org/static/favicon.ico')"
@@ -296,9 +264,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"Image(url='http://python.org/images/python-logo.gif')"
@@ -314,9 +280,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"from IPython.display import Math\n",
@@ -327,9 +291,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"display(eq)"
@@ -338,9 +300,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"%%latex\n",
@@ -359,9 +319,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"from IPython.display import YouTubeVideo\n",
@@ -370,10 +328,7 @@
},
{
"cell_type": "markdown",
- "metadata": {
- "deletable": true,
- "editable": true
- },
+ "metadata": {},
"source": [
"### Arbitrary JavaScript Output (HTML only)"
]
@@ -381,11 +336,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false,
- "deletable": true,
- "editable": true
- },
+ "metadata": {},
"outputs": [],
"source": [
"%%javascript\n",
@@ -403,7 +354,7 @@
"\n",
"**Note:**\n",
"\n",
- "jQuery should be available, but using the readthedocs.org default theme, it's not. See [the issue on Github](https://github.com/snide/sphinx_rtd_theme/issues/328).\n",
+ "jQuery should be available, but using the readthedocs.org default theme, it's not. See [the issue on Github](https://github.com/rtfd/sphinx_rtd_theme/issues/328).\n",
"Other Sphinx themes are not affected by this.\n",
"\n",
"</div>"
@@ -422,9 +373,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"display({\n",
@@ -446,12 +395,13 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
- "collapsed": false
+ "scrolled": true
},
"outputs": [],
"source": [
- "print('BEWARE: \\x1b[1;33;41mugly colors\\x1b[m!', file=sys.stderr, flush=True)\n",
- "print('ABC\\x1b[43mDEF\\x1b[35mGHI\\x1b[1mJKL\\x1b[49mMNO\\x1b[39mPQR\\x1b[22mSTU')"
+ "print('BEWARE: \\x1b[1;33;41mugly colors\\x1b[m!', file=sys.stderr)\n",
+ "print('AB\\x1b[43mCD\\x1b[35mEF\\x1b[1mGH\\x1b[4mIJ\\x1b[7m'\n",
+ " 'KL\\x1b[49mMN\\x1b[39mOP\\x1b[22mQR\\x1b[24mST\\x1b[27mUV')"
]
},
{
@@ -465,9 +415,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"text = ' XYZ '\n",
@@ -494,9 +442,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"formatstring = '\\x1b[38;5;{0};48;5;{0}mX\\x1b[1mX\\x1b[m'\n",
@@ -519,9 +465,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"start = 255, 0, 0\n",
@@ -554,7 +498,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.5.2+"
+ "version": "3.6.3"
}
},
"nbformat": 4,
diff --git a/doc/conf.py b/doc/conf.py
index 047dc7b..e9ffab8 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -43,13 +43,51 @@ html_sourcelink_suffix = ''
# If window is narrower than this, input/output prompts are on separate lines:
#nbsphinx_responsive_width = '700px'
+# This is processed by Jinja2 and inserted before each notebook
+nbsphinx_prolog = r"""
+{% set docname = env.doc2path(env.docname, base='doc') %}
+
+.. only:: html
+
+ .. role:: raw-html(raw)
+ :format: html
+
+ .. nbinfo::
+
+ This page was generated from `{{ docname }}`__.
+ Interactive online version:
+ :raw-html:`<a href="https://mybinder.org/v2/gh/spatialaudio/nbsphinx/{{ env.config.release }}?filepath={{ docname }}"><img alt="Binder badge" src="https://mybinder.org/badge.svg" style="vertical-align:text-bottom"></a>`
+
+ __ https://github.com/spatialaudio/nbsphinx/blob/
+ {{ env.config.release }}/{{ docname }}
+
+.. raw:: latex
+
+ \vfil\penalty-1\vfilneg
+ \vspace{\baselineskip}
+ \textcolor{gray}{The following section was generated from
+ \texttt{\strut{}{{ docname }}}\\[-0.5\baselineskip]
+ \noindent\rule{\textwidth}{0.4pt}}
+ \vspace{-2\baselineskip}
+"""
+
+# This is processed by Jinja2 and inserted after each notebook
+nbsphinx_epilog = r"""
+.. raw:: latex
+
+ \textcolor{gray}{\noindent\rule{\textwidth}{0.4pt}\\
+ \hbox{}\hfill End of
+ \texttt{\strut{}{{ env.doc2path(env.docname, base='doc') }}}}
+ \vfil\penalty-1\vfilneg
+"""
+
# -- The settings below this line are not specific to nbsphinx ------------
master_doc = 'index'
project = 'nbsphinx'
author = 'Matthias Geier'
-copyright = '2017, ' + author
+copyright = '2018, ' + author
linkcheck_ignore = [r'http://localhost:\d+/']
@@ -70,6 +108,7 @@ html_title = project + ' version ' + release
latex_elements = {
'papersize': 'a4paper',
+ 'printindex': '',
'preamble': r"""
\usepackage[sc,osf]{mathpazo}
\linespread{1.05} % see http://www.tug.dk/FontCatalogue/urwpalladio/
diff --git a/doc/hidden-cells.ipynb b/doc/hidden-cells.ipynb
index a41fbc5..536d8f9 100644
--- a/doc/hidden-cells.ipynb
+++ b/doc/hidden-cells.ipynb
@@ -30,7 +30,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
- "collapsed": true,
"nbsphinx": "hidden"
},
"outputs": [],
@@ -49,9 +48,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"answer"
@@ -75,6 +72,13 @@
"source": [
"I am a *hidden* Markdown cell!"
]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This is the cell after the hidden cell."
+ ]
}
],
"metadata": {
@@ -93,7 +97,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.5.1+"
+ "version": "3.6.3"
}
},
"nbformat": 4,
diff --git a/doc/images/stickfigure.png b/doc/images/stickfigure.png
deleted file mode 100644
index c3310f1..0000000
Binary files a/doc/images/stickfigure.png and /dev/null differ
diff --git a/doc/index.rst b/doc/index.rst
index 3cec302..44faba6 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -7,16 +7,18 @@ was generated from Jupyter notebooks.
:maxdepth: 3
:glob:
+ installation.ipynb
usage.ipynb
markdown-cells.ipynb
code-cells.ipynb
raw-cells.ipynb
hidden-cells.ipynb
executing-notebooks.ipynb
+ prolog-and-epilog.ipynb
subdir/*
a-normal-rst-file.rst
links.ipynb
.. only:: html
- There is also :ref:`orphan.ipynb`, just for the sake of it.
+ There is also :ref:`/orphan.ipynb`, just for the sake of it.
diff --git a/doc/installation.ipynb b/doc/installation.ipynb
new file mode 100644
index 0000000..e8b19a7
--- /dev/null
+++ b/doc/installation.ipynb
@@ -0,0 +1,163 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nbsphinx": "hidden"
+ },
+ "source": [
+ "This notebook is part of the `nbsphinx` documentation: http://nbsphinx.readthedocs.io/."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Installation\n",
+ "\n",
+ "Note that some packages may be out-of-date.\n",
+ "You can always get the newest `nbsphinx` release from [PyPI](https://pypi.python.org/pypi/nbsphinx) (using `pip`).\n",
+ "If you want to try the latest development version, have a look at the file [CONTRIBUTING.rst](https://github.com/spatialaudio/nbsphinx/blob/master/CONTRIBUTING.rst).\n",
+ "\n",
+ "## nbsphinx Packages\n",
+ "\n",
+ "[![Anaconda Badge](https://anaconda.org/conda-forge/nbsphinx/badges/version.svg)](https://anaconda.org/conda-forge/nbsphinx)\n",
+ "\n",
+ "If you are using the `conda` package manager (e.g. with [Anaconda](https://www.anaconda.com/download/) for Linux/macOS/Windows), you can install `nbsphinx` from the [conda-forge](https://conda-forge.org/) channel:\n",
+ "\n",
+ " conda install -c conda-forge nbsphinx\n",
+ "\n",
+ "If you are using Linux, there are packages available for many distributions.\n",
+ "\n",
+ "[![Packaging status](https://repology.org/badge/vertical-allrepos/python:nbsphinx.svg)](https://repology.org/metapackage/python:nbsphinx)\n",
+ "\n",
+ "[![PyPI version](https://badge.fury.io/py/nbsphinx.svg)](https://pypi.python.org/pypi/nbsphinx)\n",
+ "\n",
+ "On any platform, you can also install `nbsphinx` with `pip`, Python's own package manager:\n",
+ "\n",
+ " python3 -m pip install nbsphinx --user\n",
+ "\n",
+ "If you want to install it system-wide for all users (assuming you have the necessary rights), just drop the `--user` flag.\n",
+ "\n",
+ "To upgrade an existing `nbsphinx` installation to the newest release, use the `--upgrade` flag:\n",
+ "\n",
+ " python3 -m pip install nbsphinx --upgrade --user\n",
+ "\n",
+ "If you suddenly change your mind, you can un-install it with:\n",
+ "\n",
+ " python3 -m pip uninstall nbsphinx\n",
+ "\n",
+ "Depending on your Python installation, you may have to use `python` instead of `python3`."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## nbsphinx Prerequisites\n",
+ "\n",
+ "Some of the aforementioned packages will install some of these prerequisites automatically, some of the things may be already installed on your computer anyway.\n",
+ "\n",
+ "### Python\n",
+ "\n",
+ "Of course you'll need Python, because both Sphinx and `nbsphinx` are implemented in Python.\n",
+ "There are many ways to get Python.\n",
+ "If you don't know which one is best for you, you can try [Anaconda](https://www.anaconda.com/download/).\n",
+ "\n",
+ "### Sphinx\n",
+ "\n",
+ "You'll need [Sphinx](http://www.sphinx-doc.org/) as well, because `nbsphinx` is just a Sphinx extension and doesn't do anything on its own.\n",
+ "\n",
+ "If you use `conda`, you can get [Sphinx from the conda-forge channel](https://anaconda.org/conda-forge/sphinx):\n",
+ "\n",
+ " conda install -c conda-forge sphinx\n",
+ "\n",
+ "Alternatively, you can install it with `pip` (see below):\n",
+ "\n",
+ " python3 -m pip install Sphinx --user\n",
+ "\n",
+ "### pip\n",
+ "\n",
+ "Recent versions of Python already come with `pip` pre-installed.\n",
+ "If you don't have it, you can [install it manually](https://pip.pypa.io/en/latest/installing/).\n",
+ "\n",
+ "### pandoc\n",
+ "\n",
+ "The stand-alone program [pandoc](http://pandoc.org/) is used to convert Markdown content to something Sphinx can understand. You have to install this program separately, ideally with your package manager. If you are using `conda`, you can install [pandoc from the conda-forge channel](https://anaconda.org/conda-forge/pandoc):\n",
+ "\n",
+ " conda install -c conda-forge pandoc\n",
+ "\n",
+ "If that doesn't work out for you, have a look at `pandoc`'s [installation instructions](http://pandoc.org/installing.html).\n",
+ "\n",
+ "<div class=\"alert alert-info\">\n",
+ "\n",
+ "**Note:**\n",
+ "\n",
+ "The use of `pandoc` in `nbsphinx` is temporary, but will likely stay that way for a long time, see [issue #36](https://github.com/spatialaudio/nbsphinx/issues/36).\n",
+ "\n",
+ "</div>\n",
+ "\n",
+ "### Pygments Lexer for Syntax Highlighting\n",
+ "\n",
+ "To get proper syntax highlighting in code cells, you'll need an appropriate *Pygments lexer*.\n",
+ "This of course depends on the programming language of your Jupyter notebooks (more specifically, the `pygments_lexer` metadata of your notebooks).\n",
+ "\n",
+ "For example, if you use Python in your notebooks, you'll have to have the `IPython` package installed, e.g. with\n",
+ "\n",
+ " conda install -c conda-forge ipython\n",
+ "\n",
+ "or\n",
+ "\n",
+ " python3 -m pip install IPython --user\n",
+ "\n",
+ "<div class=\"alert alert-info\">\n",
+ "\n",
+ "**Note:**\n",
+ "\n",
+ "If you are using Anaconda with the default channel and syntax highlighting in code cells doesn't seem to work,\n",
+ "you can try to install IPython from the `conda-forge` channel or directly with `pip`, or as a work-around,\n",
+ "add `'IPython.sphinxext.ipython_console_highlighting'` to `extensions` in your `conf.py`.\n",
+ "\n",
+ "For details, see [Anaconda issue #1430](https://github.com/ContinuumIO/anaconda-issues/issues/1430) and\n",
+ "[nbsphinx issue #24](https://github.com/spatialaudio/nbsphinx/issues/24).\n",
+ "\n",
+ "</div>\n",
+ "\n",
+ "### Jupyter Kernel\n",
+ "\n",
+ "If you want to execute your notebooks during the Sphinx build process (see [Controlling Notebook Execution](executing-notebooks.ipynb)), you need an appropriate [Jupyter kernel](http://jupyter.readthedocs.io/en/latest/projects/kernels.html) installed.\n",
+ "\n",
+ "For example, if you use Python, you should install the `ipykernel` package, e.g. with\n",
+ "\n",
+ " conda install -c conda-forge ipykernel\n",
+ "\n",
+ "or\n",
+ "\n",
+ " python3 -m pip install ipykernel --user\n",
+ "\n",
+ "If you created your notebooks yourself with Jupyter, it's very likely that you have the right kernel installed already."
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.6.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 1
+}
diff --git a/doc/links.ipynb b/doc/links.ipynb
index d9a73f6..7055f5e 100644
--- a/doc/links.ipynb
+++ b/doc/links.ipynb
@@ -31,9 +31,7 @@
"\n",
"https://bitbucket.org/yt_analysis/yt-doc/src/default/extensions/notebook_sphinxext.py\n",
"\n",
- "https://github.com/matthew-brett/perrin-academy/blob/master/sphinxext/notebook_sphinxext.py\n",
- "\n",
- "https://github.com/ipython/nbconvert/pull/35"
+ "https://github.com/matthew-brett/perrin-academy/blob/master/sphinxext/notebook_sphinxext.py"
]
},
{
@@ -71,6 +69,30 @@
"cell_type": "markdown",
"metadata": {},
"source": [
+ "**sphinx-nbexamples**\n",
+ "\n",
+ "http://sphinx-nbexamples.readthedocs.io/\n",
+ "\n",
+ "https://github.com/Chilipp/sphinx-nbexamples"
+ ]
+ },
... 1229 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/nbsphinx.git
More information about the Python-modules-commits
mailing list