QuLab 2.10.5__tar.gz → 2.10.6__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.10.5 → qulab-2.10.6}/PKG-INFO +1 -1
- {qulab-2.10.5 → qulab-2.10.6}/QuLab.egg-info/PKG-INFO +1 -1
- {qulab-2.10.5 → qulab-2.10.6}/QuLab.egg-info/SOURCES.txt +1 -1
- {qulab-2.10.5 → qulab-2.10.6}/qulab/dicttree.py +19 -7
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/load.py +7 -7
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/registry.py +11 -7
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/__init__.py +0 -1
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/scan.py +3 -2
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/utils.py +1 -1
- qulab-2.10.6/qulab/version.py +1 -0
- {qulab-2.10.5 → qulab-2.10.6}/tests/test_expression.py +1 -1
- qulab-2.10.5/qulab/version.py +0 -1
- {qulab-2.10.5 → qulab-2.10.6}/LICENSE +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/MANIFEST.in +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/QuLab.egg-info/dependency_links.txt +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/QuLab.egg-info/entry_points.txt +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/QuLab.egg-info/requires.txt +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/QuLab.egg-info/top_level.txt +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/README.md +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/pyproject.toml +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/__main__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/cli/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/cli/commands.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/cli/config.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/cli/decorators.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/analyze.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/cli.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/schedule.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/storage.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/template.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/executor/utils.py +0 -0
- {qulab-2.10.5/qulab/scan → qulab-2.10.6/qulab}/expression.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/__main__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/config.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/dataset.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/event_queue.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/mainwindow.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/monitor.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/ploter.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/qt_compat.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/monitor/toolbar.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/curd.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/models.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/optimize.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/query.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/record.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/server.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/scan/space.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/__main__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/backend/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/backend/redis.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/base_dataset.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/chunk.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/dataset.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/file.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/base.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/config.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/file.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/ipy.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/models.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/record.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/report.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/models/tag.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/storage/storage.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/chat.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/device/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/device/basedevice.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/device/loader.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/device/utils.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/drivers/FakeInstrument.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/drivers/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/ipy_events.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/bencoder.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/cli.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/dhcp.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/dhcpd.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/kad.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/kcp.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/net/nginx.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/progress.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/client.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/exceptions.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/msgpack.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/msgpack.pyi +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/router.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/rpc.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/serialize.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/server.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/socket.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/utils.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/worker.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/sys/rpc/zmq_socket.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/tools/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/tools/connection_helper.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/typing.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/utils.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/__init__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/__main__.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/_autoplot.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/plot_circ.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/plot_layout.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/plot_seq.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/qdat.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/rot3d.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/qulab/visualization/widgets.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/setup.cfg +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/setup.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/src/qulab.h +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/tests/test_kad.py +0 -0
- {qulab-2.10.5 → qulab-2.10.6}/tests/test_scan.py +0 -0
@@ -12,6 +12,7 @@ QuLab.egg-info/top_level.txt
|
|
12
12
|
qulab/__init__.py
|
13
13
|
qulab/__main__.py
|
14
14
|
qulab/dicttree.py
|
15
|
+
qulab/expression.py
|
15
16
|
qulab/typing.py
|
16
17
|
qulab/utils.py
|
17
18
|
qulab/version.py
|
@@ -40,7 +41,6 @@ qulab/monitor/qt_compat.py
|
|
40
41
|
qulab/monitor/toolbar.py
|
41
42
|
qulab/scan/__init__.py
|
42
43
|
qulab/scan/curd.py
|
43
|
-
qulab/scan/expression.py
|
44
44
|
qulab/scan/models.py
|
45
45
|
qulab/scan/optimize.py
|
46
46
|
qulab/scan/query.py
|
@@ -297,8 +297,8 @@ def update_tree(result, updates):
|
|
297
297
|
return result
|
298
298
|
|
299
299
|
|
300
|
-
def queryref_tree(q, keys, dct, prefix=[], chain=None):
|
301
|
-
q = q
|
300
|
+
def queryref_tree(q: str, keys, dct, prefix=[], chain=None):
|
301
|
+
q = q.removeprefix('$')
|
302
302
|
if q.startswith('.'):
|
303
303
|
while q.startswith('.'):
|
304
304
|
keys.pop()
|
@@ -340,7 +340,7 @@ class Env():
|
|
340
340
|
self.prefix = prefix
|
341
341
|
|
342
342
|
def get(self, name):
|
343
|
-
return queryref_tree(name
|
343
|
+
return queryref_tree(name,
|
344
344
|
self.keys,
|
345
345
|
self.dct,
|
346
346
|
prefix=self.prefix,
|
@@ -405,8 +405,9 @@ internal_functions = {
|
|
405
405
|
|
406
406
|
|
407
407
|
def eval_expr(expression, env=None, functions=None):
|
408
|
-
from pyparsing import (Forward, Literal,
|
409
|
-
|
408
|
+
from pyparsing import (Combine, Forward, Literal, MatchFirst, ParseResults,
|
409
|
+
Regex, Suppress, Word, ZeroOrMore, alphanums,
|
410
|
+
alphas, delimitedList, infixNotation, oneOf,
|
410
411
|
opAssoc, pyparsing_common)
|
411
412
|
if functions is None:
|
412
413
|
functions = internal_functions
|
@@ -436,8 +437,19 @@ def eval_expr(expression, env=None, functions=None):
|
|
436
437
|
'e': math.e
|
437
438
|
}.get(t[0]))
|
438
439
|
|
439
|
-
|
440
|
-
|
440
|
+
identifier = Word(alphas + '_', alphanums + '_')
|
441
|
+
dollar = Literal('$')
|
442
|
+
dot_sequence = Regex(r'\.{1,}')
|
443
|
+
attr = Combine(Literal('.') + identifier)
|
444
|
+
attr_chain = ZeroOrMore(attr)
|
445
|
+
dollar_named_chain = Combine(dollar + identifier + attr_chain)
|
446
|
+
dollar_dotN_chain = Combine(dollar + dot_sequence + identifier +
|
447
|
+
attr_chain)
|
448
|
+
dollar_simple = Combine(dollar + identifier)
|
449
|
+
|
450
|
+
variable = MatchFirst(
|
451
|
+
[dollar_dotN_chain, dollar_named_chain,
|
452
|
+
dollar_simple]).setParseAction(lambda s, l, t: lookup(t[0]))
|
441
453
|
|
442
454
|
bracket = Suppress('(') + expr + Suppress(')')
|
443
455
|
bracket.setParseAction(lambda s, l, t: t[0])
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import atexit
|
2
2
|
import inspect
|
3
|
-
import pickle
|
4
3
|
import os
|
5
|
-
import
|
4
|
+
import pickle
|
6
5
|
import shutil
|
7
6
|
import tempfile
|
7
|
+
import time
|
8
8
|
import warnings
|
9
9
|
from importlib.util import module_from_spec, spec_from_file_location
|
10
10
|
from pathlib import Path
|
@@ -13,6 +13,7 @@ from typing import Any
|
|
13
13
|
|
14
14
|
from loguru import logger
|
15
15
|
|
16
|
+
from .registry import Registry
|
16
17
|
from .storage import Report
|
17
18
|
from .template import (TemplateKeyError, TemplateTypeError, decode_mapping,
|
18
19
|
inject_mapping)
|
@@ -31,17 +32,16 @@ class SetConfigWorkflow():
|
|
31
32
|
return []
|
32
33
|
|
33
34
|
def check_state(self, history: Report) -> bool:
|
34
|
-
|
35
|
+
reg = Registry()
|
35
36
|
try:
|
36
|
-
return self._equal(history.parameters[self.key],
|
37
|
-
transform.query_config(self.key))
|
37
|
+
return self._equal(history.parameters[self.key], reg.get(self.key))
|
38
38
|
except:
|
39
39
|
return False
|
40
40
|
|
41
41
|
def calibrate(self):
|
42
|
-
|
42
|
+
reg = Registry()
|
43
43
|
try:
|
44
|
-
value =
|
44
|
+
value = reg.get(self.key)
|
45
45
|
except:
|
46
46
|
value = eval(input(f'"{self.key}": '))
|
47
47
|
return value
|
@@ -129,7 +129,7 @@ def set_config_api(query_method,
|
|
129
129
|
clear_method: The clear method.
|
130
130
|
the method should clear the config.
|
131
131
|
"""
|
132
|
-
global query_config, update_config, delete_config, export_config, clear_config
|
132
|
+
global query_config, update_config, delete_config, export_config, clear_config, _api
|
133
133
|
|
134
134
|
query_config = query_method
|
135
135
|
update_config = update_method
|
@@ -159,23 +159,27 @@ _init()
|
|
159
159
|
|
160
160
|
class Registry():
|
161
161
|
|
162
|
+
def __init__(self):
|
163
|
+
self.api = (query_config, update_config, delete_config, export_config,
|
164
|
+
clear_config)
|
165
|
+
|
162
166
|
def query(self, key: str) -> Any:
|
163
|
-
return
|
167
|
+
return self.api[0](key)
|
164
168
|
|
165
169
|
def get(self, key: str) -> Any:
|
166
170
|
return self.query(key)
|
167
171
|
|
168
172
|
def export(self) -> dict[str, dict[str, Any]]:
|
169
|
-
return
|
173
|
+
return self.api[3]()
|
170
174
|
|
171
175
|
def set(self, key: str, value: Any):
|
172
|
-
return
|
176
|
+
return self.api[1]({key: value})
|
173
177
|
|
174
178
|
def delete(self, key: str):
|
175
|
-
return
|
179
|
+
return self.api[2](key)
|
176
180
|
|
177
181
|
def clear(self):
|
178
|
-
return
|
182
|
+
return self.api[4]()
|
179
183
|
|
180
184
|
def update(self, parameters: dict[str, Any]):
|
181
|
-
return
|
185
|
+
return self.api[1](parameters)
|
@@ -18,8 +18,8 @@ import dill
|
|
18
18
|
import numpy as np
|
19
19
|
import zmq
|
20
20
|
|
21
|
+
from ..expression import Env, Expression, Symbol
|
21
22
|
from ..sys.rpc.zmq_socket import ZMQContextManager
|
22
|
-
from .expression import Env, Expression, Symbol
|
23
23
|
from .optimize import NgOptimizer
|
24
24
|
from .record import Record
|
25
25
|
from .server import default_record_port
|
@@ -509,7 +509,8 @@ class Scan():
|
|
509
509
|
|
510
510
|
if self.config:
|
511
511
|
self.description['config'] = await create_config(
|
512
|
-
self._raw_config_copy, self.description['database'],
|
512
|
+
self._raw_config_copy, self.description['database'],
|
513
|
+
self._sock)
|
513
514
|
if current_notebook() is None:
|
514
515
|
await create_notebook('untitle', self.description['database'],
|
515
516
|
self._sock)
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "2.10.6"
|
qulab-2.10.5/qulab/version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "2.10.5"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|