Skip to content

Options independent of any profile #802

Open
@miwig

Description

@miwig

Proposed change

It would be nice if we could define options that are independent of any profile. If profiles are defined, these options should apply to all profiles.

Alternative options

If profiles are not needed and only independent options are desired, a somewhat ugly workaround would be to have a single profile and define the options there. If both profiles and independent options are needed, the only solution is to duplicate the "independent" options into each profile.

Who would use this feature?

Admins that want to give users more fine-grained control over spawn options, e.g. independent settings for CPU limit, image, etc.

Suggest a solution

Mostly duplicating the functionality of profile_options to work without a profile, possibly

  • Add a new traitlet option_list that is either a Dict of the same format as profile_options or a callable that returns such a Dict
  • Change options_from_form to accept these options
  • Adapt the default jinja template to render these options
  • Adapt load_user_options to apply the overrides in the same way as profile_options are applied

If you agree that this is a desirable feature and I haven't overlooked anything, I'd be happy to attempt a PR :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions