QuLab 2.12.1__tar.gz → 2.12.3__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.12.1 → qulab-2.12.3}/PKG-INFO +3 -1
- {qulab-2.12.1 → qulab-2.12.3}/QuLab.egg-info/PKG-INFO +3 -1
- {qulab-2.12.1 → qulab-2.12.3}/QuLab.egg-info/SOURCES.txt +1 -0
- {qulab-2.12.1 → qulab-2.12.3}/QuLab.egg-info/requires.txt +2 -0
- {qulab-2.12.1 → qulab-2.12.3}/pyproject.toml +2 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/cli/config.py +3 -2
- qulab-2.12.3/qulab/tools/xlsx.py +81 -0
- qulab-2.12.3/qulab/version.py +1 -0
- qulab-2.12.1/qulab/version.py +0 -1
- {qulab-2.12.1 → qulab-2.12.3}/LICENSE +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/MANIFEST.in +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/QuLab.egg-info/dependency_links.txt +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/QuLab.egg-info/entry_points.txt +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/QuLab.egg-info/top_level.txt +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/README.md +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/__main__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/cli/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/cli/commands.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/cli/decorators.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/analyze.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/cli.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/load.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/registry.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/schedule.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/storage.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/template.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/executor/utils.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/__main__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/config.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/dataset.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/event_queue.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/mainwindow.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/monitor.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/ploter.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/qt_compat.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/monitor/toolbar.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/curd.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/models.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/optimize.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/query.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/record.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/scan.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/server.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/space.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/scan/utils.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/__main__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/backend/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/backend/redis.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/base_dataset.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/chunk.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/dataset.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/file.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/base.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/config.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/file.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/ipy.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/models.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/record.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/report.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/models/tag.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/storage/storage.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/chat.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/device/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/device/basedevice.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/device/loader.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/device/utils.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/drivers/FakeInstrument.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/drivers/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/ipy_events.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/bencoder.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/cli.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/dhcp.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/dhcpd.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/kad.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/kcp.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/net/nginx.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/progress.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/client.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/exceptions.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/msgpack.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/msgpack.pyi +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/router.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/rpc.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/serialize.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/server.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/socket.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/utils.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/worker.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/sys/rpc/zmq_socket.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/tools/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/tools/connection_helper.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/typing.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/utils.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/__init__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/__main__.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/_autoplot.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/plot_circ.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/plot_layout.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/plot_seq.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/qdat.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/rot3d.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/qulab/visualization/widgets.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/setup.cfg +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/setup.py +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/src/qulab.h +0 -0
- {qulab-2.12.1 → qulab-2.12.3}/tests/test_scan.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: QuLab
|
|
3
|
-
Version: 2.12.
|
|
3
|
+
Version: 2.12.3
|
|
4
4
|
Summary: contral instruments and manage data
|
|
5
5
|
Author-email: feihoo87 <feihoo87@gmail.com>
|
|
6
6
|
Maintainer-email: feihoo87 <feihoo87@gmail.com>
|
|
@@ -48,6 +48,8 @@ Requires-Dist: watchdog>=4.0.0
|
|
|
48
48
|
Requires-Dist: wath>=1.1.6
|
|
49
49
|
Requires-Dist: waveforms>=1.9.4
|
|
50
50
|
Requires-Dist: rich>=14.0.0
|
|
51
|
+
Requires-Dist: pydantic>=2.12.5
|
|
52
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
51
53
|
Provides-Extra: full
|
|
52
54
|
Requires-Dist: paramiko>=3.5.1; extra == "full"
|
|
53
55
|
Requires-Dist: uvloop>=0.19.0; extra == "full"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: QuLab
|
|
3
|
-
Version: 2.12.
|
|
3
|
+
Version: 2.12.3
|
|
4
4
|
Summary: contral instruments and manage data
|
|
5
5
|
Author-email: feihoo87 <feihoo87@gmail.com>
|
|
6
6
|
Maintainer-email: feihoo87 <feihoo87@gmail.com>
|
|
@@ -48,6 +48,8 @@ Requires-Dist: watchdog>=4.0.0
|
|
|
48
48
|
Requires-Dist: wath>=1.1.6
|
|
49
49
|
Requires-Dist: waveforms>=1.9.4
|
|
50
50
|
Requires-Dist: rich>=14.0.0
|
|
51
|
+
Requires-Dist: pydantic>=2.12.5
|
|
52
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
51
53
|
Provides-Extra: full
|
|
52
54
|
Requires-Dist: paramiko>=3.5.1; extra == "full"
|
|
53
55
|
Requires-Dist: uvloop>=0.19.0; extra == "full"
|
|
@@ -17,7 +17,7 @@ def find_config_file() -> Path | None:
|
|
|
17
17
|
查找配置文件
|
|
18
18
|
"""
|
|
19
19
|
# 环境变量
|
|
20
|
-
if config_path := os.getenv("
|
|
20
|
+
if config_path := os.getenv(f"{ENV_PREFIX}CONFIG_PATH"):
|
|
21
21
|
return Path(config_path)
|
|
22
22
|
|
|
23
23
|
# 先查找当前目录下的配置文件
|
|
@@ -29,7 +29,8 @@ def find_config_file() -> Path | None:
|
|
|
29
29
|
current_dir = Path.cwd()
|
|
30
30
|
while not (current_dir / "uv.lock").exists():
|
|
31
31
|
current_dir = current_dir.parent
|
|
32
|
-
|
|
32
|
+
# 到达文件系统根目录,停止
|
|
33
|
+
if current_dir == current_dir.parent:
|
|
33
34
|
break
|
|
34
35
|
config_path = current_dir / "qulab.ini"
|
|
35
36
|
if config_path.exists():
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from openpyxl import load_workbook
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def read_excel_to_dict(path: str) -> dict[str, list[dict[str, str]]]:
|
|
5
|
+
wb = load_workbook(path, read_only=True, data_only=True)
|
|
6
|
+
result = {}
|
|
7
|
+
|
|
8
|
+
for ws in wb.worksheets:
|
|
9
|
+
sheet_data = []
|
|
10
|
+
|
|
11
|
+
rows = list(ws.iter_rows(values_only=True))
|
|
12
|
+
|
|
13
|
+
if not rows:
|
|
14
|
+
result[ws.title] = []
|
|
15
|
+
continue
|
|
16
|
+
|
|
17
|
+
header_row = rows[0]
|
|
18
|
+
|
|
19
|
+
# 过滤掉空列名
|
|
20
|
+
valid_indices = [
|
|
21
|
+
idx for idx, col in enumerate(header_row)
|
|
22
|
+
if col is not None and str(col).strip() != ""
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
headers = [str(header_row[i]).strip() for i in valid_indices]
|
|
26
|
+
|
|
27
|
+
# 读取数据行
|
|
28
|
+
for row in rows[1:]:
|
|
29
|
+
row_dict = {}
|
|
30
|
+
for col_idx, header in zip(valid_indices, headers):
|
|
31
|
+
value = row[col_idx] if col_idx < len(row) else None
|
|
32
|
+
row_dict[header] = "" if value is None else str(value)
|
|
33
|
+
sheet_data.append(row_dict)
|
|
34
|
+
|
|
35
|
+
result[ws.title] = sheet_data
|
|
36
|
+
|
|
37
|
+
wb.close()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def update_cells(path: str, sheet_name: str, updates: dict[str, str]):
|
|
42
|
+
"""
|
|
43
|
+
updates 示例:
|
|
44
|
+
{
|
|
45
|
+
"A2": "新内容",
|
|
46
|
+
"C5": "修改值",
|
|
47
|
+
}
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
wb = load_workbook(path, keep_vba=True)
|
|
51
|
+
ws = wb[sheet_name]
|
|
52
|
+
|
|
53
|
+
for cell_addr, new_value in updates.items():
|
|
54
|
+
ws[cell_addr].value = new_value # 只改 value
|
|
55
|
+
|
|
56
|
+
wb.save(path)
|
|
57
|
+
wb.close()
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def update_by_key(path, sheet_name, key_col, key_value, target_col, new_value):
|
|
61
|
+
"""
|
|
62
|
+
找到 key_col 的值为 key_value 的行,将该行 target_col 的值改为 new_value
|
|
63
|
+
key_col 和 target_col 都是列名
|
|
64
|
+
"""
|
|
65
|
+
wb = load_workbook(path, keep_vba=True)
|
|
66
|
+
ws = wb[sheet_name]
|
|
67
|
+
|
|
68
|
+
# 找列号
|
|
69
|
+
header = [cell.value for cell in ws[1]]
|
|
70
|
+
|
|
71
|
+
key_idx = header.index(key_col) + 1
|
|
72
|
+
target_idx = header.index(target_col) + 1
|
|
73
|
+
|
|
74
|
+
for row in ws.iter_rows(min_row=2):
|
|
75
|
+
# 找到对应的行
|
|
76
|
+
if row[key_idx - 1].value == key_value:
|
|
77
|
+
ws.cell(row=row[0].row, column=target_idx).value = new_value
|
|
78
|
+
break
|
|
79
|
+
|
|
80
|
+
wb.save(path)
|
|
81
|
+
wb.close()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.12.3"
|
qulab-2.12.1/qulab/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.12.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|