QuLab 2.10.2__cp310-cp310-win_amd64.whl → 2.10.3__cp310-cp310-win_amd64.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.
qulab/executor/cli.py CHANGED
@@ -169,6 +169,13 @@ def get(key, api):
169
169
  help='Do not run dependents.')
170
170
  @click.option('--retry', '-r', default=1, type=int, help='Retry times.')
171
171
  @click.option('--freeze', is_flag=True, help='Freeze the config table.')
172
+ @click.option('--fail-fast',
173
+ '-f',
174
+ is_flag=True,
175
+ help='Fail immediately on first error.')
176
+ @click.option('--veryfy-source-code',
177
+ is_flag=True,
178
+ help='Veryfy the source code.')
172
179
  @log_options
173
180
  @command_option('run')
174
181
  @async_command
@@ -180,6 +187,7 @@ async def run(workflow,
180
187
  no_dependents,
181
188
  retry,
182
189
  freeze,
190
+ fail_fast,
183
191
  veryfy_source_code=True):
184
192
  """
185
193
  Run a workflow.
@@ -231,6 +239,8 @@ async def run(workflow,
231
239
  veryfy_source_code=veryfy_source_code,
232
240
  )
233
241
  except Exception as e:
242
+ if fail_fast:
243
+ raise e
234
244
  exceptions.append(e)
235
245
  if any(exceptions):
236
246
  raise exceptions[0]
@@ -256,9 +266,12 @@ async def run(workflow,
256
266
  run=True,
257
267
  plot=plot,
258
268
  freeze=freeze,
269
+ fail_fast=fail_fast,
259
270
  veryfy_source_code=veryfy_source_code,
260
271
  )
261
272
  except Exception as e:
273
+ if fail_fast:
274
+ raise e
262
275
  exceptions.append(e)
263
276
  if any(exceptions):
264
277
  raise exceptions[0]
@@ -270,6 +283,7 @@ async def run(workflow,
270
283
  run=True,
271
284
  plot=plot,
272
285
  freeze=freeze,
286
+ fail_fast=fail_fast,
273
287
  veryfy_source_code=veryfy_source_code,
274
288
  )
275
289
  break
@@ -284,6 +298,13 @@ async def run(workflow,
284
298
  @click.argument('workflow')
285
299
  @click.option('--retry', '-r', default=1, type=int, help='Retry times.')
286
300
  @click.option('--plot', '-p', is_flag=True, help='Plot the report.')
301
+ @click.option('--fail-fast',
302
+ '-f',
303
+ is_flag=True,
304
+ help='Fail immediately on first error.')
305
+ @click.option('--veryfy-source-code',
306
+ is_flag=True,
307
+ help='Veryfy the source code.')
287
308
  @log_options
288
309
  @command_option('maintain')
289
310
  @async_command
@@ -293,6 +314,7 @@ async def maintain(workflow,
293
314
  api,
294
315
  retry,
295
316
  plot,
317
+ fail_fast,
296
318
  veryfy_source_code=True):
297
319
  """
298
320
  Maintain a workflow.
@@ -337,9 +359,12 @@ async def maintain(workflow,
337
359
  run=False,
338
360
  plot=plot,
339
361
  freeze=False,
362
+ fail_fast=fail_fast,
340
363
  veryfy_source_code=veryfy_source_code,
341
364
  )
342
365
  except Exception as e:
366
+ if fail_fast:
367
+ raise e
343
368
  exceptions.append(e)
344
369
  if any(exceptions):
345
370
  raise exceptions[0]
@@ -351,6 +376,7 @@ async def maintain(workflow,
351
376
  run=False,
352
377
  plot=plot,
353
378
  freeze=False,
379
+ fail_fast=fail_fast,
354
380
  veryfy_source_code=veryfy_source_code,
355
381
  )
356
382
  break
@@ -362,7 +362,7 @@ async def calibrate(workflow: WorkflowType, state_path: str | Path, plot: bool,
362
362
 
363
363
  async def diagnose(workflow: WorkflowType, code_path: str | Path,
364
364
  state_path: str | Path, plot: bool, session_id: str,
365
- veryfy_source_code: bool):
365
+ fail_fast: bool, veryfy_source_code: bool):
366
366
  '''
367
367
  Returns: True if node or dependent recalibrated.
368
368
  '''
