QuLab 2.10.2__cp312-cp312-macosx_10_13_universal2.whl → 2.10.3__cp312-cp312-macosx_10_13_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/executor/cli.py +26 -0
- qulab/executor/schedule.py +12 -3
- qulab/fun.cpython-312-darwin.so +0 -0
- qulab/version.py +1 -1
- {qulab-2.10.2.dist-info → qulab-2.10.3.dist-info}/METADATA +1 -1
- {qulab-2.10.2.dist-info → qulab-2.10.3.dist-info}/RECORD +10 -10
- {qulab-2.10.2.dist-info → qulab-2.10.3.dist-info}/WHEEL +0 -0
- {qulab-2.10.2.dist-info → qulab-2.10.3.dist-info}/entry_points.txt +0 -0
- {qulab-2.10.2.dist-info → qulab-2.10.3.dist-info}/licenses/LICENSE +0 -0
- {qulab-2.10.2.dist-info → qulab-2.10.3.dist-info}/top_level.txt +0 -0
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
|
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-312-darwin.so
CHANGED
Binary file
|
qulab/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2.10.
|
1
|
+
__version__ = "2.10.3"
|
@@ -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-312-darwin.so,sha256=
|
4
|
+
qulab/fun.cpython-312-darwin.so,sha256=DWFdMjDlZRu00NB5zRakkJKXZ9gzw3TIOXTeT3g0rgM,126864
|
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=XIYhk5PoReQgD4uSOa1eXmCSwNRY66HHGSW3_z-nibk,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
11
|
qulab/cli/decorators.py,sha256=66lzX1FtGG3C0qheLOjbKquLitnivXgmWyEG2ywRvKY,598
|
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=ylsKlr1qiloTVPhF2xoTxbz5DD98VQkRXQpvmiVJdxY,15047
|
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.3.dist-info/licenses/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
|
103
|
+
qulab-2.10.3.dist-info/METADATA,sha256=EcKQHXY0VLu8VccmHoc9Fqmb4A6OV9iuKOOYlJfcyOI,3753
|
104
|
+
qulab-2.10.3.dist-info/WHEEL,sha256=9_3tTSxMJq-dgdzMiScNvtT5eTBVd3l6RgHS7HwTzpA,115
|
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
|
File without changes
|
File without changes
|
File without changes
|