pycoze 0.1.63__py3-none-any.whl → 0.1.64__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.
- pycoze/ui/base.py +10 -9
- {pycoze-0.1.63.dist-info → pycoze-0.1.64.dist-info}/METADATA +1 -1
- {pycoze-0.1.63.dist-info → pycoze-0.1.64.dist-info}/RECORD +6 -6
- {pycoze-0.1.63.dist-info → pycoze-0.1.64.dist-info}/LICENSE +0 -0
- {pycoze-0.1.63.dist-info → pycoze-0.1.64.dist-info}/WHEEL +0 -0
- {pycoze-0.1.63.dist-info → pycoze-0.1.64.dist-info}/top_level.txt +0 -0
pycoze/ui/base.py
CHANGED
@@ -4,23 +4,24 @@ import json
|
|
4
4
|
import inspect
|
5
5
|
|
6
6
|
|
7
|
-
params_file = utils.read_arg(
|
7
|
+
params_file = utils.read_arg("params_file", True)
|
8
8
|
params = None
|
9
9
|
try:
|
10
|
-
with open(params_file,
|
10
|
+
with open(params_file, "r", encoding="utf-8") as f:
|
11
11
|
params = json.load(f)
|
12
12
|
except Exception as e:
|
13
13
|
print(e)
|
14
14
|
|
15
|
+
|
15
16
|
def get_ui():
|
16
17
|
if params is None:
|
17
18
|
return {}
|
18
19
|
stack = inspect.stack()
|
19
|
-
stack_files = list(reversed([s.filename.replace(
|
20
|
+
stack_files = list(reversed([s.filename.replace("\\", "/") for s in stack]))
|
20
21
|
match_item = None
|
21
22
|
for f in stack_files:
|
22
|
-
for v in params["uiData"]:
|
23
|
-
if v
|
23
|
+
for v in params["uiData"]["uiFiles"]:
|
24
|
+
if v == f:
|
24
25
|
match_item = v
|
25
26
|
break
|
26
27
|
if match_item:
|
@@ -33,15 +34,15 @@ def get_ui():
|
|
33
34
|
|
34
35
|
for i in range(10):
|
35
36
|
try:
|
36
|
-
if by ==
|
37
|
+
if by == "file":
|
37
38
|
json_file = match_item["Jsonfile"]
|
38
|
-
with open(json_file, "r", encoding=
|
39
|
+
with open(json_file, "r", encoding="utf-8") as f:
|
39
40
|
return json.load(f)
|
40
41
|
else:
|
41
|
-
assert by ==
|
42
|
+
assert by == "node"
|
42
43
|
workflow_file = match_item["workflowFile"]
|
43
44
|
node_id = match_item["nodeId"]
|
44
|
-
with open(workflow_file, "r", encoding=
|
45
|
+
with open(workflow_file, "r", encoding="utf-8") as f:
|
45
46
|
cells = json.load(f)["graph"]["cells"]
|
46
47
|
node = [cell for cell in cells if cell["id"] == node_id][0]
|
47
48
|
return json.loads(node["data"]["ui"])
|
@@ -15,15 +15,15 @@ pycoze/bot/agent/agent_types/react_prompt.py,sha256=jyovokGaPzNIe5bvTRvn0gmsWLx5
|
|
15
15
|
pycoze/gpu/__init__.py,sha256=cuxwDdz2Oo-VcwZ50FtFtEIJXdqoz2el-n0QpSt_NMc,75
|
16
16
|
pycoze/gpu/gpu_reserve.py,sha256=T-M1w8DiQQNtyNVok9Fj9qXGfTs5mxJp-gw-rxs50es,5410
|
17
17
|
pycoze/ui/__init__.py,sha256=7xAfL2lfG7-jllPJEZUJO89xUE9sNzvo1y0WmBswjBI,458
|
18
|
-
pycoze/ui/base.py,sha256=
|
18
|
+
pycoze/ui/base.py,sha256=tw5t_dm94ukEnS_fdQIkaCUQiNEt3EKrJ7jqVcaRwsQ,1467
|
19
19
|
pycoze/ui/color.py,sha256=cT9Ib8uNzkOKxyW0IwVj46o4LwdB1xgNCj1_Rou9d_4,854
|
20
20
|
pycoze/ui/typ.py,sha256=NpT0FrbHvByOszBZMFtroRp7I7pN-38tYz_zPOPejF4,1723
|
21
21
|
pycoze/ui/ui_def.py,sha256=UhhU_yB3GV9ISbvTWT48hsHPHI250BhMILh6bu5Uioo,4206
|
22
22
|
pycoze/utils/__init__.py,sha256=KExBkotf23dr2NfTEouWke5nJB1q2IuDXgHrmuyd95k,73
|
23
23
|
pycoze/utils/arg.py,sha256=AhOobJNjifCf7dKKPZa7AsN7CcZg3OSECUp9TZIrDTI,748
|
24
24
|
pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
|
25
|
-
pycoze-0.1.
|
26
|
-
pycoze-0.1.
|
27
|
-
pycoze-0.1.
|
28
|
-
pycoze-0.1.
|
29
|
-
pycoze-0.1.
|
25
|
+
pycoze-0.1.64.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
|
26
|
+
pycoze-0.1.64.dist-info/METADATA,sha256=Oukw0jTWqbxVYhvpJ9oOREL75HUgYY2F5uMO5WBw-Dc,719
|
27
|
+
pycoze-0.1.64.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
28
|
+
pycoze-0.1.64.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
|
29
|
+
pycoze-0.1.64.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|