pybiolib 1.2.869__py3-none-any.whl → 1.2.871__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.
@@ -38,6 +38,7 @@ class DockerStatusUpdate(TypedDict, total=False):
38
38
  def process_docker_status_updates(status_updates: Iterable[DockerStatusUpdate], action: str) -> None:
39
39
  with rich.progress.Progress() as progress:
40
40
  layer_id_to_task_id = {}
41
+ overall_task_id = progress.add_task(description=f'[bold blue]{action} Docker image', total=None)
41
42
 
42
43
  for update in status_updates:
43
44
  if 'progressDetail' in update and 'id' in update:
@@ -59,7 +60,39 @@ def process_docker_status_updates(status_updates: Iterable[DockerStatusUpdate],
59
60
  task_id=layer_id_to_task_id[layer_id],
60
61
  total=100,
61
62
  )
63
+ elif 'status' in update and 'id' in update:
64
+ layer_id = update['id']
65
+ status = update['status']
62
66
 
67
+ if layer_id not in layer_id_to_task_id:
68
+ layer_id_to_task_id[layer_id] = progress.add_task(description=f'[cyan]{action} layer {layer_id}')
69
+
70
+ if status in ['Preparing', 'Waiting']:
71
+ progress.update(
72
+ task_id=layer_id_to_task_id[layer_id], description=f'[yellow]{status} layer {layer_id}'
73
+ )
74
+ elif status in ['Pushing', 'Uploading']:
75
+ progress.update(
76
+ task_id=layer_id_to_task_id[layer_id], description=f'[cyan]{status} layer {layer_id}'
77
+ )
78
+ elif status in ['Pushed', 'Uploaded']:
79
+ progress.update(
80
+ task_id=layer_id_to_task_id[layer_id],
81
+ description=f'[green]{status} layer {layer_id}',
82
+ completed=100,
83
+ total=100,
84
+ )
85
+ elif status == 'Layer already exists':
86
+ progress.update(
87
+ task_id=layer_id_to_task_id[layer_id],
88
+ description=f'[green]{status} - layer {layer_id}',
89
+ completed=100,
90
+ total=100,
91
+ )
92
+ elif 'status' in update and update['status']:
93
+ status = update['status']
94
+ if status not in ['Preparing', 'Pushing', 'Pushed', 'Waiting', 'Layer already exists']:
95
+ progress.update(task_id=overall_task_id, description=f'[bold blue]{action} Docker image - {status}')
63
96
  elif 'status' not in update and 'progressDetail' not in update:
64
97
  print(update)
65
98
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pybiolib
3
- Version: 1.2.869
3
+ Version: 1.2.871
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=I7yHGcwK6udc2hVmOQIc1BcQBipAMibEjURMI6HgdXk,12502
24
+ biolib/_internal/push_application.py,sha256=snnd3aCPJeByEQTCajDi7Op5TH9-BXjJS9QCS8e6cjY,14347
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.869.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
144
- pybiolib-1.2.869.dist-info/METADATA,sha256=cKOLYxkyG6H3jabOiGGTUNZsKDU-UL3SdxoddPJxt1E,1570
145
- pybiolib-1.2.869.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
146
- pybiolib-1.2.869.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
147
- pybiolib-1.2.869.dist-info/RECORD,,
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,,