semaphoreui-client 0.1.17__py3-none-any.whl → 0.1.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- semaphoreui_client/__about__.py +1 -1
- semaphoreui_client/client.py +16 -12
- {semaphoreui_client-0.1.17.dist-info → semaphoreui_client-0.1.19.dist-info}/METADATA +1 -1
- semaphoreui_client-0.1.19.dist-info/RECORD +6 -0
- semaphoreui_client-0.1.17.dist-info/RECORD +0 -6
- {semaphoreui_client-0.1.17.dist-info → semaphoreui_client-0.1.19.dist-info}/WHEEL +0 -0
semaphoreui_client/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.1.
|
1
|
+
__version__ = "0.1.19"
|
semaphoreui_client/client.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from dataclasses import dataclass
|
1
|
+
from dataclasses import dataclass, field
|
2
2
|
import typing
|
3
3
|
|
4
4
|
from dataclasses_json import dataclass_json
|
@@ -565,12 +565,12 @@ class SemaphoreUIClient:
|
|
565
565
|
)
|
566
566
|
assert response.status_code == 204
|
567
567
|
|
568
|
-
def get_project_task_output(self, project_id: int, id: int) -> str:
|
568
|
+
def get_project_task_output(self, project_id: int, id: int) -> typing.List[str]:
|
569
569
|
response = self.http.get(
|
570
570
|
f"{self.api_endpoint}/project/{project_id}/tasks/{id}/output"
|
571
571
|
)
|
572
572
|
assert response.status_code == 200
|
573
|
-
return
|
573
|
+
return [data["output"] for data in response.json()]
|
574
574
|
|
575
575
|
|
576
576
|
@dataclass
|
@@ -1001,7 +1001,6 @@ class Schedule:
|
|
1001
1001
|
@dataclass
|
1002
1002
|
class Task:
|
1003
1003
|
arguments: typing.Optional[str]
|
1004
|
-
build_task: typing.Optional["Task"]
|
1005
1004
|
build_task_id: typing.Optional[int]
|
1006
1005
|
commit_hash: typing.Optional[str]
|
1007
1006
|
commit_message: str
|
@@ -1023,21 +1022,26 @@ class Task:
|
|
1023
1022
|
start: str
|
1024
1023
|
status: str
|
1025
1024
|
template_id: int
|
1026
|
-
tpl_alias: str
|
1027
|
-
tpl_app: str
|
1028
|
-
tpl_playbook: str
|
1029
|
-
tpl_type: str
|
1030
|
-
user_id: typing.Optional[int]
|
1031
|
-
user_name: typing.Optional[str]
|
1032
|
-
version: typing.Optional[str]
|
1033
1025
|
|
1034
1026
|
client: SemaphoreUIClient
|
1035
1027
|
|
1028
|
+
# XXX: rockstar (7 Apr 2025) - These attributes are not always provided,
|
1029
|
+
# seemingly based on execution state? Because we aren't using `kw_only`
|
1030
|
+
# in our dataclass, the order of these attributes is important.
|
1031
|
+
build_task: typing.Optional["Task"] = field(default=None)
|
1032
|
+
tpl_alias: typing.Optional[str] = field(default=None)
|
1033
|
+
tpl_app: typing.Optional[str] = field(default=None)
|
1034
|
+
tpl_playbook: typing.Optional[str] = field(default=None)
|
1035
|
+
tpl_type: typing.Optional[str] = field(default=None)
|
1036
|
+
user_id: typing.Optional[int] = field(default=None)
|
1037
|
+
user_name: typing.Optional[str] = field(default=None)
|
1038
|
+
version: typing.Optional[str] = field(default=None)
|
1039
|
+
|
1036
1040
|
def stop(self) -> None:
|
1037
1041
|
self.client.stop_project_task(self.project_id, self.id)
|
1038
1042
|
|
1039
1043
|
def delete(self) -> None:
|
1040
1044
|
self.client.delete_project_task(self.project_id, self.id)
|
1041
1045
|
|
1042
|
-
def output(self) -> str:
|
1046
|
+
def output(self) -> typing.List[str]:
|
1043
1047
|
return self.client.get_project_task_output(self.project_id, self.id)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: semaphoreui-client
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.19
|
4
4
|
Summary: An api client for interacting with Semaphore UI
|
5
5
|
Project-URL: Documentation, https://github.com/rockstar/semaphoreui-client#readme
|
6
6
|
Project-URL: Issues, https://github.com/rockstar/semaphoreui-client/issues
|
@@ -0,0 +1,6 @@
|
|
1
|
+
semaphoreui_client/__about__.py,sha256=cAJAbAh288a9AL-3yxwFzEM1L26izSJ6wma5aiml_9Y,23
|
2
|
+
semaphoreui_client/__init__.py,sha256=VpeJavEFhs5gyfih7CoRTR4K4IGXGY3UYUkgAWj_f2U,56
|
3
|
+
semaphoreui_client/client.py,sha256=fKOt6sbPM9yhgG__vZIoQ6Gt6oy3r3V-zS-XNpBWkmM,32621
|
4
|
+
semaphoreui_client-0.1.19.dist-info/METADATA,sha256=gCEzNtn83lrduCiyWsvVurzNnOiezO5hfzJE7p-lRlM,1633
|
5
|
+
semaphoreui_client-0.1.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
+
semaphoreui_client-0.1.19.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
semaphoreui_client/__about__.py,sha256=BzIjnki8Bz3evNWo6bjGxxpLhy_tN9MRYhtM0MnDiWs,23
|
2
|
-
semaphoreui_client/__init__.py,sha256=VpeJavEFhs5gyfih7CoRTR4K4IGXGY3UYUkgAWj_f2U,56
|
3
|
-
semaphoreui_client/client.py,sha256=GMtwmXu_PZH0MNKsdRD07rk24iAfvBKuIQ0-g9EPxhQ,32131
|
4
|
-
semaphoreui_client-0.1.17.dist-info/METADATA,sha256=9p4WLt_D7WC1rCiKfijYkmXVsCKfjVYO9L7hKnOuoFc,1633
|
5
|
-
semaphoreui_client-0.1.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
-
semaphoreui_client-0.1.17.dist-info/RECORD,,
|
File without changes
|