QuLab 2.7.1__cp311-cp311-macosx_10_9_universal2.whl → 2.7.3__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-2.7.1.dist-info → QuLab-2.7.3.dist-info}/METADATA +1 -1
- {QuLab-2.7.1.dist-info → QuLab-2.7.3.dist-info}/RECORD +11 -10
- qulab/executor/cli.py +18 -0
- qulab/executor/schedule.py +2 -2
- qulab/fun.cpython-311-darwin.so +0 -0
- qulab/utils.py +31 -0
- qulab/version.py +1 -1
- {QuLab-2.7.1.dist-info → QuLab-2.7.3.dist-info}/LICENSE +0 -0
- {QuLab-2.7.1.dist-info → QuLab-2.7.3.dist-info}/WHEEL +0 -0
- {QuLab-2.7.1.dist-info → QuLab-2.7.3.dist-info}/entry_points.txt +0 -0
- {QuLab-2.7.1.dist-info → QuLab-2.7.3.dist-info}/top_level.txt +0 -0
@@ -1,16 +1,17 @@
|
|
1
1
|
qulab/__init__.py,sha256=tKRZe2WafDGcwbu7ddlMaePerN842aRbxcrECsu5pas,286
|
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=2Wk_CXsyPdjuOcVpdScZJw59sSE-wAuZS2AXzbrfEhI,126848
|
5
5
|
qulab/typing.py,sha256=5xCLfrp1aZpKpDy4p2arbFszw2eK3hGUjZa-XSvC_-8,69
|
6
|
-
qulab/
|
6
|
+
qulab/utils.py,sha256=JIXMSmZU0uYfKG_tzawpK7vRNPRir_hJE8JlqkVLX2o,1260
|
7
|
+
qulab/version.py,sha256=y99pEuN5aYbS8B82oaXdTpzvQub21umDXa0ybjLhtPQ,21
|
7
8
|
qulab/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
9
|
qulab/cli/commands.py,sha256=tgDIkkeIoasQXAifJZ6NU8jDgpNgb2a-B0C4nF0evrE,559
|
9
10
|
qulab/cli/config.py,sha256=SdNmWzweWAdyk8M2oKYhMxnkaJ0qIayPlsLGCNlVqME,3108
|
10
11
|
qulab/executor/__init__.py,sha256=LosPzOMaljSZY1thy_Fxtbrgq7uubJszMABEB7oM7tU,101
|
11
|
-
qulab/executor/cli.py,sha256=
|
12
|
+
qulab/executor/cli.py,sha256=Wc1SWfPsg9mjooV-kR9jvMqt0c2dXDwdQIJDySzNpqs,8932
|
12
13
|
qulab/executor/load.py,sha256=QKe2qs-kCPp0PjvnVMR5XVgSa1IkN5BSHkNPZ2EpC38,18007
|
13
|
-
qulab/executor/schedule.py,sha256=
|
14
|
+
qulab/executor/schedule.py,sha256=YRAYs0PgR0mhhy4rJX8Ddi65peSfh7SfsvudVjLJQAU,15248
|
14
15
|
qulab/executor/storage.py,sha256=-v7Yd1SrLa8Uy2JHHKFJN1Qp48PPgtWhHC7kcFdACLo,10546
|
15
16
|
qulab/executor/transform.py,sha256=kaDJePBhVc32gZkQN8YBuA69lYYW9YhDZmCnUKaWuQw,2189
|
16
17
|
qulab/executor/utils.py,sha256=XDk3duNrqDsCqZyZUmPqIAIIiykiafcOMBpy9NVAOAw,5686
|
@@ -93,9 +94,9 @@ qulab/visualization/plot_seq.py,sha256=UWTS6p9nfX_7B8ehcYo6UnSTUCjkBsNU9jiOeW2ca
|
|
93
94
|
qulab/visualization/qdat.py,sha256=ZeevBYWkzbww4xZnsjHhw7wRorJCBzbG0iEu-XQB4EA,5735
|
94
95
|
qulab/visualization/rot3d.py,sha256=lMrEJlRLwYe6NMBlGkKYpp_V9CTipOAuDy6QW_cQK00,734
|
95
96
|
qulab/visualization/widgets.py,sha256=6KkiTyQ8J-ei70LbPQZAK35wjktY47w2IveOa682ftA,3180
|
96
|
-
QuLab-2.7.
|
97
|
-
QuLab-2.7.
|
98
|
-
QuLab-2.7.
|
99
|
-
QuLab-2.7.
|
100
|
-
QuLab-2.7.
|
101
|
-
QuLab-2.7.
|
97
|
+
QuLab-2.7.3.dist-info/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
|
98
|
+
QuLab-2.7.3.dist-info/METADATA,sha256=XSwQT3o313zlAp8xCfXBkBJ7X0HUaWNYw4k2wHTpqSs,3698
|
99
|
+
QuLab-2.7.3.dist-info/WHEEL,sha256=K10eKSN6_vzvMOgXxWbVOQNR7Orfl6gBTCpCI8bcYx4,114
|
100
|
+
QuLab-2.7.3.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
|
101
|
+
QuLab-2.7.3.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
|
102
|
+
QuLab-2.7.3.dist-info/RECORD,,
|
qulab/executor/cli.py
CHANGED
@@ -17,6 +17,16 @@ from .transform import set_config_api
|
|
17
17
|
from .utils import workflow_template
|
18
18
|
|
19
19
|
|
20
|
+
@logger.catch(reraise=True)
|
21
|
+
def boot(script_path):
|
22
|
+
"""Run a script in a new terminal."""
|
23
|
+
import sys
|
24
|
+
|
25
|
+
from qulab.utils import run_detached_with_terminal
|
26
|
+
|
27
|
+
run_detached_with_terminal(sys.executable + ' ' + script_path)
|
28
|
+
|
29
|
+
|
20
30
|
@logger.catch(reraise=True)
|
21
31
|
def check_toplogy(workflow: WorkflowType, code_path: str | Path) -> dict:
|
22
32
|
graph = {}
|
@@ -51,8 +61,16 @@ def command_option(command_name):
|
|
51
61
|
'-a',
|
52
62
|
default=lambda: get_config_value("api", str, command_name),
|
53
63
|
help='The modlule name of the api.')
|
64
|
+
@click.option(
|
65
|
+
'--bootstrap',
|
66
|
+
'-b',
|
67
|
+
default=lambda: get_config_value("bootstrap", Path, command_name),
|
68
|
+
help='The path of the bootstrap.')
|
54
69
|
@functools.wraps(func)
|
55
70
|
def wrapper(*args, **kwargs):
|
71
|
+
bootstrap = kwargs.pop('bootstrap')
|
72
|
+
if bootstrap is not None:
|
73
|
+
boot(bootstrap)
|
56
74
|
return func(*args, **kwargs)
|
57
75
|
|
58
76
|
return wrapper
|
qulab/executor/schedule.py
CHANGED
@@ -47,7 +47,7 @@ def check_state(workflow: WorkflowType, code_path: str | Path,
|
|
47
47
|
3. No dependencies have been recalibrated since the last time check data or calibrate was run on this cal.
|
48
48
|
4. All dependencies pass check state.
|
49
49
|
"""
|
50
|
-
logger.debug(f'check_state: "{workflow}"')
|
50
|
+
logger.debug(f'check_state: "{workflow.__workflow_id__}"')
|
51
51
|
result = find_result(workflow.__workflow_id__, state_path)
|
52
52
|
if not result:
|
53
53
|
logger.debug(
|
@@ -207,7 +207,7 @@ def check_data(workflow: WorkflowType, code_path: str | Path,
|
|
207
207
|
base_path=state_path)
|
208
208
|
save_result(workflow.__workflow_id__, result, state_path)
|
209
209
|
|
210
|
-
logger.debug(f'Calibrated "{workflow}" !')
|
210
|
+
logger.debug(f'Calibrated "{workflow.__workflow_id__}" !')
|
211
211
|
result = call_analyzer(workflow,
|
212
212
|
result,
|
213
213
|
history,
|
qulab/fun.cpython-311-darwin.so
CHANGED
Binary file
|
qulab/utils.py
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
import subprocess
|
2
|
+
import sys
|
3
|
+
|
4
|
+
|
5
|
+
def run_detached_with_terminal(executable_path):
|
6
|
+
"""
|
7
|
+
启动可执行文件并在新终端窗口中保持运行,Python退出后进程仍存在。
|
8
|
+
适用于Windows、Linux和macOS。
|
9
|
+
"""
|
10
|
+
try:
|
11
|
+
if sys.platform == 'win32':
|
12
|
+
# Windows:使用start命令启动新cmd窗口
|
13
|
+
cmd = f'start cmd /k "{executable_path}"'
|
14
|
+
subprocess.Popen(cmd, shell=True)
|
15
|
+
elif sys.platform == 'darwin':
|
16
|
+
# macOS:通过AppleScript在Terminal中执行命令
|
17
|
+
escaped_path = executable_path.replace('"', r'\"')
|
18
|
+
script = f'tell application "Terminal" to do script "{escaped_path}"'
|
19
|
+
subprocess.Popen(['osascript', '-e', script],
|
20
|
+
start_new_session=True)
|
21
|
+
else:
|
22
|
+
# Linux:尝试gnome-terminal或xterm
|
23
|
+
try:
|
24
|
+
subprocess.Popen(['gnome-terminal', '--', executable_path],
|
25
|
+
start_new_session=True)
|
26
|
+
except FileNotFoundError:
|
27
|
+
subprocess.Popen(['xterm', '-e', executable_path],
|
28
|
+
start_new_session=True)
|
29
|
+
except Exception as e:
|
30
|
+
print(f"启动失败: {e}")
|
31
|
+
sys.exit(1)
|
qulab/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2.7.
|
1
|
+
__version__ = "2.7.3"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|