Skip to content

Commit

Permalink
Merge pull request #234 from takluyver/docs-extending-subdir
Browse files Browse the repository at this point in the history
Make 'extending' a directory in the docs
  • Loading branch information
minrk committed Jul 27, 2015
2 parents 6ef2d6a + 72fa817 commit 4eda5e5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
34 changes: 13 additions & 21 deletions docs/source/extending.rst → docs/source/extending/contents.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
.. _extending:

======================
Extending the Notebook
======================

Certain subsystems of the notebook server are designed to be extended or
overridden by users. This document explains these systems and shows how to
override the notebook's defaults with your own custom behavior.
.. _contents_api:

Contents API
------------
============

.. currentmodule:: notebook.services.contents

Expand All @@ -28,12 +20,12 @@ This section describes the interface implemented by ContentsManager subclasses.
We refer to this interface as the **Contents API**.

Data Model
^^^^^^^^^^
----------

.. currentmodule:: notebook.services.contents.manager

Filesystem Entities
'''''''''''''''''''
~~~~~~~~~~~~~~~~~~~
.. _notebook models:

ContentsManager methods represent virtual filesystem entities as dictionaries,
Expand Down Expand Up @@ -153,7 +145,7 @@ model. There are three model types: **notebook**, **file**, and **directory** .


API Paths
'''''''''
~~~~~~~~~
.. _apipaths:

ContentsManager methods represent the locations of filesystem resources as
Expand All @@ -170,7 +162,7 @@ following guarantees are made:


Writing a Custom ContentsManager
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--------------------------------

The default ContentsManager is designed for users running the notebook as an
application on a personal computer. It stores notebooks as .ipynb files on the
Expand All @@ -183,7 +175,7 @@ own ContentsManager that stores notebooks and files in a database.


Required Methods
''''''''''''''''
~~~~~~~~~~~~~~~~

A minimal complete implementation of a custom
:class:`~manager.ContentsManager` must implement the following
Expand All @@ -200,13 +192,13 @@ methods:


Customizing Checkpoints
'''''''''''''''''''''''
-----------------------

TODO:


Testing
'''''''
-------
.. currentmodule:: notebook.services.contents.tests

:mod:`notebook.services.contents.tests` includes several test suites written
Expand All @@ -216,10 +208,10 @@ ContentsManager.

.. note::

PGContents_ is an example of a complete implementation of a custom
``ContentsManager``. It stores notebooks and files in PostgreSQL_ and encodes
directories as SQL relations. PGContents also provides an example of how to
re-use the notebook's tests.
PGContents_ is an example of a complete implementation of a custom
``ContentsManager``. It stores notebooks and files in PostgreSQL_ and encodes
directories as SQL relations. PGContents also provides an example of how to
re-use the notebook's tests.

.. _NBFormat: http://nbformat.readthedocs.org/en/latest/index.html
.. _PGContents: https://github.com/quantopian/pgcontents
Expand Down
12 changes: 12 additions & 0 deletions docs/source/extending/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
======================
Extending the Notebook
======================

Certain subsystems of the notebook server are designed to be extended or
overridden by users. These documents explain these systems, and show how to
override the notebook's defaults with your own custom behavior.

.. toctree::
:maxdepth: 2

contents
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ The Jupyter notebook
config
public_server
security
extending
extending/index
development
examples/Notebook/Examples and Tutorials Index

0 comments on commit 4eda5e5

Please sign in to comment.