atlasai-dstoolkit-client 0.0.14__py3-none-any.whl → 0.0.15__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.
@@ -11,6 +11,7 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+ import ast
14
15
  import logging
15
16
  import os
16
17
  import time
@@ -74,6 +75,11 @@ class Workflow:
74
75
  return result
75
76
 
76
77
  def logs(self, only_errors=True):
78
+ def cleanup_logs(logs):
79
+ if not logs:
80
+ return "-"
81
+ return ast.literal_eval(logs).decode('utf-8')
82
+
77
83
  if not self.id:
78
84
  raise Exception('No valid execution of the workflow. Please use the `run` method first.')
79
85
 
@@ -86,7 +92,6 @@ class Workflow:
86
92
  o.print_subtitle(f'Message: {workflow["data"]["message"] or "-"}')
87
93
 
88
94
  o.print_body('---------------------------------------------------')
89
-
90
95
  if not result['data']:
91
96
  if only_errors:
92
97
  o.print_title('No errors detected.')
@@ -96,7 +101,7 @@ class Workflow:
96
101
  for pod, data in result['data'].items():
97
102
  o.print_title(f'Pod: {pod}')
98
103
  o.print_subtitle(f'Message: {data["message"] or "-"}')
99
- o.print_subtitle(f'Logs: {data["logs"] or "-"}')
104
+ o.print_subtitle(f'Logs: {cleanup_logs(data.get("logs"))}')
100
105
  o.print_body('---------------------------------------------------')
101
106
 
102
107
  def run(self, wait_until_complete=False):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atlasai-dstoolkit-client
3
- Version: 0.0.14
3
+ Version: 0.0.15
4
4
  Summary: UNKNOWN
5
5
  Home-page: UNKNOWN
6
6
  Author: AtlasAI SWE
@@ -10,9 +10,9 @@ atlasai/toolkit/model.py,sha256=RUe0HbDpzvHOV9A4rzG3PgN9boMWDHQ2tR7IKHXzbx8,4126
10
10
  atlasai/toolkit/output.py,sha256=FyDjrpVlbrEyfHfwOpxp8H57jx_qXahDjO1qpHIeuYM,473
11
11
  atlasai/toolkit/requests.py,sha256=X86nIo07hAjUlilZcZ1lV8RB7KOsTKbTGtcY_SpFEXY,1223
12
12
  atlasai/toolkit/utils.py,sha256=lYh3P2XOshRgHCjFeXJ0FOJWQW64sddgx8c2kL6Wqwc,1566
13
- atlasai/toolkit/workflows.py,sha256=HlmLNma1P4xyd74gzM5moBXPGjVQqziGOtyRTXBXUhw,6994
14
- atlasai_dstoolkit_client-0.0.14.dist-info/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
15
- atlasai_dstoolkit_client-0.0.14.dist-info/METADATA,sha256=vWbApYiDX_XA2mFvwXKRWDCV6KW5OwOYL-jqJN4S56A,1471
16
- atlasai_dstoolkit_client-0.0.14.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
17
- atlasai_dstoolkit_client-0.0.14.dist-info/top_level.txt,sha256=HRTbErU8nmHFDaJJ5R_XYbwpt21dqdjDpSva8xyy_0k,8
18
- atlasai_dstoolkit_client-0.0.14.dist-info/RECORD,,
13
+ atlasai/toolkit/workflows.py,sha256=9NTqPZqoT46tdjMuFApYsGUpbNNDP_Gp2gYMXgVLo_s,7158
14
+ atlasai_dstoolkit_client-0.0.15.dist-info/LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
15
+ atlasai_dstoolkit_client-0.0.15.dist-info/METADATA,sha256=Ada-4ks6hKHOq1GmPEJJKnO9TlATP2XVRyAat70spbo,1471
16
+ atlasai_dstoolkit_client-0.0.15.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
17
+ atlasai_dstoolkit_client-0.0.15.dist-info/top_level.txt,sha256=HRTbErU8nmHFDaJJ5R_XYbwpt21dqdjDpSva8xyy_0k,8
18
+ atlasai_dstoolkit_client-0.0.15.dist-info/RECORD,,