2018-08-12 09:47:32 -07:00
|
|
|
"""
|
2023-06-08 22:44:21 +02:00
|
|
|
Simplest plugin that exercises all the hooks defined in tljh/hooks.py.
|
2018-08-12 09:47:32 -07:00
|
|
|
"""
|
2024-02-05 20:29:32 +00:00
|
|
|
|
2018-08-12 09:47:32 -07:00
|
|
|
from tljh.hooks import hookimpl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@hookimpl
|
|
|
|
|
def tljh_extra_user_conda_packages():
|
2023-06-08 22:44:21 +02:00
|
|
|
return ["tqdm"]
|
2018-08-12 09:47:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@hookimpl
|
|
|
|
|
def tljh_extra_user_pip_packages():
|
2024-02-25 15:04:14 +01:00
|
|
|
return ["simplejson"]
|
2018-08-12 09:47:32 -07:00
|
|
|
|
2021-11-01 09:42:45 +01:00
|
|
|
|
2019-05-31 16:52:51 -07:00
|
|
|
@hookimpl
|
|
|
|
|
def tljh_extra_hub_pip_packages():
|
2023-06-08 22:44:21 +02:00
|
|
|
return ["there"]
|
2018-08-12 09:47:32 -07:00
|
|
|
|
2021-11-01 09:42:45 +01:00
|
|
|
|
2018-08-12 09:47:32 -07:00
|
|
|
@hookimpl
|
|
|
|
|
def tljh_extra_apt_packages():
|
2023-06-08 22:44:21 +02:00
|
|
|
return ["sl"]
|
2018-08-12 09:47:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@hookimpl
|
2023-06-08 22:44:21 +02:00
|
|
|
def tljh_custom_jupyterhub_config(c):
|
|
|
|
|
c.Test.jupyterhub_config_set_by_simplest_plugin = True
|
2021-11-01 09:42:45 +01:00
|
|
|
|
2019-05-31 23:35:08 -07:00
|
|
|
|
|
|
|
|
@hookimpl
|
2023-06-08 22:44:21 +02:00
|
|
|
def tljh_config_post_install(config):
|
|
|
|
|
config["Test"] = {"tljh_config_set_by_simplest_plugin": True}
|
2019-06-27 11:45:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@hookimpl
|
|
|
|
|
def tljh_post_install():
|
2023-06-08 22:44:21 +02:00
|
|
|
with open("test_tljh_post_install", "w") as f:
|
|
|
|
|
f.write("file_written_by_simplest_plugin")
|
2019-12-03 09:43:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@hookimpl
|
|
|
|
|
def tljh_new_user_create(username):
|
2021-11-03 23:55:34 +01:00
|
|
|
with open("test_new_user_create", "w") as f:
|
2023-06-08 22:44:21 +02:00
|
|
|
f.write("file_written_by_simplest_plugin")
|
2020-01-13 18:38:47 +02:00
|
|
|
f.write(username)
|