QuLab 2.11.0__tar.gz → 2.11.2__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.0 → qulab-2.11.2}/PKG-INFO +2 -1
- {qulab-2.11.0 → qulab-2.11.2}/QuLab.egg-info/PKG-INFO +2 -1
- {qulab-2.11.0 → qulab-2.11.2}/QuLab.egg-info/requires.txt +1 -0
- {qulab-2.11.0 → qulab-2.11.2}/pyproject.toml +2 -1
- {qulab-2.11.0 → qulab-2.11.2}/qulab/cli/commands.py +12 -3
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/cli.py +79 -1
- qulab-2.11.2/qulab/version.py +1 -0
- qulab-2.11.0/qulab/version.py +0 -1
- {qulab-2.11.0 → qulab-2.11.2}/LICENSE +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/MANIFEST.in +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/QuLab.egg-info/SOURCES.txt +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/QuLab.egg-info/dependency_links.txt +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/QuLab.egg-info/entry_points.txt +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/QuLab.egg-info/top_level.txt +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/README.md +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/__main__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/cli/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/cli/config.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/cli/decorators.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/analyze.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/load.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/registry.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/schedule.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/storage.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/template.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/executor/utils.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/__main__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/config.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/dataset.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/event_queue.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/mainwindow.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/monitor.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/ploter.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/qt_compat.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/monitor/toolbar.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/curd.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/models.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/optimize.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/query.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/record.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/scan.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/server.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/space.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/scan/utils.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/__main__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/backend/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/backend/redis.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/base_dataset.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/chunk.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/dataset.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/file.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/base.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/config.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/file.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/ipy.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/models.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/record.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/report.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/models/tag.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/storage/storage.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/chat.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/device/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/device/basedevice.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/device/loader.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/device/utils.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/drivers/FakeInstrument.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/drivers/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/ipy_events.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/bencoder.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/cli.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/dhcp.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/dhcpd.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/kad.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/kcp.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/net/nginx.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/progress.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/client.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/exceptions.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/msgpack.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/msgpack.pyi +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/router.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/rpc.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/serialize.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/server.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/socket.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/utils.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/worker.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/sys/rpc/zmq_socket.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/tools/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/tools/connection_helper.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/typing.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/utils.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/__init__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/__main__.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/_autoplot.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/plot_circ.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/plot_layout.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/plot_seq.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/qdat.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/rot3d.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/qulab/visualization/widgets.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/setup.cfg +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/setup.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/src/qulab.h +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/tests/test_kad.py +0 -0
- {qulab-2.11.0 → qulab-2.11.2}/tests/test_scan.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: QuLab
|
3
|
-
Version: 2.11.
|
3
|
+
Version: 2.11.2
|
4
4
|
Summary: contral instruments and manage data
|
5
5
|
Author-email: feihoo87 <feihoo87@gmail.com>
|
6
6
|
Maintainer-email: feihoo87 <feihoo87@gmail.com>
|
@@ -47,6 +47,7 @@ Requires-Dist: SQLAlchemy>=2.0.19
|
|
47
47
|
Requires-Dist: watchdog>=4.0.0
|
48
48
|
Requires-Dist: wath>=1.1.6
|
49
49
|
Requires-Dist: waveforms>=1.9.4
|
50
|
+
Requires-Dist: rich>=14.0.0
|
50
51
|
Provides-Extra: full
|
51
52
|
Requires-Dist: uvloop>=0.19.0; extra == "full"
|
52
53
|
Dynamic: license-file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: QuLab
|
3
|
-
Version: 2.11.
|
3
|
+
Version: 2.11.2
|
4
4
|
Summary: contral instruments and manage data
|
5
5
|
Author-email: feihoo87 <feihoo87@gmail.com>
|
6
6
|
Maintainer-email: feihoo87 <feihoo87@gmail.com>
|
@@ -47,6 +47,7 @@ Requires-Dist: SQLAlchemy>=2.0.19
|
|
47
47
|
Requires-Dist: watchdog>=4.0.0
|
48
48
|
Requires-Dist: wath>=1.1.6
|
49
49
|
Requires-Dist: waveforms>=1.9.4
|
50
|
+
Requires-Dist: rich>=14.0.0
|
50
51
|
Provides-Extra: full
|
51
52
|
Requires-Dist: uvloop>=0.19.0; extra == "full"
|
52
53
|
Dynamic: license-file
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import click
|
2
2
|
|
3
|
-
from ..executor.cli import boot, create,
|
3
|
+
from ..executor.cli import (boot, create, export, get, load, maintain,
|
4
|
+
reproduce, run, set)
|
4
5
|
from ..monitor.__main__ import main as monitor
|
5
6
|
from ..scan.server import server
|
6
7
|
from ..sys.net.cli import dht
|
@@ -18,6 +19,12 @@ def hello():
|
|
18
19
|
click.echo('hello, world')
|
19
20
|
|
20
21
|
|
22
|
+
@cli.group()
|
23
|
+
def reg():
|
24
|
+
"""Regestry operations."""
|
25
|
+
pass
|
26
|
+
|
27
|
+
|
21
28
|
cli.add_command(monitor)
|
22
29
|
cli.add_command(plot)
|
23
30
|
cli.add_command(dht)
|
@@ -26,6 +33,8 @@ cli.add_command(maintain)
|
|
26
33
|
cli.add_command(run)
|
27
34
|
cli.add_command(reproduce)
|
28
35
|
cli.add_command(create)
|
29
|
-
|
30
|
-
|
36
|
+
reg.add_command(set)
|
37
|
+
reg.add_command(get)
|
38
|
+
reg.add_command(load)
|
39
|
+
reg.add_command(export)
|
31
40
|
cli.add_command(boot)
|
@@ -6,6 +6,7 @@ import sys
|
|
6
6
|
from pathlib import Path
|
7
7
|
|
8
8
|
import click
|
9
|
+
import rich
|
9
10
|
from loguru import logger
|
10
11
|
|
11
12
|
from ..cli.config import get_config_value, log_options
|
@@ -160,7 +161,84 @@ def get(key, api):
|
|
160
161
|
api = importlib.import_module(api)
|
161
162
|
set_config_api(api.query_config, api.update_config, api.delete_config,
|
162
163
|
api.export_config, api.clear_config)
|
163
|
-
|
164
|
+
rich.print(reg.get(key))
|
165
|
+
|
166
|
+
|
167
|
+
@click.command()
|
168
|
+
@click.argument('file')
|
169
|
+
@click.option('--api',
|
170
|
+
'-a',
|
171
|
+
default=lambda: get_config_value("api", str, 'get'),
|
172
|
+
help='The modlule name of the api.')
|
173
|
+
@click.option('--format',
|
174
|
+
'-f',
|
175
|
+
default='json',
|
176
|
+
help='The format of the config.')
|
177
|
+
@log_options('export')
|
178
|
+
def export(file, api, format):
|
179
|
+
"""
|
180
|
+
Export a config.
|
181
|
+
"""
|
182
|
+
logger.info(f'[CMD]: export {file} --api {api}')
|
183
|
+
reg = Registry()
|
184
|
+
if api is not None:
|
185
|
+
api = importlib.import_module(api)
|
186
|
+
set_config_api(api.query_config, api.update_config, api.delete_config,
|
187
|
+
api.export_config, api.clear_config)
|
188
|
+
cfg = reg.export()
|
189
|
+
if format == 'json':
|
190
|
+
import json
|
191
|
+
with open(file, 'w') as f:
|
192
|
+
json.dump(cfg, f, indent=4)
|
193
|
+
elif format == 'yaml':
|
194
|
+
import yaml
|
195
|
+
with open(file, 'w') as f:
|
196
|
+
yaml.dump(cfg, f)
|
197
|
+
elif format == 'pickle':
|
198
|
+
import pickle
|
199
|
+
with open(file, 'wb') as f:
|
200
|
+
pickle.dump(cfg, f)
|
201
|
+
else:
|
202
|
+
raise ValueError(f'Unknown format: {format}')
|
203
|
+
|
204
|
+
|
205
|
+
@click.command()
|
206
|
+
@click.argument('file')
|
207
|
+
@click.option('--api',
|
208
|
+
'-a',
|
209
|
+
default=lambda: get_config_value("api", str, 'get'),
|
210
|
+
help='The modlule name of the api.')
|
211
|
+
@click.option('--format',
|
212
|
+
'-f',
|
213
|
+
default='json',
|
214
|
+
help='The format of the config.')
|
215
|
+
@log_options('load')
|
216
|
+
def load(file, api, format):
|
217
|
+
"""
|
218
|
+
Load a config.
|
219
|
+
"""
|
220
|
+
logger.info(f'[CMD]: load {file} --api {api}')
|
221
|
+
reg = Registry()
|
222
|
+
if api is not None:
|
223
|
+
api = importlib.import_module(api)
|
224
|
+
set_config_api(api.query_config, api.update_config, api.delete_config,
|
225
|
+
api.export_config, api.clear_config)
|
226
|
+
if format == 'json':
|
227
|
+
import json
|
228
|
+
with open(file, 'r') as f:
|
229
|
+
cfg = json.load(f)
|
230
|
+
elif format == 'yaml':
|
231
|
+
import yaml
|
232
|
+
with open(file, 'r') as f:
|
233
|
+
cfg = yaml.load(f, Loader=yaml.FullLoader)
|
234
|
+
elif format == 'pickle':
|
235
|
+
import pickle
|
236
|
+
with open(file, 'rb') as f:
|
237
|
+
cfg = pickle.load(f)
|
238
|
+
else:
|
239
|
+
raise ValueError(f'Unknown format: {format}')
|
240
|
+
reg.clear()
|
241
|
+
reg.update(cfg)
|
164
242
|
|
165
243
|
|
166
244
|
@click.command()
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "2.11.2"
|
qulab-2.11.0/qulab/version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "2.11.0"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|