semaphoreui-client 0.1.16__py3-none-any.whl → 0.1.18__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.
@@ -1 +1 @@
1
- __version__ = "0.1.16"
1
+ __version__ = "0.1.18"
@@ -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
@@ -460,8 +460,8 @@ class SemaphoreUIClient:
460
460
  diff: bool,
461
461
  message: str,
462
462
  git_branch: str,
463
- limit: int,
464
- environment_id: int,
463
+ limit: str,
464
+ environment: str,
465
465
  playbook: str,
466
466
  ) -> "Task":
467
467
  response = self.http.post(
@@ -472,7 +472,7 @@ class SemaphoreUIClient:
472
472
  "dry_run": dry_run,
473
473
  "diff": diff,
474
474
  "playbook": playbook,
475
- "environment": environment_id,
475
+ "environment": environment,
476
476
  "limit": limit,
477
477
  "git_branch": git_branch,
478
478
  "message": message,
@@ -557,7 +557,7 @@ class SemaphoreUIClient:
557
557
  def get_project_task(self, project_id: int, id: int) -> "Task":
558
558
  response = self.http.get(f"{self.api_endpoint}/project/{project_id}/tasks/{id}")
559
559
  assert response.status_code == 200
560
- return Task(**response.json(), project_id=project_id, client=self)
560
+ return Task(**response.json(), client=self)
561
561
 
562
562
  def delete_project_task(self, project_id: int, id: int) -> None:
563
563
  response = self.http.delete(
@@ -946,7 +946,8 @@ class Template:
946
946
  dry_run: bool = False,
947
947
  diff: bool = False,
948
948
  message: str = "",
949
- limit: int = 1,
949
+ limit: str = "",
950
+ environment: str = "",
950
951
  ) -> "Task":
951
952
  repo = [
952
953
  repo
@@ -963,7 +964,7 @@ class Template:
963
964
  message,
964
965
  git_branch,
965
966
  limit,
966
- self.environment_id,
967
+ environment,
967
968
  self.playbook,
968
969
  )
969
970
 
@@ -1000,7 +1001,6 @@ class Schedule:
1000
1001
  @dataclass
1001
1002
  class Task:
1002
1003
  arguments: typing.Optional[str]
1003
- build_task: typing.Optional["Task"]
1004
1004
  build_task_id: typing.Optional[int]
1005
1005
  commit_hash: typing.Optional[str]
1006
1006
  commit_message: str
@@ -1022,16 +1022,21 @@ class Task:
1022
1022
  start: str
1023
1023
  status: str
1024
1024
  template_id: int
1025
- tpl_alias: str
1026
- tpl_app: str
1027
- tpl_playbook: str
1028
- tpl_type: str
1029
- user_id: typing.Optional[int]
1030
- user_name: typing.Optional[str]
1031
- version: typing.Optional[str]
1032
1025
 
1033
1026
  client: SemaphoreUIClient
1034
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
+
1035
1040
  def stop(self) -> None:
1036
1041
  self.client.stop_project_task(self.project_id, self.id)
1037
1042
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semaphoreui-client
3
- Version: 0.1.16
3
+ Version: 0.1.18
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=6BiuMUkhwQp6bzUZSF8np8F1NwCltEtK0sPBF__tepU,23
2
+ semaphoreui_client/__init__.py,sha256=VpeJavEFhs5gyfih7CoRTR4K4IGXGY3UYUkgAWj_f2U,56
3
+ semaphoreui_client/client.py,sha256=K7sqvD9Ybs9NMNeGhBcSkByhxYkP1U2jGDjbnasmUtw,32604
4
+ semaphoreui_client-0.1.18.dist-info/METADATA,sha256=z2An9hskFJew-U3KOKvRn6m2x6oraQi3vRe3wUY0poQ,1633
5
+ semaphoreui_client-0.1.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ semaphoreui_client-0.1.18.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- semaphoreui_client/__about__.py,sha256=yF88-8vL8keLe6gCTumymw0UoMkWkSrJnzLru4zBCLQ,23
2
- semaphoreui_client/__init__.py,sha256=VpeJavEFhs5gyfih7CoRTR4K4IGXGY3UYUkgAWj_f2U,56
3
- semaphoreui_client/client.py,sha256=N4aJXNQN0u5zSnnFrusBeb42Kq2IXHzZmhlVGbL-mjI,32136
4
- semaphoreui_client-0.1.16.dist-info/METADATA,sha256=xnyndpXyiVFPC1bcLd7GzUgU34it-OdGfBmCxnCcDhU,1633
5
- semaphoreui_client-0.1.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- semaphoreui_client-0.1.16.dist-info/RECORD,,