QuLab 2.9.9__tar.gz → 2.9.10__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.9.9 → qulab-2.9.10}/PKG-INFO +1 -1
- {qulab-2.9.9 → qulab-2.9.10}/QuLab.egg-info/PKG-INFO +1 -1
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/load.py +13 -12
- qulab-2.9.10/qulab/version.py +1 -0
- qulab-2.9.9/qulab/version.py +0 -1
- {qulab-2.9.9 → qulab-2.9.10}/LICENSE +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/MANIFEST.in +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/QuLab.egg-info/SOURCES.txt +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/QuLab.egg-info/dependency_links.txt +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/QuLab.egg-info/entry_points.txt +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/QuLab.egg-info/requires.txt +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/QuLab.egg-info/top_level.txt +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/README.md +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/pyproject.toml +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/__main__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/cli/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/cli/commands.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/cli/config.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/dicttree.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/analyze.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/cli.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/schedule.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/storage.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/template.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/transform.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/executor/utils.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/__main__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/config.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/dataset.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/event_queue.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/mainwindow.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/monitor.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/ploter.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/qt_compat.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/monitor/toolbar.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/curd.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/expression.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/models.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/optimize.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/query.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/record.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/scan.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/server.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/space.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/scan/utils.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/__main__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/backend/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/backend/redis.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/base_dataset.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/chunk.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/dataset.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/file.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/base.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/config.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/file.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/ipy.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/models.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/record.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/report.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/models/tag.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/storage/storage.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/chat.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/device/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/device/basedevice.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/device/loader.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/device/utils.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/drivers/FakeInstrument.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/drivers/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/ipy_events.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/bencoder.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/cli.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/dhcp.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/dhcpd.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/kad.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/kcp.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/net/nginx.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/progress.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/client.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/exceptions.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/msgpack.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/msgpack.pyi +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/router.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/rpc.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/serialize.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/server.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/socket.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/utils.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/worker.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/sys/rpc/zmq_socket.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/tools/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/tools/connection_helper.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/typing.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/utils.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/__init__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/__main__.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/_autoplot.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/plot_circ.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/plot_layout.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/plot_seq.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/qdat.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/rot3d.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/qulab/visualization/widgets.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/setup.cfg +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/setup.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/src/qulab.h +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/tests/test_kad.py +0 -0
- {qulab-2.9.9 → qulab-2.9.10}/tests/test_scan.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
|
-
import
|
1
|
+
import atexit
|
2
2
|
import inspect
|
3
3
|
import pickle
|
4
|
-
import
|
4
|
+
import tempfile
|
5
5
|
import warnings
|
6
6
|
from importlib.util import module_from_spec, spec_from_file_location
|
7
7
|
from pathlib import Path
|
@@ -333,17 +333,18 @@ def load_workflow_from_file(file_name: str,
|
|
333
333
|
def load_workflow_from_source_code(workflow_id: str,
|
334
334
|
source_code: str,
|
335
335
|
package='workflows') -> WorkflowType:
|
336
|
-
|
337
|
-
module_name = f"{package}.{'.'.join([*
|
336
|
+
workflow_path = Path(workflow_id)
|
337
|
+
module_name = f"{package}.{'.'.join([*workflow_path.parts[:-1], workflow_path.stem])}"
|
338
|
+
|
339
|
+
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix='.py').name
|
340
|
+
with open(temp_file, 'w') as f:
|
341
|
+
f.write(source_code)
|
342
|
+
|
343
|
+
atexit.register(lambda f=temp_file: Path(f).unlink(missing_ok=True))
|
338
344
|
|
339
|
-
|
340
|
-
module =
|
341
|
-
|
342
|
-
sys.modules[module_name] = module
|
343
|
-
# 将源代码编译成字节码
|
344
|
-
code = compile(source_code, '<string>', 'exec')
|
345
|
-
# 在模块的命名空间中执行字节码
|
346
|
-
exec(code, module.__dict__)
|
345
|
+
spec = spec_from_file_location(module_name, temp_file)
|
346
|
+
module = module_from_spec(spec)
|
347
|
+
spec.loader.exec_module(module)
|
347
348
|
|
348
349
|
module.__source__ = source_code
|
349
350
|
module.__mtime__ = 0
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "2.9.10"
|
qulab-2.9.9/qulab/version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "2.9.9"
|
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
|
File without changes
|