QuLab 2.10.2__cp311-cp311-macosx_10_9_universal2.whl → 2.10.4__cp311-cp311-macosx_10_9_universal2.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/cli/decorators.py +1 -1
- qulab/executor/cli.py +26 -2
- qulab/executor/schedule.py +12 -3
- qulab/fun.cpython-311-darwin.so +0 -0
- qulab/version.py +1 -1
- {qulab-2.10.2.dist-info → qulab-2.10.4.dist-info}/METADATA +1 -1
- {qulab-2.10.2.dist-info → qulab-2.10.4.dist-info}/RECORD +11 -11
- {qulab-2.10.2.dist-info → qulab-2.10.4.dist-info}/WHEEL +0 -0
- {qulab-2.10.2.dist-info → qulab-2.10.4.dist-info}/entry_points.txt +0 -0
- {qulab-2.10.2.dist-info → qulab-2.10.4.dist-info}/licenses/LICENSE +0 -0
- {qulab-2.10.2.dist-info → qulab-2.10.4.dist-info}/top_level.txt +0 -0
qulab/cli/decorators.py
CHANGED
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.
|
@@ -228,9 +236,10 @@ async def run(workflow,
|
|
228
236
|
data,
|
229
237
|
plot=plot,
|
230
238
|
freeze=freeze,
|
231
|
-
veryfy_source_code=veryfy_source_code,
|
232
239
|
)
|
233
240
|
except Exception as e:
|
241
|
+
if fail_fast:
|
242
|
+
raise e
|
234
243
|
exceptions.append(e)
|
235
244
|
if any(exceptions):
|
236
245
|
raise exceptions[0]
|
@@ -241,7 +250,6 @@ async def run(workflow,
|
|
241
250
|
data,
|
242
251
|
plot=plot,
|
243
252
|
freeze=freeze,
|
244
|
-
veryfy_source_code=veryfy_source_code,
|
245
253
|
)
|
246
254
|
else:
|
247
255
|
if hasattr(wf, 'entries'):
|
@@ -256,9 +264,12 @@ async def run(workflow,
|
|
256
264
|
run=True,
|
257
265
|
plot=plot,
|
258
266
|
freeze=freeze,
|
267
|
+
fail_fast=fail_fast,
|
259
268
|
veryfy_source_code=veryfy_source_code,
|
260
269
|
)
|
261
270
|
except Exception as e:
|
271
|
+
if fail_fast:
|
272
|
+
raise e
|
262
273
|
exceptions.append(e)
|
263
274
|
if any(exceptions):
|
264
275
|
raise exceptions[0]
|
@@ -270,6 +281,7 @@ async def run(workflow,
|
|
270
281
|
run=True,
|
271
282
|
plot=plot,
|
272
283
|
freeze=freeze,
|
284
|
+
fail_fast=fail_fast,
|
273
285
|
veryfy_source_code=veryfy_source_code,
|
274
286
|
)
|
275
287
|
break
|
@@ -284,6 +296,13 @@ async def run(workflow,
|
|
284
296
|
@click.argument('workflow')
|
285
297
|
@click.option('--retry', '-r', default=1, type=int, help='Retry times.')
|
286
298
|
@click.option('--plot', '-p', is_flag=True, help='Plot the report.')
|
299
|
+
@click.option('--fail-fast',
|
300
|
+
'-f',
|
301
|
+
is_flag=True,
|
302
|
+
help='Fail immediately on first error.')
|
303
|
+
@click.option('--veryfy-source-code',
|
304
|
+
is_flag=True,
|
305
|
+
help='Veryfy the source code.')
|
287
306
|
@log_options
|
288
307
|
@command_option('maintain')
|
289
308
|
@async_command
|
@@ -293,6 +312,7 @@ async def maintain(workflow,
|
|
293
312
|
api,
|
294
313
|
retry,
|
295
314
|
plot,
|
315
|
+
fail_fast,
|
296
316
|
veryfy_source_code=True):
|
297
317
|
"""
|
298
318
|
Maintain a workflow.
|
@@ -337,9 +357,12 @@ async def maintain(workflow,
|
|
337
357
|
run=False,
|
338
358
|
plot=plot,
|
339
359
|
freeze=False,
|
360
|
+
fail_fast=fail_fast,
|
340
361
|
veryfy_source_code=veryfy_source_code,
|
341
362
|
)
|
342
363
|
except Exception as e:
|
364
|
+
if fail_fast:
|
365
|
+
raise e
|
343
366
|
exceptions.append(e)
|
344
367
|
if any(exceptions):
|
345
368
|
raise exceptions[0]
|
@@ -351,6 +374,7 @@ async def maintain(workflow,
|
|
351
374
|
run=False,
|
352
375
|
plot=plot,
|
353
376
|
freeze=False,
|
377
|
+
fail_fast=fail_fast,
|
354
378
|
veryfy_source_code=veryfy_source_code,
|
355
379
|
)
|
356
380
|
break
|
qulab/executor/schedule.py
CHANGED
@@ -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,
|
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(
|
qulab/fun.cpython-311-darwin.so
CHANGED
Binary file
|
qulab/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2.10.
|
1
|
+
__version__ = "2.10.4"
|
@@ -1,19 +1,19 @@
|
|
1
1
|
qulab/__init__.py,sha256=fL8FSMGk4vzTMXLxWgNHpd1fNWau4yujSWjPEPqudos,367
|
2
2
|
qulab/__main__.py,sha256=fjaRSL_uUjNIzBGNgjlGswb9TJ2VD5qnkZHW3hItrD4,68
|
3
3
|
qulab/dicttree.py,sha256=tRRMpGZYVOLw0TEByE3_2Ss8FdOmzuGL9e1DWbs8qoY,13684
|
4
|
-
qulab/fun.cpython-311-darwin.so,sha256
|
4
|
+
qulab/fun.cpython-311-darwin.so,sha256=RbCmtz63xoP-yVvRSBtitMmEtBRaKiRT0eSP-D7ky3U,126848
|
5
5
|
qulab/typing.py,sha256=vg62sGqxuD9CI5677ejlzAmf2fVdAESZCQjAE_xSxPg,69
|
6
6
|
qulab/utils.py,sha256=BdLdlfjpe6m6gSeONYmpAKTTqxDaYHNk4exlz8kZxTg,2982
|
7
|
-
qulab/version.py,sha256=
|
7
|
+
qulab/version.py,sha256=K_lsR8oWkx9B0hBjg9Do_K_HlMnbbdWzkT8W_QIxmL8,22
|
8
8
|
qulab/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
qulab/cli/commands.py,sha256=F1LATmSC9lOAdnrOTMK7DRjETCEcOmMsocovWRyjWTc,597
|
10
10
|
qulab/cli/config.py,sha256=fWeWHiX-Oxodvfv4g0B-UFisJlYcF1Hv6V1fKib2mOM,5447
|
11
|
-
qulab/cli/decorators.py,sha256=
|
11
|
+
qulab/cli/decorators.py,sha256=oImteZVnDPPWdyhJ4kzf2KYGJLON7VsKGBvZadWLQZo,621
|
12
12
|
qulab/executor/__init__.py,sha256=LosPzOMaljSZY1thy_Fxtbrgq7uubJszMABEB7oM7tU,101
|
13
13
|
qulab/executor/analyze.py,sha256=4Hau5LrKUdpweh7W94tcG4ahgxucHOevbM0hm57T7zE,5649
|
14
|
-
qulab/executor/cli.py,sha256=
|
14
|
+
qulab/executor/cli.py,sha256=_npz238lTU5RVJOKbfE4wTPS00RpMci19QcX01MfrE8,14911
|
15
15
|
qulab/executor/load.py,sha256=0-EtO4dkP6jB1vsgQlniv-OtPH1AZLjbtuvaWHsgbPs,20335
|
16
|
-
qulab/executor/schedule.py,sha256=
|
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=_HEtsUQ5_jSujCw8FBDAK1PRTMRCa4iD4DduHIpjo3c,10569
|
19
19
|
qulab/executor/transform.py,sha256=rk4CLIKVjGRaFzi5FVSgadUxAKKVLSopEHZCaAzDwDg,3435
|
@@ -99,9 +99,9 @@ qulab/visualization/plot_seq.py,sha256=UWTS6p9nfX_7B8ehcYo6UnSTUCjkBsNU9jiOeW2ca
|
|
99
99
|
qulab/visualization/qdat.py,sha256=ZeevBYWkzbww4xZnsjHhw7wRorJCBzbG0iEu-XQB4EA,5735
|
100
100
|
qulab/visualization/rot3d.py,sha256=lMrEJlRLwYe6NMBlGkKYpp_V9CTipOAuDy6QW_cQK00,734
|
101
101
|
qulab/visualization/widgets.py,sha256=6KkiTyQ8J-ei70LbPQZAK35wjktY47w2IveOa682ftA,3180
|
102
|
-
qulab-2.10.
|
103
|
-
qulab-2.10.
|
104
|
-
qulab-2.10.
|
105
|
-
qulab-2.10.
|
106
|
-
qulab-2.10.
|
107
|
-
qulab-2.10.
|
102
|
+
qulab-2.10.4.dist-info/licenses/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
|
103
|
+
qulab-2.10.4.dist-info/METADATA,sha256=ZuFJjAH7VHqIM4hfu0CADzgVNEPZ3ENUTPmo5uXoLlA,3753
|
104
|
+
qulab-2.10.4.dist-info/WHEEL,sha256=RbtvOFtP--plS2sXkxxM8xYfkibPkCKcYIqEe_GHrhY,114
|
105
|
+
qulab-2.10.4.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
|
106
|
+
qulab-2.10.4.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
|
107
|
+
qulab-2.10.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|