ivoryos 0.1.8__tar.gz → 0.1.9__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.
Potentially problematic release.
This version of ivoryos might be problematic. Click here for more details.
- {ivoryos-0.1.8/ivoryos.egg-info → ivoryos-0.1.9}/PKG-INFO +4 -1
- {ivoryos-0.1.8 → ivoryos-0.1.9}/README.md +3 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/design/design.py +12 -1
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/design/templates/design/experiment_builder.html +5 -2
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/templates/base.html +1 -1
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/utils/db_models.py +21 -3
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/utils/form.py +1 -1
- {ivoryos-0.1.8 → ivoryos-0.1.9/ivoryos.egg-info}/PKG-INFO +4 -1
- {ivoryos-0.1.8 → ivoryos-0.1.9}/setup.py +1 -1
- {ivoryos-0.1.8 → ivoryos-0.1.9}/LICENSE +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/MANIFEST.in +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/config.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/auth/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/auth/auth.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/auth/templates/auth/login.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/auth/templates/auth/signup.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/control/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/control/control.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/control/templates/control/controllers.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/control/templates/control/controllers_home.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/control/templates/control/controllers_new.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/database/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/database/database.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/database/templates/database/experiment_database.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/design/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/design/templates/design/experiment_run.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/main/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/main/main.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/main/templates/main/help.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/main/templates/main/home.html +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/favicon.ico +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/gui_annotation/Slide1.png +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/gui_annotation/Slide2.PNG +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/js/overlay.js +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/js/socket_handler.js +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/js/sortable_card.js +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/js/sortable_design.js +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/logo.webp +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/static/style.css +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/utils/__init__.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/utils/global_config.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/utils/llm_agent.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/utils/script_runner.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/utils/utils.py +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos.egg-info/SOURCES.txt +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos.egg-info/dependency_links.txt +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos.egg-info/requires.txt +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos.egg-info/top_level.txt +0 -0
- {ivoryos-0.1.8 → ivoryos-0.1.9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ivoryos
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
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
|
|
@@ -137,6 +137,9 @@ ivoryos.run(__name__)
|
|
|
137
137
|
### Deck function and web form
|
|
138
138
|

|
|
139
139
|
|
|
140
|
+
### Text-to-code demo
|
|
141
|
+

|
|
142
|
+
|
|
140
143
|
### Directory structure
|
|
141
144
|
|
|
142
145
|
When you run the application for the first time, it will automatically create the following folders and files in the same directory:
|
|
@@ -118,6 +118,9 @@ ivoryos.run(__name__)
|
|
|
118
118
|
### Deck function and web form
|
|
119
119
|

|
|
120
120
|
|
|
121
|
+
### Text-to-code demo
|
|
122
|
+

|
|
123
|
+
|
|
121
124
|
### Directory structure
|
|
122
125
|
|
|
123
126
|
When you run the application for the first time, it will automatically create the following folders and files in the same directory:
|
|
@@ -13,7 +13,7 @@ from werkzeug.utils import secure_filename
|
|
|
13
13
|
from ivoryos.utils import utils
|
|
14
14
|
from ivoryos.utils.global_config import GlobalConfig
|
|
15
15
|
from ivoryos.utils.form import create_builtin_form, create_action_button, format_name, create_form_from_pseudo
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
from ivoryos.utils.db_models import Script
|
|
18
18
|
from ivoryos.utils.script_runner import ScriptRunner
|
|
19
19
|
|
|
@@ -165,6 +165,7 @@ def generate_code():
|
|
|
165
165
|
model = current_app.config["LLM_MODEL"]
|
|
166
166
|
server = current_app.config["LLM_SERVER"]
|
|
167
167
|
module = current_app.config["MODULE"]
|
|
168
|
+
from ivoryos.utils.llm_agent import LlmAgent
|
|
168
169
|
agent = LlmAgent(host=server, model=model, output_path=os.path.dirname(os.path.abspath(module)))
|
|
169
170
|
except Exception as e:
|
|
170
171
|
flash(e.__str__())
|
|
@@ -404,3 +405,13 @@ def delete_action(id):
|
|
|
404
405
|
script.delete_action(id)
|
|
405
406
|
utils.post_script_file(script)
|
|
406
407
|
return redirect(back)
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
@design.route("/duplicate/<id>", methods=['GET', 'POST'])
|
|
411
|
+
@login_required
|
|
412
|
+
def duplicate_action(id):
|
|
413
|
+
back = request.referrer
|
|
414
|
+
script = utils.get_script_file()
|
|
415
|
+
script.duplicate_action(id)
|
|
416
|
+
utils.post_script_file(script)
|
|
417
|
+
return redirect(back)
|
{ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/design/templates/design/experiment_builder.html
RENAMED
|
@@ -301,8 +301,11 @@
|
|
|
301
301
|
<ul class="reorder">
|
|
302
302
|
{% for button in buttons %}
|
|
303
303
|
<li id="{{ button['id'] }}" style="list-style-type: none;">
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
<a href="{{ url_for('design.edit_action', uuid=button['uuid']) }}" type="button" class="btn btn-light" style="{{ button['style'] }}">{{ button['label'] }}</a>
|
|
305
|
+
{% if not button["instrument"] in ["if","while"] %}
|
|
306
|
+
<a href="{{ url_for('design.duplicate_action', id=button['id']) }}" type="button" class="btn btn-light"><span class="bi bi-copy"></span></a>
|
|
307
|
+
{% endif %}
|
|
308
|
+
<a href="{{ url_for('design.delete_action', id=button['id']) }}" type="button" class="btn btn-light"><span class="bi bi-trash"></span></a>
|
|
306
309
|
</li>
|
|
307
310
|
{% endfor %}
|
|
308
311
|
</ul>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>{% block title %}{% endblock %}</title>
|
|
7
7
|
{#bootstrap#}
|
|
8
8
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
|
|
9
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.
|
|
9
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
|
|
10
10
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
|
11
11
|
{#static#}
|
|
12
12
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
@@ -197,9 +197,10 @@ class Script(db.Model):
|
|
|
197
197
|
|
|
198
198
|
def add_action(self, action: dict):
|
|
199
199
|
current_len = len(self.currently_editing_script)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
action_to_add = action.copy()
|
|
201
|
+
action_to_add['id'] = current_len + 1
|
|
202
|
+
action_to_add['uuid'] = uuid.uuid4().fields[-1]
|
|
203
|
+
self.currently_editing_script.append(action_to_add)
|
|
203
204
|
self.currently_editing_order.append(str(current_len + 1))
|
|
204
205
|
self.update_time_stamp()
|
|
205
206
|
|
|
@@ -257,6 +258,23 @@ class Script(db.Model):
|
|
|
257
258
|
self.sort_actions()
|
|
258
259
|
self.update_time_stamp()
|
|
259
260
|
|
|
261
|
+
def duplicate_action(self, id: int):
|
|
262
|
+
action_to_duplicate = next((action for action in self.currently_editing_script if action['id'] == int(id)), None)
|
|
263
|
+
insert_id = action_to_duplicate.get("id")
|
|
264
|
+
self.add_action(action_to_duplicate)
|
|
265
|
+
# print(self.currently_editing_script)
|
|
266
|
+
if action_to_duplicate is not None:
|
|
267
|
+
# Update IDs for all subsequent actions
|
|
268
|
+
for action in self.currently_editing_script:
|
|
269
|
+
if action['id'] > insert_id:
|
|
270
|
+
action['id'] += 1
|
|
271
|
+
self.currently_editing_script[-1]['id'] = insert_id + 1
|
|
272
|
+
# Sort actions if necessary and update the time stamp
|
|
273
|
+
self.sort_actions()
|
|
274
|
+
self.update_time_stamp()
|
|
275
|
+
else:
|
|
276
|
+
raise ValueError("Action not found: Unable to duplicate the action with ID", id)
|
|
277
|
+
|
|
260
278
|
def config(self, stype):
|
|
261
279
|
"""
|
|
262
280
|
take the global script_dict
|
|
@@ -313,4 +313,4 @@ def create_action_button(s: dict):
|
|
|
313
313
|
arg_string = f"= {s['args']}"
|
|
314
314
|
|
|
315
315
|
text = f"{prefix}{action_text} {arg_string}"
|
|
316
|
-
return dict(label=text, style=style, uuid=s["uuid"], id=s["id"])
|
|
316
|
+
return dict(label=text, style=style, uuid=s["uuid"], id=s["id"], instrument=s['instrument'])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ivoryos
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
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
|
|
@@ -137,6 +137,9 @@ ivoryos.run(__name__)
|
|
|
137
137
|
### Deck function and web form
|
|
138
138
|

|
|
139
139
|
|
|
140
|
+
### Text-to-code demo
|
|
141
|
+

|
|
142
|
+
|
|
140
143
|
### Directory structure
|
|
141
144
|
|
|
142
145
|
When you run the application for the first time, it will automatically create the following folders and files in the same directory:
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='ivoryos',
|
|
5
|
-
version='0.1.
|
|
5
|
+
version='0.1.9',
|
|
6
6
|
packages=find_packages(exclude=['example', 'example.*', 'docs', 'docs.*']),
|
|
7
7
|
include_package_data=True,
|
|
8
8
|
description='an open-source Python package enabling Self-Driving Labs (SDLs) interoperability',
|
|
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
|
{ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/control/templates/control/controllers_home.html
RENAMED
|
File without changes
|
{ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/control/templates/control/controllers_new.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ivoryos-0.1.8 → ivoryos-0.1.9}/ivoryos/routes/database/templates/database/experiment_database.html
RENAMED
|
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
|