QuLab 2.4.11__tar.gz → 2.4.13__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.4.11 → qulab-2.4.13}/PKG-INFO +1 -1
- {qulab-2.4.11 → qulab-2.4.13}/QuLab.egg-info/PKG-INFO +1 -1
- {qulab-2.4.11 → qulab-2.4.13}/qulab/executor/load.py +18 -6
- {qulab-2.4.11 → qulab-2.4.13}/qulab/executor/schedule.py +3 -8
- qulab-2.4.13/qulab/version.py +1 -0
- qulab-2.4.11/qulab/version.py +0 -1
- {qulab-2.4.11 → qulab-2.4.13}/LICENSE +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/MANIFEST.in +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/QuLab.egg-info/SOURCES.txt +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/QuLab.egg-info/dependency_links.txt +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/QuLab.egg-info/entry_points.txt +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/QuLab.egg-info/requires.txt +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/QuLab.egg-info/top_level.txt +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/README.md +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/pyproject.toml +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/__main__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/dicttree.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/executor/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/executor/__main__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/executor/storage.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/executor/transform.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/executor/utils.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/__main__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/config.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/dataset.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/event_queue.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/mainwindow.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/monitor.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/ploter.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/qt_compat.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/monitor/toolbar.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/curd.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/expression.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/models.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/optimize.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/query.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/record.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/scan.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/server.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/space.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/scan/utils.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/__main__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/backend/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/backend/redis.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/base_dataset.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/chunk.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/dataset.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/file.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/base.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/config.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/file.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/ipy.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/models.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/record.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/report.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/models/tag.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/storage/storage.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/chat.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/device/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/device/basedevice.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/device/loader.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/device/utils.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/drivers/FakeInstrument.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/drivers/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/ipy_events.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/bencoder.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/cli.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/dhcp.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/dhcpd.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/kad.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/kcp.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/net/nginx.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/progress.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/client.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/exceptions.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/msgpack.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/msgpack.pyi +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/router.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/rpc.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/serialize.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/server.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/socket.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/utils.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/worker.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/sys/rpc/zmq_socket.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/__init__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/__main__.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/_autoplot.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/plot_circ.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/plot_layout.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/plot_seq.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/qdat.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/rot3d.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/qulab/visualization/widgets.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/setup.cfg +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/setup.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/src/qulab.h +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/tests/test_kad.py +0 -0
- {qulab-2.4.11 → qulab-2.4.13}/tests/test_scan.py +0 -0
|
@@ -128,8 +128,8 @@ def find_unreferenced_workflows(path: str) -> list[str]:
|
|
|
128
128
|
for file_path in root.rglob("*.py"):
|
|
129
129
|
if file_path.name == "__init__.py":
|
|
130
130
|
continue
|
|
131
|
-
if file_path.name.
|
|
132
|
-
|
|
131
|
+
if file_path.name == 'template.py' or file_path.name.endswith(
|
|
132
|
+
"_template.py"):
|
|
133
133
|
continue
|
|
134
134
|
try:
|
|
135
135
|
rel_path = file_path.relative_to(root)
|
|
@@ -157,7 +157,7 @@ def find_unreferenced_workflows(path: str) -> list[str]:
|
|
|
157
157
|
)
|
|
158
158
|
continue
|
|
159
159
|
try:
|
|
160
|
-
depends_list =
|
|
160
|
+
depends_list = [n.__workflow_id__ for n in get_dependents(module, root)]
|
|
161
161
|
except Exception as e:
|
|
162
162
|
warnings.warn(f"Error calling depends() in {rel_str}: {e}")
|
|
163
163
|
continue
|
|
@@ -222,10 +222,17 @@ def load_workflow_from_template(file_name: str,
|
|
|
222
222
|
|
|
223
223
|
hash_str = hashlib.md5(pickle.dumps(mappping)).hexdigest()[:8]
|
|
224
224
|
if subtitle is None:
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
if path.stem == 'template':
|
|
226
|
+
path = path.parent / f'tmp{hash_str}.py'
|
|
227
|
+
else:
|
|
228
|
+
path = path.parent / path.stem.replace('_template',
|
|
229
|
+
f'_tmp{hash_str}.py')
|
|
227
230
|
else:
|
|
228
|
-
|
|
231
|
+
if path.stem == 'template':
|
|
232
|
+
path = path.parent / f'{subtitle}.py'
|
|
233
|
+
else:
|
|
234
|
+
path = path.parent / path.stem.replace('_template',
|
|
235
|
+
f'_{subtitle}.py')
|
|
229
236
|
|
|
230
237
|
with open(base_path / path, 'w') as f:
|
|
231
238
|
f.write(content)
|
|
@@ -262,3 +269,8 @@ def load_workflow(workflow: str | tuple[str, dict],
|
|
|
262
269
|
raise TypeError(f"Invalid workflow: {workflow}")
|
|
263
270
|
|
|
264
271
|
return w
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def get_dependents(workflow: WorkflowType,
|
|
275
|
+
code_path: str | Path) -> list[WorkflowType]:
|
|
276
|
+
return [load_workflow(n, code_path) for n in workflow.depends()[0]]
|
|
@@ -6,7 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from loguru import logger
|
|
7
7
|
|
|
8
8
|
from . import transform
|
|
9
|
-
from .load import WorkflowType,
|
|
9
|
+
from .load import WorkflowType, get_dependents
|
|
10
10
|
from .storage import (Result, find_result, get_head, renew_result,
|
|
11
11
|
revoke_result, save_result)
|
|
12
12
|
|
|
@@ -51,7 +51,7 @@ def check_state(workflow: WorkflowType, code_path: str | Path,
|
|
|
51
51
|
f'check_state failed: "{workflow.__workflow_id__}" has bad data')
|
|
52
52
|
return False
|
|
53
53
|
for n in get_dependents(workflow, code_path):
|
|
54
|
-
r = find_result(n, state_path)
|
|
54
|
+
r = find_result(n.__workflow_id__, state_path)
|
|
55
55
|
if r is None or r.checked_time > result.checked_time:
|
|
56
56
|
logger.debug(
|
|
57
57
|
f'check_state failed: "{workflow.__workflow_id__}" has outdated dependencies'
|
|
@@ -158,7 +158,7 @@ def check_data(workflow: WorkflowType, code_path: str | Path,
|
|
|
158
158
|
@functools.lru_cache(maxsize=128)
|
|
159
159
|
def calibrate(workflow: WorkflowType, code_path: str | Path,
|
|
160
160
|
state_path: str | Path, plot: bool, session_id: str) -> Result:
|
|
161
|
-
history = find_result(workflow, state_path)
|
|
161
|
+
history = find_result(workflow.__workflow_id__, state_path)
|
|
162
162
|
|
|
163
163
|
logger.debug(f'Calibrating "{workflow.__workflow_id__}" ...')
|
|
164
164
|
data = workflow.calibrate()
|
|
@@ -230,11 +230,6 @@ def diagnose(workflow: WorkflowType, code_path: str | Path,
|
|
|
230
230
|
return True
|
|
231
231
|
|
|
232
232
|
|
|
233
|
-
def get_dependents(workflow: WorkflowType,
|
|
234
|
-
code_path: str | Path) -> list[WorkflowType]:
|
|
235
|
-
return [load_workflow(n, code_path) for n in workflow.depends()[0]]
|
|
236
|
-
|
|
237
|
-
|
|
238
233
|
@logger.catch(reraise=True)
|
|
239
234
|
def maintain(workflow: WorkflowType,
|
|
240
235
|
code_path: str | Path,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.4.13"
|
qulab-2.4.11/qulab/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.4.11"
|
|
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
|