Skip to content

Commit

Permalink
Set up pluggy before calling hooks in jupyter_config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Jun 1, 2019
1 parent e34e410 commit 1f15299
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tljh/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from glob import glob
import os
import pluggy

from systemdspawner import SystemdSpawner
from tljh import configurer, user, hooks
Expand Down Expand Up @@ -58,7 +59,13 @@ def start(self):
configurer.apply_config(tljh_config, c)

# Let TLJH hooks modify `c` if they want
hooks.tljh_custom_jupyterhub_config(c)

# Set up plugin infrastructure
pm = pluggy.PluginManager('tljh')
pm.add_hookspecs(hooks)
pm.load_setuptools_entrypoints('tljh')
# Call our custom configuration plugin
pm.hook.tljh_custom_jupyterhub_config(c=c)

# Load arbitrary .py config files if they exist.
# This is our escape hatch
Expand Down

0 comments on commit 1f15299

Please sign in to comment.