Skip to content

Commit 36eb1ab

Browse files
committed
rearrage some developer docs
1 parent 47d7d28 commit 36eb1ab

File tree

10 files changed

+63
-86
lines changed

10 files changed

+63
-86
lines changed

CONTRIBUTING.rst

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Contributing to the Jupyter Server
2-
==================================
1+
General Jupyter contributor guidelines
2+
======================================
33

44
If you're reading this section, you're probably interested in contributing to
55
Jupyter. Welcome and thanks for your interest in contributing!
@@ -8,19 +8,16 @@ Please take a look at the Contributor documentation, familiarize yourself with
88
using the Jupyter Server, and introduce yourself on the mailing list and
99
share what area of the project you are interested in working on.
1010

11-
General Guidelines
12-
------------------
13-
1411
For general documentation about contributing to Jupyter projects, see the
1512
`Project Jupyter Contributor Documentation`__.
1613

1714
__ https://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html
1815

1916
Setting Up a Development Environment
20-
------------------------------------
17+
====================================
2118

2219
Installing the Jupyter Server
23-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20+
-----------------------------
2421

2522
Once you have installed the dependencies mentioned above, use the following
2623
steps::
@@ -39,7 +36,7 @@ from any directory in your system with::
3936
jupyter server
4037

4138
Troubleshooting the Installation
42-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39+
--------------------------------
4340

4441
If you do not see that your Jupyter Server is not running on dev mode, it's possible that you are
4542
running other instances of Jupyter Server. You can try the following steps:
@@ -54,10 +51,7 @@ running other instances of Jupyter Server. You can try the following steps:
5451
5. Verify the installation with the steps in the previous section.
5552

5653
Running Tests
57-
-------------
58-
59-
Python Tests
60-
^^^^^^^^^^^^
54+
=============
6155

6256
Install dependencies::
6357

@@ -67,12 +61,8 @@ To run the Python tests, use::
6761

6862
pytest
6963

70-
If you want coverage statistics as well, you can run::
71-
72-
py.test --cov notebook -v
73-
7464
Building the Documentation
75-
--------------------------
65+
==========================
7666

7767
To build the documentation you'll need `Sphinx <http://www.sphinx-doc.org/en/master/>`_,
7868
`pandoc <https://pandoc.org/>`_ and a few other packages.

