Skip to content

Commit 5e1f84c

Browse files
committed
Merge branch 'dev' into feature/auto-abort
2 parents 730d17b + c253f78 commit 5e1f84c

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

.github/workflows/test_multiple_python.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ name: Simvue Client (Python Versions)
55

66
on:
77
push:
8-
branches: [ "main", "dev", "hotfix/update-ci" ]
9-
pull_request:
10-
branches: [ "main", "dev", "hotfix/update-ci" ]
8+
tags:
9+
- 'v*-*-rc*'
1110

1211
permissions:
1312
contents: read

simvue/executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ def callback_function(status_code: int, std_out: str, std_err: str) -> None:
182182
_pos_args.pop(0)
183183

184184
if script:
185-
_command += [script]
185+
_command += [f"{script}"]
186186

187187
if input_file:
188-
_command += [input_file]
188+
_command += [f"{input_file}"]
189189

190190
for arg, value in kwargs.items():
191191
if arg.startswith("__"):

simvue/metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def git_info(repository: str) -> dict[str, typing.Any]:
3030
"""
3131
try:
3232
git_repo = git.Repo(repository, search_parent_directories=True)
33-
except (git.InvalidGitRepositoryError, ValueError):
3433
current_commit: git.Commit = git_repo.head.commit
3534
author_list: set[str] = set(
3635
email
@@ -64,4 +63,5 @@ def git_info(repository: str) -> dict[str, typing.Any]:
6463
"git.url": git_repo.remote().url,
6564
"git.dirty": dirty,
6665
}
67-
return {}
66+
except (git.InvalidGitRepositoryError, ValueError):
67+
return {}

simvue/run.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,7 @@ def create_alert(
15621562
] = "average",
15631563
notification: typing.Literal["email", "none"] = "none",
15641564
pattern: typing.Optional[str] = None,
1565+
trigger_abort: bool = False,
15651566
) -> typing.Optional[str]:
15661567
"""Creates an alert with the specified name (if it doesn't exist)
15671568
and applies it to the current run. If alert already exists it will
@@ -1621,6 +1622,8 @@ def create_alert(
16211622
whether to notify on trigger, by default "none"
16221623
pattern : str, optional
16231624
for event based alerts pattern to look for, by default None
1625+
trigger_abort : bool, optional
1626+
whether this alert can trigger a run abort
16241627
16251628
Returns
16261629
-------
@@ -1695,7 +1698,7 @@ def create_alert(
16951698

16961699
if alert_id:
16971700
# TODO: What if we keep existing alerts/add a new one later?
1698-
data = {"id": self._id, "alerts": [alert_id]}
1701+
data = {"id": self._id, "alerts": [alert_id], "abort": trigger_abort}
16991702
self._simvue.update(data)
17001703

17011704
return alert_id

0 commit comments

Comments
 (0)