Skip to content

Commit

Permalink
API doc: import batchspawner, not batchspawner.api
Browse files Browse the repository at this point in the history
- importing batchspawner.api could become depreciated in the future,
  but importing "batchspawner" will always work (and imports .api
  within it).  Recommend only importing batchspawner then.
- Add clarifying comment in one of the docs.
  • Loading branch information
rkdarst committed Jul 16, 2019
1 parent 673072d commit 7539961
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This package formerly included WrapSpawner and ProfilesSpawner, which provide me
```python
c = get_config()
c.JupyterHub.spawner_class = 'batchspawner.TorqueSpawner'
import batchspawner.api
import batchspawner # Even though not used, needed to register batchspawner interface
```
3. Depending on the spawner, additional configuration will likely be needed.

Expand Down Expand Up @@ -53,7 +53,7 @@ to run Jupyter notebooks on an academic supercomputer cluster.
```python
# Select the Torque backend and increase the timeout since batch jobs may take time to start
import batchspawner.api
import batchspawner
c.JupyterHub.spawner_class = 'batchspawner.TorqueSpawner'
c.Spawner.http_timeout = 120
Expand Down Expand Up @@ -119,7 +119,7 @@ clusters, as well as an option to run a local notebook directly on the jupyterhu
```python
# Same initial setup as the previous example
import batchspawner.api
import batchspawner
c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner'
c.Spawner.http_timeout = 120
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -175,7 +175,7 @@ Added (developer)
Changed
* PR #58 changes logic of port selection, so that it is selected *after* the singleuser server starts. This means that the port number has to be conveyed back to JupyterHub. This requires the following changes:
- `jupyterhub_config.py` *must* explicitely import `batchspawner.api`
- `jupyterhub_config.py` *must* explicitely import `batchspawner`
- If you override `Spawner.cmd`, note that the default command is now `batchspawner-singleuser`, not the default `jupyterhub-singleuser`. This is to add a hook to report the port number back to the hub.
- If you have installed with `pip install -e`, you will have to re-install so that the new script `batchspawner-singleuser` is added to `$PATH`.
* Update minimum requirements to JupyterHub 0.8.1 and Python 3.4.
Expand Down

0 comments on commit 7539961

Please sign in to comment.