Skip to content

❓ [Question]: Can we clean up the jupyterhub_config.py code #614

@mishaschwartz

Description

@mishaschwartz

Questions

The code in jupyterhub_config.py.template is difficult to read and edit. Issues are:

  • some customization are template variables and others are environment variables (no clear reason why except maybe historical?)
  • inconsistent modification of spawner and authenticator attributes. For example, some modify attributes for c.Spawner or c.DockerSpawner or c.CustomSpawner (all work but its confusing why we pick one over the other)
  • custom authenticator is defined in https://github.com/Ouranosinc/jupyterhub but the custom Spawner is defined in jupyterhub_config.py.template
  • no linting, no tests

In the past this might have worked but this file has gotten complex enough that it makes more sense to treat it like a proper python project

Proposed Solution

Move the CustomSpawner implementation and most of the hardcoded settings to to https://github.com/Ouranosinc/jupyterhub.

Keep jupyterhub_config.py.template for customizations that can differ for different deployments as well as hardcoded values for the c.JupyterHub instance.

This will make this file easier to maintain and also put the code for both the CustomSpawner and MagpieAuthenticator in the same place so that they can be maintained together.

References

Environment

Information Value
Server/Platform URL
Version Tag/Commit
Related issues/PR
Related components

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions