semaphoreui-client 0.1.13__tar.gz → 0.1.15__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semaphoreui-client
3
- Version: 0.1.13
3
+ Version: 0.1.15
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 @@
1
+ __version__ = "0.1.15"
@@ -394,7 +394,7 @@ class SemaphoreUIClient:
394
394
  for template in response.json():
395
395
  if template["last_task"] is not None:
396
396
  template["last_task"] = Task(**template["last_task"], client=self)
397
- templates.append(template)
397
+ templates.append(Template(**template, client=self))
398
398
  return templates
399
399
 
400
400
  def create_project_template(
@@ -534,14 +534,12 @@ class SemaphoreUIClient:
534
534
  )
535
535
  assert response.status_code == 204
536
536
 
537
- def get_project_task_output(
538
- self, project_id: int, id: int
539
- ) -> typing.List["TaskOutput"]:
537
+ def get_project_task_output(self, project_id: int, id: int) -> str:
540
538
  response = self.http.get(
541
539
  f"{self.api_endpoint}/project/{project_id}/tasks/{id}/output"
542
540
  )
543
541
  assert response.status_code == 200
544
- return [TaskOutput(**data) for data in response.json()]
542
+ return "\n".join(data["output"] for data in response.json())
545
543
 
546
544
 
547
545
  @dataclass
@@ -982,16 +980,5 @@ class Task:
982
980
  def delete(self) -> None:
983
981
  self.client.delete_project_task(self.project_id, self.id)
984
982
 
985
- def output(self) -> typing.List["TaskOutput"]:
983
+ def output(self) -> str:
986
984
  return self.client.get_project_task_output(self.project_id, self.id)
987
-
988
- def normalized_output(self) -> typing.List[str]:
989
- return [output.output for output in self.output()]
990
-
991
-
992
- @dataclass
993
- class TaskOutput:
994
- task_id: int
995
- task: str
996
- time: str
997
- output: str
@@ -1 +0,0 @@
1
- __version__ = "0.1.13"