QuLab 2.4.12__cp310-cp310-macosx_10_9_universal2.whl → 2.4.13__cp310-cp310-macosx_10_9_universal2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: QuLab
3
- Version: 2.4.12
3
+ Version: 2.4.13
4
4
  Summary: contral instruments and manage data
5
5
  Author-email: feihoo87 <feihoo87@gmail.com>
6
6
  Maintainer-email: feihoo87 <feihoo87@gmail.com>
@@ -1,12 +1,12 @@
1
1
  qulab/__init__.py,sha256=P-Mx2p4TVmL91SoxoeXcj8Qm0x4xUf5Q_FLk0Yc_gIQ,138
2
2
  qulab/__main__.py,sha256=ThCRooT22_qpwFtbAvVOyHzpBCuGlfDVkXBXvApzgps,597
3
3
  qulab/dicttree.py,sha256=tRRMpGZYVOLw0TEByE3_2Ss8FdOmzuGL9e1DWbs8qoY,13684
4
- qulab/fun.cpython-310-darwin.so,sha256=l2j8u_hDaQVbFSXjRKFyZxjCsOib1ynJsQdSGXucfj4,126864
5
- qulab/version.py,sha256=3Ac_4-IUz5KK-UOcxuXzEVTZr4p9bV93jrLgO3Au_zA,22
4
+ qulab/fun.cpython-310-darwin.so,sha256=E7G2FLvF6TCJtlPXbd6ShtFPFUi5PKNfPpQrGDj6mn8,126864
5
+ qulab/version.py,sha256=_e118vufispiK25vPHegUtgNTXX7-QuWeU66JWddGAE,22
6
6
  qulab/executor/__init__.py,sha256=LosPzOMaljSZY1thy_Fxtbrgq7uubJszMABEB7oM7tU,101
7
7
  qulab/executor/__main__.py,sha256=qgZcdmx1wBZInHf6ionpuuZytIJnaDje9WRv-a8o2OM,5870
8
- qulab/executor/load.py,sha256=GSRrP2UXOmTgg5VDTmZy_y4xXk91H3Sd5SEX-tOEBqY,8689
9
- qulab/executor/schedule.py,sha256=UOace0Gpt9gR0xe1BoNSUfeHxZynaUS0BFHZhmfnB30,11849
8
+ qulab/executor/load.py,sha256=2gpBUcVdrZcbVI-YqTAfyKhW9br4rO8gnQtoYv7AO6c,9167
9
+ qulab/executor/schedule.py,sha256=Ww0HHRSJxk-V3FM-Qgwqn-l6qPyWjPNoCz9Yy8MVG4o,11663
10
10
  qulab/executor/storage.py,sha256=M66Q5_Uc5MMfc_QAuuaaexwAz7wxBPMkeleB5nRpQmI,4621
11
11
  qulab/executor/transform.py,sha256=inaOn6eqCs22ZZ0xAQl8s8YCoEACaXSwFNNu7jqdwAk,2148
12
12
  qulab/executor/utils.py,sha256=n3uCSKh-qdDFFeNvOpj7_es2_B4AaC-ASAlV9gPmSO0,3086
@@ -89,9 +89,9 @@ qulab/visualization/plot_seq.py,sha256=UWTS6p9nfX_7B8ehcYo6UnSTUCjkBsNU9jiOeW2ca
89
89
  qulab/visualization/qdat.py,sha256=ZeevBYWkzbww4xZnsjHhw7wRorJCBzbG0iEu-XQB4EA,5735
90
90
  qulab/visualization/rot3d.py,sha256=lMrEJlRLwYe6NMBlGkKYpp_V9CTipOAuDy6QW_cQK00,734
91
91
  qulab/visualization/widgets.py,sha256=6KkiTyQ8J-ei70LbPQZAK35wjktY47w2IveOa682ftA,3180
