QuLab 2.11.3__py3-none-any.whl → 2.11.4__py3-none-any.whl

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/cli/commands.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import click
2
2
 
3
- from ..executor.cli import (boot, create, export, get, load, maintain,
3
+ from ..executor.cli import (boot, create, export, get, load, maintain, delete,
4
4
  reproduce, run, set)
5
5
  from ..monitor.__main__ import main as monitor
6
6
  from ..scan.server import server
@@ -35,6 +35,7 @@ cli.add_command(reproduce)
35
35
  cli.add_command(create)
36
36
  reg.add_command(set)
37
37
  reg.add_command(get)
38
+ reg.add_command(delete)
38
39
  reg.add_command(load)
39
40
  reg.add_command(export)
40
41
  cli.add_command(boot)
qulab/executor/cli.py CHANGED
@@ -134,7 +134,7 @@ def set(key, value, api):
134
134
  """
135
135
  Set a config.
136
136
  """
137
- logger.info(f'[CMD]: set {key} {value} --api {api}')
137
+ logger.info(f'[CMD]: reg set {key} {value} --api {api}')
138
138
  reg = Registry()
139
139
  if api is not None:
140
140
  api = importlib.import_module(api)
@@ -158,7 +158,7 @@ def get(key, api):
158
158
  """
159
159
  Get a config.
160
160
  """
161
- logger.info(f'[CMD]: get {key} --api {api}')
161
+ logger.info(f'[CMD]: reg get {key} --api {api}')
162
162
  reg = Registry()
163
163
  if api is not None:
164
164
  api = importlib.import_module(api)
@@ -167,6 +167,26 @@ def get(key, api):
167
167
  rich.print(reg.get(key))
168
168
 
169
169
 
170
+ @click.command()
171
+ @click.argument('key')
172
+ @click.option('--api',
173
+ '-a',
174
+ default=lambda: get_config_value("api", str, 'get'),
175
+ help='The modlule name of the api.')
176
+ @log_options('delete')
177
+ def delete(key, api):
178
+ """
179
+ Delete a config key.
180
+ """
181
+ logger.info(f'[CMD]: reg delete {key} --api {api}')
182
+ reg = Registry()
183
+ if api is not None:
184
+ api = importlib.import_module(api)
185
+ set_config_api(api.query_config, api.update_config, api.delete_config,
186
+ api.export_config, api.clear_config)
187
+ reg.delete(key)
188
+
189
+
170
190
  @click.command()
171
191
  @click.argument('file')
172
192
  @click.option('--api',
@@ -182,7 +202,7 @@ def export(file, api, format):
182
202
  """
183
203
  Export a config.
184
204
  """
185
- logger.info(f'[CMD]: export {file} --api {api}')
205
+ logger.info(f'[CMD]: reg export {file} --api {api}')
186
206
  reg = Registry()
187
207
  if api is not None:
188
208
  api = importlib.import_module(api)
@@ -220,7 +240,7 @@ def load(file, api, format):
220
240
  """
221
241
  Load a config.
222
242
  """
223
- logger.info(f'[CMD]: load {file} --api {api}')
243
+ logger.info(f'[CMD]: reg load {file} --api {api}')
224
244
  reg = Registry()
225
245
  if api is not None:
226
246
  api = importlib.import_module(api)
qulab/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.11.3"
1
+ __version__ = "2.11.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QuLab
3
- Version: 2.11.3
3
+ Version: 2.11.4
4
4
  Summary: contral instruments and manage data
5
5
  Author-email: feihoo87 <feihoo87@gmail.com>
6
6
  Maintainer-email: feihoo87 <feihoo87@gmail.com>
@@ -2,14 +2,14 @@ qulab/__init__.py,sha256=hmf6R3jiM5NtJY1mSptogYnH5DMTR2dTzlXykqLxQzg,2027
2
2
  qulab/__main__.py,sha256=fjaRSL_uUjNIzBGNgjlGswb9TJ2VD5qnkZHW3hItrD4,68
3
3
  qulab/typing.py,sha256=vg62sGqxuD9CI5677ejlzAmf2fVdAESZCQjAE_xSxPg,69
4
4
  qulab/utils.py,sha256=w5oSw9Ypux6l0oB-MzlQvT40iX_rzQ5wXcwzr7CIVf8,4107
5
- qulab/version.py,sha256=TBqc-ot-JVCYjkMyPJlutWympLhMMuKgQ12zpTcCJvw,22
5
+ qulab/version.py,sha256=R23vM4RbEfPLzmIiHDPzMMGKJcHvi00MAAor3IxzcCA,22
6
6
  qulab/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- qulab/cli/commands.py,sha256=Ezop5CEOvvEMDaPmfGXF0JH-CifKuDMk9yLglpUK9Zs,781
7
+ qulab/cli/commands.py,sha256=ywKmwbGNBCVASx8OsgrRttaLz9ogwY38ZdKj7I-tdJ4,813
8
8
  qulab/cli/config.py,sha256=tZPSBLbf2x_Brb2UBuA1bsni8nC8WOPPGyWIi8m7j1I,5459
9
9
  qulab/cli/decorators.py,sha256=oImteZVnDPPWdyhJ4kzf2KYGJLON7VsKGBvZadWLQZo,621
10
10
  qulab/executor/__init__.py,sha256=LosPzOMaljSZY1thy_Fxtbrgq7uubJszMABEB7oM7tU,101
11
11
  qulab/executor/analyze.py,sha256=4Hau5LrKUdpweh7W94tcG4ahgxucHOevbM0hm57T7zE,5649
12
- qulab/executor/cli.py,sha256=gBh0Qlb-2zNI_NWFZXUirQLWizSOCe4AMDsVm05nPqU,17848
12
+ qulab/executor/cli.py,sha256=SDZAuEJmRRt874N2paI78xuBk88twTfk-aynutCHNAk,18476
13
13
  qulab/executor/load.py,sha256=eMlzOrrn8GpbP3J3uY5JJ8iO7tL5B1DWP1z2qiGyNhU,20385
14
14
  qulab/executor/registry.py,sha256=gym9F5FIDY5eV-cSCZsP99wC4l-6jkx9VMjJMaPOLaQ,4730
15
15
  qulab/executor/schedule.py,sha256=7gAJFwj13j1niGjVa1fSzwOS22eNFEN1hdrN3dfTY6A,21410
@@ -96,9 +96,9 @@ qulab/visualization/plot_seq.py,sha256=UWTS6p9nfX_7B8ehcYo6UnSTUCjkBsNU9jiOeW2ca
96
96
  qulab/visualization/qdat.py,sha256=ZeevBYWkzbww4xZnsjHhw7wRorJCBzbG0iEu-XQB4EA,5735
97
97
  qulab/visualization/rot3d.py,sha256=lMrEJlRLwYe6NMBlGkKYpp_V9CTipOAuDy6QW_cQK00,734
98
98
  qulab/visualization/widgets.py,sha256=6KkiTyQ8J-ei70LbPQZAK35wjktY47w2IveOa682ftA,3180
99
- qulab-2.11.3.dist-info/licenses/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
100
- qulab-2.11.3.dist-info/METADATA,sha256=a4CvL-wBrnNJwrewATY748vOK5fZKie1LLfLWoVMwRw,3896
101
- qulab-2.11.3.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
102
- qulab-2.11.3.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
103
- qulab-2.11.3.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
104
- qulab-2.11.3.dist-info/RECORD,,
99
+ qulab-2.11.4.dist-info/licenses/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
100
+ qulab-2.11.4.dist-info/METADATA,sha256=qkJE05G3P9IwYbwoet89FssRyf_WtmEE8MJejsmKvOc,3896
101
+ qulab-2.11.4.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
102
+ qulab-2.11.4.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
103
+ qulab-2.11.4.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
104
+ qulab-2.11.4.dist-info/RECORD,,
File without changes