@@ -385,8 +385,11 @@ async def diagnose(workflow: WorkflowType, code_path: str | Path,
385
385
  for n in get_dependents(workflow, code_path, veryfy_source_code):
386
386
  try:
387
387
  flag = await diagnose(n, code_path, state_path, plot,
388
- session_id, veryfy_source_code)
388
+ session_id, fail_fast,
389
+ veryfy_source_code)
389
390
  except Exception as e:
391
+ if fail_fast:
392
+ raise e
390
393
  exceptions.append(e)
391
394
  recalibrated.append(flag)
392
395
  if any(exceptions):
@@ -436,6 +439,7 @@ async def maintain(workflow: WorkflowType,
436
439
  run: bool = False,
437
440
  plot: bool = False,
438
441
  freeze: bool = False,
442
+ fail_fast: bool = False,
439
443
  veryfy_source_code: bool = True):
440
444
  if session_id is None:
441
445
  session_id = uuid.uuid4().hex
@@ -455,8 +459,11 @@ async def maintain(workflow: WorkflowType,
455
459
  run=False,
456
460
  plot=plot,
457
461
  freeze=freeze,
462
+ fail_fast=fail_fast,
458
463
  veryfy_source_code=veryfy_source_code)
459
464
  except Exception as e:
465
+ if fail_fast:
466
+ raise e
460
467
  exceptions.append(e)
461
468
  else:
462
469
  logger.debug(
@@ -486,8 +493,10 @@ async def maintain(workflow: WorkflowType,
486
493
  )
487
494
  try:
488
495
  await diagnose(n, code_path, state_path, plot, session_id,
489
- veryfy_source_code)
496
+ fail_fast, veryfy_source_code)
490
497
  except Exception as e:
498
+ if fail_fast:
499
+ raise e
491
500
  exceptions.append(e)
492
501
  else:
