ivoryos 0.1.12__py3-none-any.whl → 0.1.19__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.
Potentially problematic release.
This version of ivoryos might be problematic. Click here for more details.
- ivoryos/__init__.py +50 -14
- ivoryos/routes/control/templates/control/controllers.html +3 -0
- ivoryos/routes/design/design.py +67 -47
- ivoryos/routes/design/templates/design/experiment_builder.html +23 -10
- ivoryos/routes/design/templates/design/experiment_run.html +21 -5
- ivoryos/routes/main/templates/main/home.html +19 -17
- ivoryos/static/js/socket_handler.js +31 -3
- ivoryos/templates/base.html +20 -10
- ivoryos/utils/db_models.py +132 -69
- ivoryos/utils/form.py +192 -81
- ivoryos/utils/script_runner.py +86 -37
- ivoryos/utils/utils.py +13 -41
- ivoryos/version.py +1 -1
- {ivoryos-0.1.12.dist-info → ivoryos-0.1.19.dist-info}/METADATA +13 -1
- {ivoryos-0.1.12.dist-info → ivoryos-0.1.19.dist-info}/RECORD +18 -19
- {ivoryos-0.1.12.dist-info → ivoryos-0.1.19.dist-info}/WHEEL +1 -1
- ivoryos/static/.DS_Store +0 -0
- {ivoryos-0.1.12.dist-info → ivoryos-0.1.19.dist-info}/LICENSE +0 -0
- {ivoryos-0.1.12.dist-info → ivoryos-0.1.19.dist-info}/top_level.txt +0 -0
ivoryos/utils/utils.py
CHANGED
|
@@ -7,7 +7,6 @@ import pickle
|
|
|
7
7
|
import subprocess
|
|
8
8
|
import sys
|
|
9
9
|
from collections import Counter
|
|
10
|
-
from typing import Optional, Dict, Tuple
|
|
11
10
|
|
|
12
11
|
from flask import session
|
|
13
12
|
from flask_socketio import SocketIO
|
|
@@ -84,7 +83,6 @@ def available_pseudo_deck(path):
|
|
|
84
83
|
"""
|
|
85
84
|
load pseudo deck (snapshot) from connection history
|
|
86
85
|
"""
|
|
87
|
-
import os
|
|
88
86
|
return os.listdir(path)
|
|
89
87
|
|
|
90
88
|
|
|
@@ -103,20 +101,9 @@ def _inspect_class(class_object=None, debug=False):
|
|
|
103
101
|
if not function.startswith(under_score) and not function.isupper():
|
|
104
102
|
try:
|
|
105
103
|
annotation = inspect.signature(method)
|
|
106
|
-
# if doc_string:
|
|
107
104
|
docstring = inspect.getdoc(method)
|
|
108
105
|
functions[function] = dict(signature=annotation, docstring=docstring)
|
|
109
106
|
|
|
110
|
-
# handle getter setters todo
|
|
111
|
-
# if callable(att):
|
|
112
|
-
# functions[function] = inspect.signature(att)
|
|
113
|
-
# else:
|
|
114
|
-
# att = getattr(class_object.__class__, function)
|
|
115
|
-
# if isinstance(att, property) and att.fset is not None:
|
|
116
|
-
# setter = att.fset.__annotations__
|
|
117
|
-
# setter.pop('return', None)
|
|
118
|
-
# if setter:
|
|
119
|
-
# functions[function] = setter
|
|
120
107
|
except Exception:
|
|
121
108
|
pass
|
|
122
109
|
return functions
|
|
@@ -132,36 +119,22 @@ def _get_type_from_parameters(arg, parameters):
|
|
|
132
119
|
if annotation is not inspect._empty:
|
|
133
120
|
# print(p[arg].annotation)
|
|
134
121
|
if annotation.__module__ == 'typing':
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
122
|
+
|
|
123
|
+
if hasattr(annotation, '__origin__'):
|
|
124
|
+
origin = annotation.__origin__
|
|
125
|
+
if hasattr(origin, '_name') and origin._name in ["Optional", "Union"]:
|
|
126
|
+
arg_type = [i.__name__ for i in annotation.__args__]
|
|
127
|
+
elif hasattr(origin, '__name__'):
|
|
128
|
+
arg_type = origin.__name__
|
|
129
|
+
# todo other types
|
|
130
|
+
elif annotation.__module__ == 'types':
|
|
131
|
+
arg_type = [i.__name__ for i in annotation.__args__]
|
|
132
|
+
|
|
143
133
|
else:
|
|
144
134
|
arg_type = annotation.__name__
|
|
145
135
|
return arg_type
|
|
146
136
|
|
|
147
137
|
|
|
148
|
-
def find_variable_in_script(script: Script, args: Dict[str, str]) -> Optional[Tuple[Dict[str, str], Dict[str, str]]]:
|
|
149
|
-
# TODO: need to search for if the variable exists
|
|
150
|
-
added_variables: list[Dict[str, str]] = [action for action in script.currently_editing_script if
|
|
151
|
-
action["instrument"] == "variable"]
|
|
152
|
-
|
|
153
|
-
possible_variable_arguments = {}
|
|
154
|
-
possible_variable_types = {}
|
|
155
|
-
|
|
156
|
-
for arg_name, arg_val in args.items():
|
|
157
|
-
for added_variable in added_variables:
|
|
158
|
-
if added_variable["action"] == arg_val:
|
|
159
|
-
possible_variable_arguments[arg_name] = added_variable["action"]
|
|
160
|
-
possible_variable_types[arg_name] = "variable"
|
|
161
|
-
|
|
162
|
-
return possible_variable_arguments, possible_variable_types
|
|
163
|
-
|
|
164
|
-
|
|
165
138
|
def _convert_by_str(args, arg_types):
|
|
166
139
|
"""
|
|
167
140
|
Converts a value to type through eval(f'{type}("{args}")')
|
|
@@ -201,9 +174,6 @@ def convert_config_type(args, arg_types, is_class: bool = False):
|
|
|
201
174
|
"""
|
|
202
175
|
Converts an argument from str to an arg type
|
|
203
176
|
"""
|
|
204
|
-
bool_dict = {"True": True, "False": False}
|
|
205
|
-
# print(args, arg_types)
|
|
206
|
-
# print(globals())
|
|
207
177
|
if args:
|
|
208
178
|
for arg in args:
|
|
209
179
|
if arg not in arg_types.keys():
|
|
@@ -338,8 +308,10 @@ def ax_initiation(data, arg_types):
|
|
|
338
308
|
|
|
339
309
|
|
|
340
310
|
def get_arg_type(args, parameters):
|
|
311
|
+
"""get argument type from signature"""
|
|
341
312
|
arg_types = {}
|
|
342
313
|
# print(args, parameters)
|
|
314
|
+
parameters = parameters.get("signature")
|
|
343
315
|
if args:
|
|
344
316
|
for arg in args:
|
|
345
317
|
arg_types[arg] = _get_type_from_parameters(arg, parameters)
|
ivoryos/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.19"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ivoryos
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.19
|
|
4
4
|
Summary: an open-source Python package enabling Self-Driving Labs (SDLs) interoperability
|
|
5
5
|
Home-page: https://gitlab.com/heingroup/ivoryos
|
|
6
6
|
Author: Ivory Zhang
|
|
7
7
|
Author-email: ivoryzhang@chem.ubc.ca
|
|
8
8
|
License: MIT
|
|
9
|
+
Platform: UNKNOWN
|
|
9
10
|
Description-Content-Type: text/markdown
|
|
10
11
|
License-File: LICENSE
|
|
11
12
|
Requires-Dist: bcrypt
|
|
@@ -164,7 +165,18 @@ Intro + Tutorial + Demo with PurPOSE platform
|
|
|
164
165
|
https://youtu.be/dFfJv9I2-1g
|
|
165
166
|
|
|
166
167
|
|
|
168
|
+
## Roadmap
|
|
169
|
+
|
|
170
|
+
- [x] Allow plugin pages ✅
|
|
171
|
+
- [ ] pause, resume, abort current and pending workflows
|
|
172
|
+
- [ ] snapshot version control
|
|
173
|
+
- [ ] dropdown input
|
|
174
|
+
- [ ] show line number option
|
|
175
|
+
|
|
176
|
+
|
|
167
177
|
## Authors and Acknowledgement
|
|
168
178
|
Ivory Zhang, Lucy Hao
|
|
169
179
|
|
|
170
180
|
Authors acknowledge all former and current Hein Lab members for their valuable suggestions.
|
|
181
|
+
|
|
182
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
ivoryos/__init__.py,sha256=
|
|
1
|
+
ivoryos/__init__.py,sha256=F3KenDZX1zqei3PZ3tx1U77yXsbeytgMMhVJyJMkmJ0,6071
|
|
2
2
|
ivoryos/config.py,sha256=3FPBYTIBhQTKDvsEoR8ZeTmg65D-CSFEdGmOuIL4pSI,1311
|
|
3
|
-
ivoryos/version.py,sha256=
|
|
3
|
+
ivoryos/version.py,sha256=cAJAbAh288a9AL-3yxwFzEM1L26izSJ6wma5aiml_9Y,23
|
|
4
4
|
ivoryos/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
ivoryos/routes/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
ivoryos/routes/auth/auth.py,sha256=7CdXjGAr1B_xsmwweakTWOoROgsOJf0MNTzlMP_5Nus,3240
|
|
@@ -8,40 +8,39 @@ ivoryos/routes/auth/templates/auth/login.html,sha256=WSRrKbdM_oobqSXFRTo-j9UlOgp
|
|
|
8
8
|
ivoryos/routes/auth/templates/auth/signup.html,sha256=b5LTXtpfTSkSS7X8u1ldwQbbgEFTk6UNMAediA5BwBY,1465
|
|
9
9
|
ivoryos/routes/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
ivoryos/routes/control/control.py,sha256=MmrcKrkjSKS589XhDdvPc7kWO0ApCNVZCtrgfzTAAN8,14163
|
|
11
|
-
ivoryos/routes/control/templates/control/controllers.html,sha256=
|
|
11
|
+
ivoryos/routes/control/templates/control/controllers.html,sha256=iIp0h6WA68gQj9OsoiB7dU1BqH8CGomTueR73F4C8eY,4274
|
|
12
12
|
ivoryos/routes/control/templates/control/controllers_home.html,sha256=xFnBXTWMlyi2naMSsCEqFlX-Z1HJJDDtzITPvq-3nng,2733
|
|
13
13
|
ivoryos/routes/control/templates/control/controllers_new.html,sha256=uOQo9kYmwX2jk3KZDkMUF_ylfNUIs_oIWb_kk_MMVDM,4921
|
|
14
14
|
ivoryos/routes/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
ivoryos/routes/database/database.py,sha256=IOrdtdsZ28bV7R1ZQfcwAeS5JDCkX-QYsP9i8BseD38,5684
|
|
16
16
|
ivoryos/routes/database/templates/database/experiment_database.html,sha256=ABchwHYDovzwECc7UD4Mh8C_9JUl0YZpAAF9sFjNCs0,3434
|
|
17
17
|
ivoryos/routes/design/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
ivoryos/routes/design/design.py,sha256=
|
|
19
|
-
ivoryos/routes/design/templates/design/experiment_builder.html,sha256
|
|
20
|
-
ivoryos/routes/design/templates/design/experiment_run.html,sha256=
|
|
18
|
+
ivoryos/routes/design/design.py,sha256=hV8rtyIgbw5HsDY9h_Xtq96NIoaZB8XXLKyxaxbnYEA,21361
|
|
19
|
+
ivoryos/routes/design/templates/design/experiment_builder.html,sha256=-C84nHcK1grC8b_B5Lgbg6StJcP8x1oj2XAjRPj1oU0,28239
|
|
20
|
+
ivoryos/routes/design/templates/design/experiment_run.html,sha256=JY44cyWyi470Z_GeDGROU6cyFsTlbTYtlFVXmPjf4XA,23944
|
|
21
21
|
ivoryos/routes/main/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
ivoryos/routes/main/main.py,sha256=yuVJzXAob1kc1dfflkTBIZQ0tdf6kChfuq-uQlN1e9Q,957
|
|
23
23
|
ivoryos/routes/main/templates/main/help.html,sha256=IOktMEsOPk0SCiMBXZ4mpffClERAyX8W82fel71M3M0,9370
|
|
24
|
-
ivoryos/routes/main/templates/main/home.html,sha256=
|
|
25
|
-
ivoryos/static/.DS_Store,sha256=skh9ta8MJo1eOfvLDKqqVRNKQXFH2Wfse7ybGMLytNs,6148
|
|
24
|
+
ivoryos/routes/main/templates/main/home.html,sha256=ujM0YC0yrHhCfkuprNnZZZd8XEEguS_6NjrY5ktfctg,3356
|
|
26
25
|
ivoryos/static/favicon.ico,sha256=RhlrPtfITOkzC9BjP1UB1V5L9Oyp6NwNtWeMcGOnpyc,15406
|
|
27
26
|
ivoryos/static/logo.webp,sha256=lXgfQR-4mHTH83k7VV9iB54-oC2ipe6uZvbwdOnLETc,14974
|
|
28
27
|
ivoryos/static/style.css,sha256=cbQ8T8h42smwuyF5qQ_pNhlptDXGcuyK2u4sUppqnyI,3717
|
|
29
28
|
ivoryos/static/gui_annotation/Slide1.png,sha256=Lm4gdOkUF5HIUFaB94tl6koQVkzpitKj43GXV_XYMMc,121727
|
|
30
29
|
ivoryos/static/gui_annotation/Slide2.PNG,sha256=z3wQ9oVgg4JTWVLQGKK_KhtepRHUYP1e05XUWGT2A0I,118761
|
|
31
30
|
ivoryos/static/js/overlay.js,sha256=dPxop19es0E0ZUSY3d_4exIk7CJuQEnlW5uTt5fZfzI,483
|
|
32
|
-
ivoryos/static/js/socket_handler.js,sha256=
|
|
31
|
+
ivoryos/static/js/socket_handler.js,sha256=psIz61RgTzFk7B9SBZWtHWpG9vJjaRxEDTueFDKQcO4,2580
|
|
33
32
|
ivoryos/static/js/sortable_card.js,sha256=ifmlGe3yy0U_KzMphV4ClRhK2DLOvkELYMlq1vECuac,807
|
|
34
33
|
ivoryos/static/js/sortable_design.js,sha256=1lI1I8FbL66tv6n-SX2FkbHNDYo36xVo2qDBKVLmxnQ,1120
|
|
35
|
-
ivoryos/templates/base.html,sha256=
|
|
34
|
+
ivoryos/templates/base.html,sha256=8HDi7I74ugcCAV4c3ha4C__-7xopt4ZsC0OQ2E_AsQ8,8313
|
|
36
35
|
ivoryos/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
ivoryos/utils/db_models.py,sha256=
|
|
38
|
-
ivoryos/utils/form.py,sha256=
|
|
36
|
+
ivoryos/utils/db_models.py,sha256=GiBvsQqleXa7sXjh-118Q1rDTWYKrBsz25fben3aKC4,23712
|
|
37
|
+
ivoryos/utils/form.py,sha256=1h6eytHz1tv5_CIc_C6KGYn5JEPYniIOxo49yzM37o0,17149
|
|
39
38
|
ivoryos/utils/global_config.py,sha256=Ojcz6xKATSbMLnTT0kiKqSnu_bNqCMyIAnZyHaKxJns,1589
|
|
40
39
|
ivoryos/utils/llm_agent.py,sha256=DTf-AF56vy1Em1fUKagl5NURKittmNoxTKIw1PlyC2o,6413
|
|
41
|
-
ivoryos/utils/script_runner.py,sha256=
|
|
42
|
-
ivoryos/utils/utils.py,sha256=
|
|
43
|
-
ivoryos-0.1.
|
|
44
|
-
ivoryos-0.1.
|
|
45
|
-
ivoryos-0.1.
|
|
46
|
-
ivoryos-0.1.
|
|
47
|
-
ivoryos-0.1.
|
|
40
|
+
ivoryos/utils/script_runner.py,sha256=fa35LmNHUXdU0R-_e2Wadok4GjQ_MaYNMvOFJfxSdCI,9308
|
|
41
|
+
ivoryos/utils/utils.py,sha256=nQbGSR_FmlZyBb9lwKy3ws4FDAWWfDyu96hZg2DVIeI,14081
|
|
42
|
+
ivoryos-0.1.19.dist-info/LICENSE,sha256=p2c8S8i-8YqMpZCJnadLz1-ofxnRMILzz6NCMIypRag,1084
|
|
43
|
+
ivoryos-0.1.19.dist-info/METADATA,sha256=z55ToyL0h0YAkAS9pEeaXrG2TFT-fSWeJBsaKto3Xc0,6539
|
|
44
|
+
ivoryos-0.1.19.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
45
|
+
ivoryos-0.1.19.dist-info/top_level.txt,sha256=FRIWWdiEvRKqw-XfF_UK3XV0CrnNb6EmVbEgjaVazRM,8
|
|
46
|
+
ivoryos-0.1.19.dist-info/RECORD,,
|
ivoryos/static/.DS_Store
DELETED
|
Binary file
|
|
File without changes
|
|
File without changes
|