Skip to content

Commit

Permalink
Fixed docs and testing code to use refactored SimpleLocalProcessSpawner
Browse files Browse the repository at this point in the history
  • Loading branch information
danlester committed Jul 5, 2019
1 parent 276ef26 commit 49a5f3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions docs/source/contributing/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,19 @@ happen.

Happy developing!

Using DummyAuthenticator & SimpleSpawner
========================================
Using DummyAuthenticator & SimpleLocalProcessSpawner
====================================================

To simplify testing of JupyterHub, it’s helpful to use
:class:`~jupyterhub.auth.DummyAuthenticator` instead of the default JupyterHub
authenticator and `SimpleSpawner <https://github.com/jupyterhub/simplespawner>`_
instead of the default spawner.
authenticator and SimpleLocalProcessSpawner instead of the default spawner.

There is a sample configuration file that does this in
``testing/jupyterhub_config.py``. To launch jupyterhub with this
configuration:

.. code:: bash
pip install jupyterhub-simplespawner
jupyterhub -f testing/jupyterhub_config.py
The default JupyterHub `authenticator
Expand All @@ -137,15 +135,15 @@ require your system to have user accounts for each user you want to log in to
JupyterHub as.

DummyAuthenticator allows you to log in with any username & password,
while SimpleSpawner allows you to start servers without having to
while SimpleLocalProcessSpawner allows you to start servers without having to
create a unix user for each JupyterHub user. Together, these make it
much easier to test JupyterHub.

Tip: If you are working on parts of JupyterHub that are common to all
authenticators & spawners, we recommend using both DummyAuthenticator &
SimpleSpawner. If you are working on just authenticator related parts,
use only SimpleSpawner. Similarly, if you are working on just spawner
related parts, use only DummyAuthenticator.
SimpleLocalProcessSpawner. If you are working on just authenticator related
parts, use only SimpleLocalProcessSpawner. Similarly, if you are working on
just spawner related parts, use only DummyAuthenticator.

Troubleshooting
===============
Expand Down
4 changes: 2 additions & 2 deletions testing/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# Optionally set a global password that all users must use
# c.DummyAuthenticator.password = "your_password"

from jupyterhub.spawners import SimpleSpawner
from jupyterhub.spawner import SimpleLocalProcessSpawner

c.JupyterHub.spawner_class = SimpleSpawner
c.JupyterHub.spawner_class = SimpleLocalProcessSpawner

0 comments on commit 49a5f3a

Please sign in to comment.