92
- QuLab-2.4.12.dist-info/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
93
- QuLab-2.4.12.dist-info/METADATA,sha256=OdTgtOdriEitEyphmV6lZTskqK97GLmDGp7hkAYQGgo,3699
94
- QuLab-2.4.12.dist-info/WHEEL,sha256=Yd3eJSBM2hj8W-ouaiMfFUwQYAS-D6P73Ob9yN5MZd0,114
95
- QuLab-2.4.12.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
96
- QuLab-2.4.12.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
97
- QuLab-2.4.12.dist-info/RECORD,,
92
+ QuLab-2.4.13.dist-info/LICENSE,sha256=PRzIKxZtpQcH7whTG6Egvzl1A0BvnSf30tmR2X2KrpA,1065
93
+ QuLab-2.4.13.dist-info/METADATA,sha256=oq0Nmb1rdu0TDEPYZWZ9JbWT7-qrfRIWu0osA1W3eq0,3699
94
+ QuLab-2.4.13.dist-info/WHEEL,sha256=Yd3eJSBM2hj8W-ouaiMfFUwQYAS-D6P73Ob9yN5MZd0,114
95
+ QuLab-2.4.13.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
96
+ QuLab-2.4.13.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
97
+ QuLab-2.4.13.dist-info/RECORD,,
qulab/executor/load.py CHANGED
@@ -128,8 +128,8 @@ def find_unreferenced_workflows(path: str) -> list[str]:
128
128
  for file_path in root.rglob("*.py"):
129
129
  if file_path.name == "__init__.py":
130
130
  continue
131
- if file_path.name.endswith("_template.py") or re.match(
132
- r'.*_tmp_[0-9a-fA-F]{8}.py', file_path.name):
131
+ if file_path.name == 'template.py' or file_path.name.endswith(
132
+ "_template.py"):
133
133
  continue
134
134
  try:
135
135
  rel_path = file_path.relative_to(root)
@@ -157,7 +157,7 @@ def find_unreferenced_workflows(path: str) -> list[str]:
157
157
  )
158
158
  continue
159
159
  try:
160
- depends_list = depends_func()[0]
160
+ depends_list = [n.__workflow_id__ for n in get_dependents(module, root)]
161
161
  except Exception as e:
162
162
  warnings.warn(f"Error calling depends() in {rel_str}: {e}")
163
163
  continue
@@ -222,10 +222,17 @@ def load_workflow_from_template(file_name: str,
222
222
 
223
223
  hash_str = hashlib.md5(pickle.dumps(mappping)).hexdigest()[:8]
224
224
  if subtitle is None:
225
- path = path.parent / path.stem.replace('_template',
226
- f'_tmp{hash_str}.py')
225
+ if path.stem == 'template':
226
+ path = path.parent / f'tmp{hash_str}.py'
227
+ else:
228
+ path = path.parent / path.stem.replace('_template',
229
+ f'_tmp{hash_str}.py')
227
230
  else:
228
- path = path.parent / path.stem.replace('_template', f'_{subtitle}.py')
231
+ if path.stem == 'template':
232
+ path = path.parent / f'{subtitle}.py'
233
+ else:
234
+ path = path.parent / path.stem.replace('_template',
235
+ f'_{subtitle}.py')
229
236
 
230
237
  with open(base_path / path, 'w') as f:
231
238
  f.write(content)
@@ -262,3 +269,8 @@ def load_workflow(workflow: str | tuple[str, dict],
262
269
  raise TypeError(f"Invalid workflow: {workflow}")
263
270
 
264
271
  return w
272
+
273
+
274
+ def get_dependents(workflow: WorkflowType,
275
+ code_path: str | Path) -> list[WorkflowType]:
276
+ return [load_workflow(n, code_path) for n in workflow.depends()[0]]
@@ -6,7 +6,7 @@ from pathlib import Path
6
6
  from loguru import logger
7
7
 
8
8
  from . import transform
9
- from .load import WorkflowType, load_workflow
9
+ from .load import WorkflowType, get_dependents
10
10
  from .storage import (Result, find_result, get_head, renew_result,
11
11
  revoke_result, save_result)
12
12
 
@@ -230,11 +230,6 @@ def diagnose(workflow: WorkflowType, code_path: str | Path,
230
230
  return True
231
231
 
232
232
 
233
- def get_dependents(workflow: WorkflowType,
234
- code_path: str | Path) -> list[WorkflowType]:
235
- return [load_workflow(n, code_path) for n in workflow.depends()[0]]
236
-
237
-
238
233
  @logger.catch(reraise=True)
239
234
  def maintain(workflow: WorkflowType,
240
235
  code_path: str | Path,
Binary file
qulab/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.4.12"
1
+ __version__ = "2.4.13"
File without changes