QuLab 2.11.7__tar.gz → 2.11.8__tar.gz
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-2.11.7 → qulab-2.11.8}/PKG-INFO +1 -1
- {qulab-2.11.7 → qulab-2.11.8}/QuLab.egg-info/PKG-INFO +1 -1
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/cli.py +55 -14
- qulab-2.11.8/qulab/version.py +1 -0
- qulab-2.11.7/qulab/version.py +0 -1
- {qulab-2.11.7 → qulab-2.11.8}/LICENSE +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/MANIFEST.in +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/QuLab.egg-info/SOURCES.txt +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/QuLab.egg-info/dependency_links.txt +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/QuLab.egg-info/entry_points.txt +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/QuLab.egg-info/requires.txt +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/QuLab.egg-info/top_level.txt +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/README.md +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/pyproject.toml +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/__main__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/cli/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/cli/commands.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/cli/config.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/cli/decorators.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/analyze.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/load.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/registry.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/schedule.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/storage.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/template.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/executor/utils.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/__main__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/config.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/dataset.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/event_queue.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/mainwindow.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/monitor.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/ploter.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/qt_compat.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/monitor/toolbar.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/curd.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/models.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/optimize.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/query.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/record.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/scan.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/server.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/space.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/scan/utils.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/__main__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/backend/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/backend/redis.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/base_dataset.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/chunk.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/dataset.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/file.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/base.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/config.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/file.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/ipy.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/models.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/record.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/report.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/models/tag.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/storage/storage.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/chat.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/device/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/device/basedevice.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/device/loader.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/device/utils.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/drivers/FakeInstrument.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/drivers/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/ipy_events.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/bencoder.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/cli.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/dhcp.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/dhcpd.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/kad.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/kcp.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/net/nginx.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/progress.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/client.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/exceptions.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/msgpack.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/msgpack.pyi +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/router.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/rpc.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/serialize.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/server.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/socket.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/utils.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/worker.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/sys/rpc/zmq_socket.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/tools/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/tools/connection_helper.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/typing.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/utils.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/__init__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/__main__.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/_autoplot.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/plot_circ.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/plot_layout.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/plot_seq.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/qdat.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/rot3d.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/qulab/visualization/widgets.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/setup.cfg +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/setup.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/src/qulab.h +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/tests/test_kad.py +0 -0
- {qulab-2.11.7 → qulab-2.11.8}/tests/test_scan.py +0 -0
@@ -1,7 +1,9 @@
|
|
1
|
+
import ast
|
1
2
|
import functools
|
2
3
|
import graphlib
|
3
4
|
import importlib
|
4
5
|
import os
|
6
|
+
import re
|
5
7
|
import sys
|
6
8
|
from pathlib import Path
|
7
9
|
|
@@ -283,7 +285,49 @@ def boot(bootstrap):
|
|
283
285
|
run_script(bootstrap)
|
284
286
|
|
285
287
|
|
286
|
-
|
288
|
+
def parse_dynamic_option_value(value):
|
289
|
+
"""解析动态参数值"""
|
290
|
+
try:
|
291
|
+
parsed_value = ast.literal_eval(value)
|
292
|
+
except (ValueError, SyntaxError):
|
293
|
+
# 如果解析失败,返回原始字符串
|
294
|
+
parsed_value = value
|
295
|
+
return parsed_value
|
296
|
+
|
297
|
+
|
298
|
+
def parse_dynamic_options(args):
|
299
|
+
"""解析格式为 key=value 的未知参数列表"""
|
300
|
+
pattern = re.compile(r'^([a-zA-Z_][\w\-]*)=(.+)$')
|
301
|
+
result = {}
|
302
|
+
for arg in args:
|
303
|
+
match = pattern.match(arg)
|
304
|
+
if match:
|
305
|
+
key, value = match.groups()
|
306
|
+
result[key] = parse_dynamic_option_value(value)
|
307
|
+
else:
|
308
|
+
raise ValueError(
|
309
|
+
f"Invalid argument format: {arg}. Expected format is key=value."
|
310
|
+
)
|
311
|
+
return result
|
312
|
+
|
313
|
+
|
314
|
+
help_doc = """
|
315
|
+
Run a workflow.
|
316
|
+
|
317
|
+
If the workflow has entries, run all entries.
|
318
|
+
If `--no-dependents` is set, only run the workflow itself.
|
319
|
+
If `--retry` is set, retry the workflow when calibration failed.
|
320
|
+
If `--freeze` is set, freeze the config table.
|
321
|
+
If `--plot` is set, plot the report.
|
322
|
+
If `--api` is set, use the api to get and update the config table.
|
323
|
+
If `--code` is not set, use the current working directory.
|
324
|
+
If `--data` is not set, use the `logs` directory in the code path.
|
325
|
+
"""
|
326
|
+
|
327
|
+
|
328
|
+
@click.command(context_settings=dict(ignore_unknown_options=True,
|
329
|
+
allow_extra_args=True),
|
330
|
+
help=help_doc)
|
287
331
|
@click.argument('workflow')
|
288
332
|
@click.option('--plot', '-p', is_flag=True, help='Plot the report.')
|
289
333
|
@click.option('--no-dependents',
|
@@ -301,8 +345,10 @@ def boot(bootstrap):
|
|
301
345
|
help='Veryfy the source code.')
|
302
346
|
@log_options('run')
|
303
347
|
@command_option('run')
|
348
|
+
@click.pass_context
|
304
349
|
@async_command
|
305
|
-
async def run(
|
350
|
+
async def run(ctx,
|
351
|
+
workflow,
|
306
352
|
code,
|
307
353
|
data,
|
308
354
|
api,
|
@@ -312,18 +358,6 @@ async def run(workflow,
|
|
312
358
|
freeze,
|
313
359
|
fail_fast,
|
314
360
|
veryfy_source_code=True):
|
315
|
-
"""
|
316
|
-
Run a workflow.
|
317
|
-
|
318
|
-
If the workflow has entries, run all entries.
|
319
|
-
If `--no-dependents` is set, only run the workflow itself.
|
320
|
-
If `--retry` is set, retry the workflow when calibration failed.
|
321
|
-
If `--freeze` is set, freeze the config table.
|
322
|
-
If `--plot` is set, plot the report.
|
323
|
-
If `--api` is set, use the api to get and update the config table.
|
324
|
-
If `--code` is not set, use the current working directory.
|
325
|
-
If `--data` is not set, use the `logs` directory in the code path.
|
326
|
-
"""
|
327
361
|
logger.info(
|
328
362
|
f'[CMD]: run {workflow} --code {code} --data {data} --api {api}'
|
329
363
|
f'{" --plot" if plot else ""}'
|
@@ -342,6 +376,13 @@ async def run(workflow,
|
|
342
376
|
code = Path(os.path.expanduser(code))
|
343
377
|
data = Path(os.path.expanduser(data))
|
344
378
|
|
379
|
+
extra_args = ctx.args
|
380
|
+
params = parse_dynamic_options(extra_args)
|
381
|
+
|
382
|
+
if params:
|
383
|
+
workflow = (workflow, params)
|
384
|
+
rich.print(workflow)
|
385
|
+
|
345
386
|
wf = load_workflow(workflow, code, veryfy_source_code=veryfy_source_code)
|
346
387
|
check_toplogy(wf, code, veryfy_source_code=veryfy_source_code)
|
347
388
|
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "2.11.8"
|
qulab-2.11.7/qulab/version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "2.11.7"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|