jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.01k stars 341 forks source link

Add the ability to define conda channels in plugins via tljh_extra_user_conda_channels #942

Open yuvipanda opened 9 months ago

yuvipanda commented 9 months ago

Re-issue of https://github.com/jupyterhub/the-littlest-jupyterhub/pull/829 rebased on latest master

This PR addresses issue https://github.com/jupyterhub/the-littlest-jupyterhub/issues/828. It adds a tljh_extra_user_conda_channels hook to allow plugin developers to change the conda channels during user environment install. Adding an extra hook seems to be the most elegant solution as it allows install logic to be encapsulated in the plugin as opposed to requiring the end-user to add it during the install command.

I've added unit-tests, integration tests, and a note to the documentation. If there are any stylistic changes you'd like, I'd be happy to adjust them.