493
502
  logger.debug(
Binary file
qulab/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.10.2"
1
+ __version__ = "2.10.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QuLab
3
- Version: 2.10.2
3
+ Version: 2.10.3
4
4
  Summary: contral instruments and manage data
5
5
  Author-email: feihoo87 <feihoo87@gmail.com>
6
6
  Maintainer-email: feihoo87 <feihoo87@gmail.com>
@@ -1,19 +1,19 @@
1
1
  qulab/__init__.py,sha256=ulapyzt9DsDgT68EEbzuhniofHb512pNTFc-Sxfrr8Y,375
2
2
  qulab/__main__.py,sha256=FL4YsGZL1jEtmcPc5WbleArzhOHLMsWl7OH3O-1d1ss,72
3
3
  qulab/dicttree.py,sha256=ZoSJVWK4VMqfzj42gPb_n5RqLlM6K1Me0WmLIfLEYf8,14195
4
- qulab/fun.cp310-win_amd64.pyd,sha256=DMJ-yV-rpH-PamtHni-IGkGvL3izOzW5EnQ-ElUOXUc,31744
4
+ qulab/fun.cp310-win_amd64.pyd,sha256=AGvcE9MPAqX3C9LTlq9KZd1Td-TbgHpR1-EOydsoHQg,31744
5
5
  qulab/typing.py,sha256=PRtwbCHWY2ROKK8GHq4Bo8llXrIGo6xC73DrQf7S9os,71
6
6
  qulab/utils.py,sha256=65N2Xj7kqRsQ4epoLNY6tL-i5ts6Wk8YuJYee3Te6zI,3077
7
- qulab/version.py,sha256=UINbgWwinYgAg8jG5YWakGzXmyfjSZZfKyqiqfovSAk,22
7
+ qulab/version.py,sha256=XIYhk5PoReQgD4uSOa1eXmCSwNRY66HHGSW3_z-nibk,22
8
8
  qulab/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  qulab/cli/commands.py,sha256=ZTs32yQjvwPIsFjXYWNr4KqEvly0NISIqyh--96qCAY,627
10
10
  qulab/cli/config.py,sha256=A3UnyaRtiofpokyzYkJnUdwzcsYX7H-xZvBVduIOSdg,5617
11
11
  qulab/cli/decorators.py,sha256=UmJab1o-XH-8DVS_LZFGY2SPjyVgZ1QrJwkauTZDUik,626
12
12
  qulab/executor/__init__.py,sha256=LosPzOMaljSZY1thy_Fxtbrgq7uubJszMABEB7oM7tU,101
13
13
  qulab/executor/analyze.py,sha256=VoSthE2RTarY6Wj3QFKh4FqReMYL7djSAyuitgHs5K0,5837
14
- qulab/executor/cli.py,sha256=wfz2zl0-DeMMHvF2kqTzT8MGA-K2kIfZjRAByYsh33A,14052
14
+ qulab/executor/cli.py,sha256=ylsKlr1qiloTVPhF2xoTxbz5DD98VQkRXQpvmiVJdxY,15047
15
15
  qulab/executor/load.py,sha256=0-EtO4dkP6jB1vsgQlniv-OtPH1AZLjbtuvaWHsgbPs,20335
16
- qulab/executor/schedule.py,sha256=GhY4-kkNKF_EQ45Gwhd358jkEqweSJGWcuKoWGRM2wY,21067
16
+ qulab/executor/schedule.py,sha256=1YWz2d5YLmnEpXGX1aVroE0SOKdU28WwHGEioxBpTKQ,21411
17
17
  qulab/executor/storage.py,sha256=8K73KGLAVgchJdtd4rKHXkr1CQOJORWH-Gi57w8IYsw,21081
18
18
  qulab/executor/template.py,sha256=dKQM3IlADdTi9qp0fnOYjyycRNEl7KeSCBZhwbmP8bQ,10828
19
19
  qulab/executor/transform.py,sha256=rk4CLIKVjGRaFzi5FVSgadUxAKKVLSopEHZCaAzDwDg,3435
@@ -99,9 +99,9 @@ qulab/visualization/plot_seq.py,sha256=Uo1-dB1YE9IN_A9tuaOs9ZG3S5dKDQ_l98iD2Wbxp
99
99
  qulab/visualization/qdat.py,sha256=HubXFu4nfcA7iUzghJGle1C86G6221hicLR0b-GqhKQ,5887
100
100
  qulab/visualization/rot3d.py,sha256=jGHJcqj1lEWBUV-W4GUGONGacqjrYvuFoFCwPse5h1Y,757
101
101
  qulab/visualization/widgets.py,sha256=HcYwdhDtLreJiYaZuN3LfofjJmZcLwjMfP5aasebgDo,3266
102
- qulab-2.10.2.dist-info/licenses/LICENSE,sha256=b4NRQ-GFVpJMT7RuExW3NwhfbrYsX7AcdB7Gudok-fs,1086
103
- qulab-2.10.2.dist-info/METADATA,sha256=BbVR3fNk1YWnGToqB6gx0PpS4eaKZU9ht9en-2R60ws,3860
104
- qulab-2.10.2.dist-info/WHEEL,sha256=xtqxYTqke_XhXNhgwydvlroVayIzBVjJDMBpIgge99s,101
105
- qulab-2.10.2.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
106
- qulab-2.10.2.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
107
- qulab-2.10.2.dist-info/RECORD,,
102
+ qulab-2.10.3.dist-info/licenses/LICENSE,sha256=b4NRQ-GFVpJMT7RuExW3NwhfbrYsX7AcdB7Gudok-fs,1086
103
+ qulab-2.10.3.dist-info/METADATA,sha256=xpIJzNygtIMGd9wGlhVT99BwC_RTRsGEhn7YkWFLvdk,3860
104
+ qulab-2.10.3.dist-info/WHEEL,sha256=xtqxYTqke_XhXNhgwydvlroVayIzBVjJDMBpIgge99s,101
105
+ qulab-2.10.3.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
106
+ qulab-2.10.3.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
107
+ qulab-2.10.3.dist-info/RECORD,,
File without changes