Jupinx Documentation

Jupinx is a collection of utilities and tools for Jupyter and Sphinx

Requires: Sphinx >= 1.8.5 (for running tests).

jupinx-quickstart

A quickstart utility has been developed to help users get setup quickly with Sphinx, configured in a way to get building collections of Jupyter notebooks quickly.

Installation

To install jupinx:

Warning

This project is not yet released through PyPI. Please instead install using: python setup.py install from within a clone of the repository.

pip install jupinx

Note

Windows is currently not tested or supported. See Issue #7

Running jupinx-quickstart

Once, jupinx is installed, to run the jupinx quickstart program you can run:

jupinx-quickstart

on a terminal.

The jupinx-quickstart will:

  1. setup a directory structure for your project
  2. check for sphinxcontrib-jupyter installation
  3. construct Makefile and conf.p` files
  4. a parent document source/index.rst

after running the quickstart you may run make jupyter to build the project

Directory structure

The following directory structure is adopted during the setup:

  • ./
    • source: where source RST files should be added
    • source/_static: where _static assets such as figures and images are kept
    • theme: allows you to customise builders using themes and templates
    • Makefile: provides make commands for compiling the project
    • conf.py: provides configuration for sphinx-build

Note

sphinx is actually quite flexible in setting up a project in a way that suits your workflow. If you want to change directory structure this is likely possible but you will need to update your Makefile

Custom Configuration

This project depends on sphinxcontrib-jupyter to modify sphinx to work with Jupyter notebooks.

Full documentation for the extension can be found here

An Example

Let’s say you have a collection of notebooks that you would like pre-executed. You can do this by modifying the conf.py file to enable notebook execution.

Add the following in the conf.py in the jupyter options section:

jupyter_execute_notebooks = True

as documented here

and let’s imagine some of your documents produce a file required by a future document in your collection. An execution dependency can be added by:

jupyter_dependency_lists = {
    'lecture2' : ['lecture1']
    'lecture3' : ['lecture1']
    }

as documented here

Credits

This project is supported by QuantEcon

Many thanks to the lead developers of this project.

LICENSE

Copyright © 2019 QuantEcon Development Team: BSD-3 All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Indices and tables