README.md

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,9 @@
44
[![Build Status](https://github.com/jupyter/jupyter_server/workflows/CI/badge.svg)](https://github.com/jupyter/jupyter_server/actions)
55
[![Documentation Status](https://readthedocs.org/projects/jupyter-server/badge/?version=latest)](http://jupyter-server.readthedocs.io/en/latest/?badge=latest)
66

7-
The Jupyter Server provides the backend for Jupyter web applications such as
8-
the Jupyter notebook and JupyterLab.
7+
The Jupyter Server provides the backend for Jupyter web applications like Jupyter notebook, JupyterLab, and Voila.
98

10-
**jupyter_server is an early developer preview, and is not suitable for general
11-
usage yet. Features and implementation are subject to change. Please use the
12-
stable [notebook server](https://github.com/jupyter/notebook) for production
13-
usecases.**
14-
15-
Read more on the Jupyter Server [roadmap](https://github.com/jupyter/jupyter_server/issues/127).
16-
17-
## Installation
9+
## Installation and Basic usage
1810

1911
You can find the installation documentation for the
2012
[Jupyter platform, on ReadTheDocs](https://jupyter.readthedocs.io/en/latest/install.html).
@@ -26,34 +18,10 @@ To install the latest release locally, make sure you have
2618

2719
$ pip install jupyter_server
2820

29-
### Versioning and Branches
30-
31-
If Jupyter Server is a dependency of your project/application, it is important that you pin it to a version that works for your application. Currently, Jupyter Server only has minor and patch versions. Different minor versions likely include API-changes while patch versions do not change API.
32-
33-
When a new minor version in released on PyPI, a branch for that version will be created in this repository, and the version of the master branch will be bumped to the next minor version number. That way, the master branch always reflects the latest un-released version.
34-
35-
To see the changes between releases, checkout the [CHANGELOG](https://github.com/jupyter/jupyter_server/blob/master/CHANGELOG.md).
36-
37-
To install the latest patch of a given version:
38-
39-
$ pip install jupyter_server>=0.2
40-
41-
## Usage - Running Jupyter Server
42-
43-
### Running in a local installation
44-
45-
Launch with:
21+
Launch Jupyter Server by calling:
4622

4723
$ jupyter server
4824

49-
### Running in a remote installation
50-
51-
You need some configuration before starting Jupyter server remotely. See [Running a Jupyter server](http://jupyter-server.readthedocs.io/en/stable/public_server.html).
52-
53-
## Development Installation
54-
55-
See [`CONTRIBUTING.rst`](CONTRIBUTING.rst) for how to set up a local development installation.
56-
5725
## Contributing
5826

5927
If you are interested in contributing to the project, see [`CONTRIBUTING.rst`](CONTRIBUTING.rst).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. highlight:: sh
22

3-
.. include:: ../../CONTRIBUTING.rst
3+
.. include:: ../../../CONTRIBUTING.rst

docs/source/developers/basic-extension.rst

Whitespace-only changes.

docs/source/extension-authors/frontends.rst renamed to docs/source/developers/configurable-extension.rst

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
Creating a Jupyter Server Frontend
2-
==================================
1+
Creating a configurable, Jupyter Server extension
2+
=================================================
33

4-
Jupyter Server does not come with a frontend out-of-the-box; instead, a frontend is installed separately and loaded as a server extension. This page demonstrates the best way to write a Jupyter Server frontend from scratch.
4+
Jupyter Server offers a base class, ``ExtensionApp``, for authoring configurable Jupyter Server extensions. This class handles most of the boilerplate code for setting up config, CLI, and registration with Jupyter Server.
55

6-
.. note:: This documentation is written for experienced developers.
6+
Writing an extension application
7+
--------------------------------
78

8-
9-
.. _frontend:
10-
11-
Writing a frontend application
12-
------------------------------
13-
14-
Jupyter Server provides two key classes for writing a server frontend:
9+
Jupyter Server provides two key classes for writing a server extension:
1510

1611
- ``ExtensionApp``
1712
- ``ExtensionHandlerMixin``
@@ -20,11 +15,11 @@ The ExtensionApp:
2015

2116
- can have traits.
2217
- is configurable (from file or CLI)
23-
- creates a namespace for the frontend's static files under ``/static/<extension_name>/``.
18+
- creates a namespace for a extension's static files under ``/static/<extension_name>/``.
2419
- loads itself as a server extension beside other Jupyter frontends and extensions.
2520
- provides a command-line interface to launch the frontend extension directly (starting a server along the way).
2621

27-
To create a new Jupyter frontend application, subclass the ``ExtensionApp`` like the example below:
22+
To create a new Jupyter extension application, subclass the ``ExtensionApp`` like the example below:
2823

2924
.. code-block:: python
3025
@@ -63,7 +58,7 @@ To create a new Jupyter frontend application, subclass the ``ExtensionApp`` like
6358
# Change the jinja templating environment
6459
self.settings.update({'myfrontend_jinja2_env': ...})
6560
66-
The ``ExtensionApp`` uses the following methods and properties to connect your frontend to the Jupyter server. Overwrite these pieces to add your custom settings, handlers and templates:
61+
The ``ExtensionApp`` uses the following methods and properties to connect your extension to the Jupyter server. Overwrite these pieces to add your custom settings, handlers and templates:
6762

6863
Methods
6964

@@ -78,10 +73,10 @@ Properties
7873
* ``load_other_extensions``: should your extension expose other server extensions when launched directly?
7974

8075

81-
Writing frontend handlers
82-
-------------------------
76+
Writing handlers for an extension
77+
---------------------------------
8378

84-
To write handlers for an ``ExtensionApp``, use the ``ExtensionHandlerMixin`` class. This class routes Tornado's ``static_url`` attribute to the ``/static/<extension_name>/`` namespace where your frontend's static files will be served.
79+
To write handlers for an ``ExtensionApp``, use the ``ExtensionHandlerMixin`` and ``JupyterHandler`` classes. The former class routes Tornado's ``static_url`` attribute to the ``/static/<extension_name>/`` namespace where your extension's static files will be served. The latter class provides Jupyter Server's auth methods and other handler settings.
8580

8681
.. code-block:: python
8782

docs/source/developers/dependency.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Jupyter Server as a dependency
2+
==============================
3+
4+
If your project depends directly on Jupyter Server, be sure to watch Jupyter Server's changelog_ and pin your project to a version that works for your application. Major releases represent possible backwards-compatibility breaking API changes or features.
5+
6+
When a new major version in released on PyPI, a branch for that version will be created in this repository, and the version of the master branch will be bumped to the next major version number. That way, the master branch always reflects the latest un-released version.
7+
8+
To see the changes between releases, checkout the [CHANGELOG](https://github.com/jupyter/jupyter_server/blob/master/CHANGELOG.md).
9+
10+
To install the latest patch of a given version:
11+
12+
.. code-block:: console
13+
14+
> pip install jupyter_server --upgrade
15+
16+
17+
To pin your jupyter_server install to a specific version:
18+
19+
> pip install jupyter_server==1.0

docs/source/developers/rest-api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Jupyter Server's REST API

docs/source/extension-authors/dependency.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/source/index.rst

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,30 @@ The Jupyter Server is a highly technical piece of the Jupyter Stack. Since most
4242
operators/security
4343

4444
.. toctree::
45-
:caption: Extension Authors
45+
:caption: Developers
4646
:maxdepth: 1
47-
:name: extension-authors
47+
:name: developers
4848

49-
extension-authors/dependency
50-
extension-authors/frontends
49+
developers/dependency
50+
developers/frontends
51+
developers/rest-api
5152

53+
.. toctree::
54+
:caption: Contributors
55+
:maxdepth: 1
56+
:name: contributors
57+
58+
contributors/contributing
5259

5360

54-
- Depending on Jupyter Server
55-
- Migrating a Notebook server extension to Jupyter Server
56-
- Writing a basic server extension from scratch
57-
- Writing a frontend server extension from scratch
61+
.. - Depending on Jupyter Server
62+
.. - Migrating a Notebook server extension to Jupyter Server
63+
.. - Writing a basic server extension from scratch
64+
.. - Writing a frontend server extension from scratch
5865
5966
60-
Contributors
61-
~~~~~~~~~~~~
67+
.. Contributors
68+
.. ~~~~~~~~~~~~
6269
63-
- Monthly Meetings and Roadmap
64-
- Changelog
70+
.. - Monthly Meetings and Roadmap
71+
.. - Changelog

docs/source/operators/configuring-extensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In Python config files, each trait will be prefixed with ``c.`` that links the t
3737
c.NotebookApp.port = 9999
3838
3939
40-
A Jupyter Server can automatically load config for multiple enabled extensions.
40+
A Jupyter Server will automatically load config for each enabled extension. You can config each extension by creating a jupyter config file for each extension.
4141

4242

4343

0 commit comments

Comments
 (0)