Merge remote-tracking branch 'upstream/main' into conda-channels

This commit is contained in:
YuviPanda
2023-09-29 14:27:25 -07:00
180 changed files with 7796 additions and 6028 deletions

View File

@@ -1,5 +1,5 @@
"""
Simplest plugin that exercises all the hooks
Simplest plugin that exercises all the hooks defined in tljh/hooks.py.
"""
from tljh.hooks import hookimpl
@@ -8,7 +8,8 @@ from tljh.hooks import hookimpl
def tljh_extra_user_conda_packages():
return [
"hypothesis",
"csvtk"
"csvtk",
"tqdm"
]
@hookimpl
@@ -21,43 +22,37 @@ def tljh_extra_user_conda_channels():
@hookimpl
def tljh_extra_user_pip_packages():
return [
"django",
]
return ["django"]
@hookimpl
def tljh_extra_hub_pip_packages():
return [
"there",
]
return ["there"]
@hookimpl
def tljh_extra_apt_packages():
return [
"sl",
]
@hookimpl
def tljh_config_post_install(config):
# Put an arbitrary marker we can test for
config["simplest_plugin"] = {"present": True}
return ["sl"]
@hookimpl
def tljh_custom_jupyterhub_config(c):
c.JupyterHub.authenticator_class = "tmpauthenticator.TmpAuthenticator"
c.Test.jupyterhub_config_set_by_simplest_plugin = True
@hookimpl
def tljh_config_post_install(config):
config["Test"] = {"tljh_config_set_by_simplest_plugin": True}
@hookimpl
def tljh_post_install():
with open("test_post_install", "w") as f:
f.write("123456789")
with open("test_tljh_post_install", "w") as f:
f.write("file_written_by_simplest_plugin")
@hookimpl
def tljh_new_user_create(username):
with open("test_new_user_create", "w") as f:
f.write("file_written_by_simplest_plugin")
f.write(username)