pybiolib 1.2.871__py3-none-any.whl → 1.2.874__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,9 +1,11 @@
1
1
  import os
2
2
  import re
3
+ import sys
3
4
  from pathlib import Path
4
5
 
5
6
  import rich.progress
6
7
  import yaml
8
+ from rich.console import Console
7
9
 
8
10
  from biolib import api, utils
9
11
  from biolib._internal.data_record.push_data import (
@@ -36,7 +38,9 @@ class DockerStatusUpdate(TypedDict, total=False):
36
38
 
37
39
 
38
40
  def process_docker_status_updates(status_updates: Iterable[DockerStatusUpdate], action: str) -> None:
39
- with rich.progress.Progress() as progress:
41
+ console = Console(force_terminal=True, force_interactive=True, legacy_windows=False)
42
+
43
+ with rich.progress.Progress(console=console, refresh_per_second=20, transient=False) as progress:
40
44
  layer_id_to_task_id = {}
41
45
  overall_task_id = progress.add_task(description=f'[bold blue]{action} Docker image', total=None)
42
46
 
@@ -54,12 +58,16 @@ def process_docker_status_updates(status_updates: Iterable[DockerStatusUpdate],
54
58
  completed=progress_detail['current'],
55
59
  total=progress_detail['total'],
56
60
  )
61
+ progress.refresh()
62
+ sys.stdout.flush()
57
63
  elif update['status'] == 'Layer already exists':
58
64
  progress.update(
59
65
  completed=100,
60
66
  task_id=layer_id_to_task_id[layer_id],
61
67
  total=100,
62
68
  )
69
+ progress.refresh()
70
+ sys.stdout.flush()
63
71
  elif 'status' in update and 'id' in update:
64
72
  layer_id = update['id']
65
73
  status = update['status']
@@ -71,10 +79,14 @@ def process_docker_status_updates(status_updates: Iterable[DockerStatusUpdate],
71
79
  progress.update(
72
80
  task_id=layer_id_to_task_id[layer_id], description=f'[yellow]{status} layer {layer_id}'
73
81
  )
82
+ progress.refresh()
83
+ sys.stdout.flush()
74
84
  elif status in ['Pushing', 'Uploading']:
75
85
  progress.update(
76
86
  task_id=layer_id_to_task_id[layer_id], description=f'[cyan]{status} layer {layer_id}'
77
87
  )
88
+ progress.refresh()
89
+ sys.stdout.flush()
78
90
  elif status in ['Pushed', 'Uploaded']:
79
91
  progress.update(
80
92
  task_id=layer_id_to_task_id[layer_id],
@@ -82,6 +94,8 @@ def process_docker_status_updates(status_updates: Iterable[DockerStatusUpdate],
82
94
  completed=100,
83
95
  total=100,
84
96
  )
97
+ progress.refresh()
98
+ sys.stdout.flush()
85
99
  elif status == 'Layer already exists':
86
100
  progress.update(
87
101
  task_id=layer_id_to_task_id[layer_id],
@@ -89,10 +103,14 @@ def process_docker_status_updates(status_updates: Iterable[DockerStatusUpdate],
89
103
  completed=100,
90
104
  total=100,
91
105
  )
106
+ progress.refresh()
107
+ sys.stdout.flush()
92
108
  elif 'status' in update and update['status']:
93
109
  status = update['status']
94
110
  if status not in ['Preparing', 'Pushing', 'Pushed', 'Waiting', 'Layer already exists']:
95
111
  progress.update(task_id=overall_task_id, description=f'[bold blue]{action} Docker image - {status}')
112
+ progress.refresh()
113
+ sys.stdout.flush()
96
114
  elif 'status' not in update and 'progressDetail' not in update:
97
115
  print(update)
98
116
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pybiolib
3
- Version: 1.2.871
3
+ Version: 1.2.874
4
4
  Summary: BioLib Python Client
5
5
  License: MIT
6
6
  Keywords: biolib
@@ -21,7 +21,7 @@ biolib/_internal/llm_instructions/.github/instructions/style-react-ts.instructio
21
21
  biolib/_internal/llm_instructions/.github/prompts/biolib_app_inputs.prompt.md,sha256=SMzXZImdID0yKjhE1fG54VrHdD8IVuwRxRKsMF-KjWs,697
22
22
  biolib/_internal/llm_instructions/.github/prompts/biolib_run_apps.prompt.md,sha256=-t1bmGr3zEFa6lKHaLcI98yq4Sg1TCMW8xbelNSHaOA,696
23
23
  biolib/_internal/llm_instructions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- biolib/_internal/push_application.py,sha256=snnd3aCPJeByEQTCajDi7Op5TH9-BXjJS9QCS8e6cjY,14347
24
+ biolib/_internal/push_application.py,sha256=TaARo11N8oLsH0ptAepQ_8sqKrtr6dEg3ipItDNT7oo,15082
25
25
  biolib/_internal/runtime.py,sha256=BiHl4klUHr36MCpqKaUso4idHeBZfPAahLYRQrabFqA,486
26
26
  biolib/_internal/templates/__init__.py,sha256=NVbhLUMC8HITzkLvP88Qu7FHaL-SvQord-DX3gh1Ykk,24
27
27
  biolib/_internal/templates/init_template/.biolib/config.yml,sha256=y4ndTgbFvUE1UiGcIOqogT2Wm8jahGffeyU5rlCEltQ,427
@@ -140,8 +140,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
140
140
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
141
141
  biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
142
142
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
143
- pybiolib-1.2.871.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
144
- pybiolib-1.2.871.dist-info/METADATA,sha256=zAOp7nhOZdgj0uu5QPYEqTPLsUfGUBDUekQxby2kgyU,1570
145
- pybiolib-1.2.871.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
146
- pybiolib-1.2.871.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
147
- pybiolib-1.2.871.dist-info/RECORD,,
143
+ pybiolib-1.2.874.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
144
+ pybiolib-1.2.874.dist-info/METADATA,sha256=2q9W-fdI4BFUX-RmWJDc48jXb3efsQuHhzrBcYy-yu8,1570
145
+ pybiolib-1.2.874.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
146
+ pybiolib-1.2.874.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
147
+ pybiolib-1.2.874.dist-info/RECORD,,