Skip to content

Commit f64285f

Browse files
committed
add attrib-s description to Notification, NotificationEvent
1 parent 331e259 commit f64285f

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

jupyter_scheduler/models.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,28 @@
1212

1313

1414
class NotificationEvent(str, Enum):
15-
"""Enum representing events that should trigger a notification."""
15+
"""
16+
Enum for events triggering notifications. Implementers can extend
17+
this enum to include additional notification events as needed.
1618
19+
Attributes:
20+
SUCCESS (str): Sent when a job completes successfully.
21+
FAILURE (str): Sent on job failure.
22+
STOPPED (str): Sent when a job is manually stopped.
23+
"""
1724
SUCCESS = "Success"
1825
FAILURE = "Failure"
1926
STOPPED = "Stopped"
2027

2128

2229
class Notification(BaseModel):
23-
"""Represents a notification."""
24-
30+
"""Represents a notification.
31+
32+
Attributes:
33+
send_to (List[str]): A list of symbols (e.g., email addresses) to which notifications should be sent.
34+
events (List[NotificationEvent]): A list of events that should trigger the sending of notifications.
35+
include_output (bool): A flag indicating whether a output should be included in the notification. Default is False.
36+
"""
2537
send_to: List[str]
2638
events: List[NotificationEvent]
2739
include_output: bool
@@ -32,7 +44,6 @@ class RuntimeEnvironment(BaseModel):
3244
execution will happen. For example, conda
3345
environment.
3446
"""
35-
3647
name: str
3748
label: str
3849
description: str

0 commit comments

Comments
 (0)