Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions digitalai/release/integration/input_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import Any, List, Dict, Optional
from dataclasses_json import dataclass_json, LetterCase

Expand Down Expand Up @@ -62,9 +62,9 @@ class CiDefinition:
- type (str): Type of the CI.
- properties (List[PropertyDefinition]): List of properties for the CI.
"""
id: str
type: str
properties: List[PropertyDefinition]
id: Optional[str] = None
type: Optional[str] = None
properties: List[PropertyDefinition] = field(default_factory=list)


@dataclass_json
Expand Down Expand Up @@ -129,8 +129,8 @@ class AutomatedTaskAsUserContext:
- username (str): The username to run the task as.
- password (str): The password for the user.
"""
username: Optional[str]
password: Optional[str]
username: Optional[str] = None
password: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL)
Expand All @@ -144,8 +144,10 @@ class ReleaseContext:
- automated_task_as_user (AutomatedTaskAsUserContext): Context for running
an automated task as a specific user.
"""
id: str
automated_task_as_user: AutomatedTaskAsUserContext
id: Optional[str] = None
automated_task_as_user: Optional[AutomatedTaskAsUserContext] = field(
default_factory=AutomatedTaskAsUserContext
)


@dataclass_json()
Expand All @@ -158,6 +160,6 @@ class InputContext:
- release (ReleaseContext): Context of the release.
- task (TaskContext): Context of the task.
"""
release: ReleaseContext
task: TaskContext
release: Optional[ReleaseContext] = None
task: Optional[TaskContext] = None