2024-01-29 17:47:47 +01:00
|
|
|
"""GLiCID spawner module."""
|
|
|
|
|
|
|
|
from batchspawner import SlurmSpawner
|
2024-02-12 15:18:17 +01:00
|
|
|
from traitlets import Unicode
|
2024-01-30 16:15:18 +01:00
|
|
|
|
2024-02-14 10:02:07 +01:00
|
|
|
from .form import options_form, options_from_form
|
2024-01-29 17:47:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
class GlicidSpawner(SlurmSpawner):
|
|
|
|
"""Glicid SLURM Spawner."""
|
|
|
|
|
2024-02-12 15:18:17 +01:00
|
|
|
batchspawner_singleuser_cmd = Unicode(
|
|
|
|
'glicid-spawner-singleuser',
|
|
|
|
help='Glicid spawner singleuser command.',
|
|
|
|
).tag(config=True)
|
|
|
|
|
2024-02-14 10:02:07 +01:00
|
|
|
def options_form(self) -> str:
|
2024-01-30 16:15:18 +01:00
|
|
|
"""JupyterHub rendered form template."""
|
2024-02-14 10:02:07 +01:00
|
|
|
return options_form(self.user.name)
|
2024-01-29 17:47:47 +01:00
|
|
|
|
2024-01-30 16:15:18 +01:00
|
|
|
def options_from_form(self, formdata) -> dict:
|
2024-02-08 17:50:36 +01:00
|
|
|
"""Export options from form."""
|
2024-02-14 10:02:07 +01:00
|
|
|
return options_from_form(formdata)
|