Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(automate): add success result case #355

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions src/speckle_automate/automation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,24 @@
visual_overrides,
)

def attach_success_to_objects(
self,
category: str,
object_ids: Union[str, List[str]],
message: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
visual_overrides: Optional[Dict[str, Any]] = None,
) -> None:
"""Add a new success case to the run results."""
self.attach_result_to_objects(

Check warning on line 367 in src/speckle_automate/automation_context.py

View check run for this annotation

Codecov / codecov/patch

src/speckle_automate/automation_context.py#L367

Added line #L367 was not covered by tests
ObjectResultLevel.SUCCESS,
category,
object_ids,
message,
metadata,
visual_overrides,
)

def attach_info_to_objects(
self,
category: str,
Expand Down
1 change: 1 addition & 0 deletions src/speckle_automate/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class AutomationStatus(str, Enum):
class ObjectResultLevel(str, Enum):
"""Possible status message levels for object reports."""

SUCCESS = "SUCCESS"
INFO = "INFO"
WARNING = "WARNING"
ERROR = "ERROR"
Expand Down