Skip to content

Commit f554f19

Browse files
olevskiPanaetius
andauthored
feat(core): notebook_session provider (#2880)
Co-authored-by: Ralf Grubenmann <[email protected]>
1 parent 4ce3f0c commit f554f19

File tree

13 files changed

+700
-72
lines changed

13 files changed

+700
-72
lines changed

docs/reference/commands.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ Renku Command Line
196196

197197
.. automodule:: renku.ui.cli.githooks
198198

199+
``renku session``
200+
-----------------
201+
202+
.. automodule:: renku.ui.cli.session
203+
204+
.. _cli-session:
205+
199206
Error Tracking
200207
--------------
201208

docs/spelling_wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
acyclic
2+
adhoc
23
admin
34
Amalthea
45
analytics
@@ -243,6 +244,7 @@ Unlink
243244
unlinking
244245
unmapped
245246
unmerged
247+
unpushed
246248
untracked
247249
untracked
248250
updatable

renku/core/errors.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,18 @@ def __init__(self, reason: str):
593593
super().__init__(f"Docker failed: {reason}")
594594

595595

596+
class RenkulabSessionError(RenkuException):
597+
"""Raised when an error occurs trying to start sessions with the notebook service."""
598+
599+
600+
class NotebookSessionNotReadyError(RenkuException):
601+
"""Raised when a user attempts to open a session that is not ready."""
602+
603+
604+
class NotebookSessionImageNotExistError(RenkuException):
605+
"""Raised when a user attempts to start a session with an image that does not exist."""
606+
607+
596608
class MetadataMergeError(RenkuException):
597609
"""Raise when merging of metadata failed."""
598610

renku/core/plugin/implementations/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from typing import TYPE_CHECKING, List, Type
2121

2222
from renku.core.session.docker import DockerSessionProvider
23+
from renku.core.session.renkulab import RenkulabSessionProvider
2324
from renku.core.workflow.converters.cwl import CWLExporter
2425
from renku.core.workflow.providers.cwltool import CWLToolProvider
2526

@@ -30,7 +31,7 @@
3031

3132
__all__: List[str] = []
3233

33-
session_providers: "List[Type[ISessionProvider]]" = [DockerSessionProvider]
34+
session_providers: "List[Type[ISessionProvider]]" = [DockerSessionProvider, RenkulabSessionProvider]
3435
workflow_exporters: "List[Type[IWorkflowConverter]]" = [CWLExporter]
3536
workflow_providers: "List[Type[IWorkflowProvider]]" = [CWLToolProvider]
3637

0 commit comments

Comments
 (0)