ivoryos 0.1.15__tar.gz → 0.1.17__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.

Files changed (54) hide show
  1. {ivoryos-0.1.15/ivoryos.egg-info → ivoryos-0.1.17}/PKG-INFO +10 -2
  2. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/__init__.py +38 -19
  3. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/main/main.py +1 -1
  4. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/templates/base.html +8 -5
  5. ivoryos-0.1.17/ivoryos/version.py +1 -0
  6. {ivoryos-0.1.15 → ivoryos-0.1.17/ivoryos.egg-info}/PKG-INFO +10 -2
  7. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos.egg-info/SOURCES.txt +1 -0
  8. {ivoryos-0.1.15 → ivoryos-0.1.17}/setup.py +9 -2
  9. {ivoryos-0.1.15 → ivoryos-0.1.17}/LICENSE +0 -0
  10. {ivoryos-0.1.15 → ivoryos-0.1.17}/MANIFEST.in +0 -0
  11. {ivoryos-0.1.15 → ivoryos-0.1.17}/README.md +0 -0
  12. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/config.py +0 -0
  13. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/__init__.py +0 -0
  14. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/auth/__init__.py +0 -0
  15. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/auth/auth.py +0 -0
  16. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/auth/templates/auth/login.html +0 -0
  17. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/auth/templates/auth/signup.html +0 -0
  18. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/control/__init__.py +0 -0
  19. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/control/control.py +0 -0
  20. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/control/templates/control/controllers.html +0 -0
  21. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/control/templates/control/controllers_home.html +0 -0
  22. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/control/templates/control/controllers_new.html +0 -0
  23. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/database/__init__.py +0 -0
  24. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/database/database.py +0 -0
  25. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/database/templates/database/experiment_database.html +0 -0
  26. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/design/__init__.py +0 -0
  27. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/design/design.py +0 -0
  28. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/design/templates/design/experiment_builder.html +0 -0
  29. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/design/templates/design/experiment_run.html +0 -0
  30. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/main/__init__.py +0 -0
  31. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/main/templates/main/help.html +0 -0
  32. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/main/templates/main/home.html +0 -0
  33. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/monitor/monitor.py +0 -0
  34. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/routes/monitor/templates/monitor/monitor.html +0 -0
  35. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/favicon.ico +0 -0
  36. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/gui_annotation/Slide1.png +0 -0
  37. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/gui_annotation/Slide2.PNG +0 -0
  38. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/js/overlay.js +0 -0
  39. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/js/socket_handler.js +0 -0
  40. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/js/sortable_card.js +0 -0
  41. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/js/sortable_design.js +0 -0
  42. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/logo.webp +0 -0
  43. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/static/style.css +0 -0
  44. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/utils/__init__.py +0 -0
  45. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/utils/db_models.py +0 -0
  46. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/utils/form.py +0 -0
  47. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/utils/global_config.py +0 -0
  48. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/utils/llm_agent.py +0 -0
  49. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/utils/script_runner.py +0 -0
  50. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos/utils/utils.py +0 -0
  51. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos.egg-info/dependency_links.txt +0 -0
  52. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos.egg-info/requires.txt +0 -0
  53. {ivoryos-0.1.15 → ivoryos-0.1.17}/ivoryos.egg-info/top_level.txt +0 -0
  54. {ivoryos-0.1.15 → ivoryos-0.1.17}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: ivoryos
3
- Version: 0.1.15
3
+ Version: 0.1.17
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
@@ -16,6 +16,14 @@ Requires-Dist: Flask-SQLAlchemy
16
16
  Requires-Dist: Flask-WTF
17
17
  Requires-Dist: SQLAlchemy-Utils
18
18
  Requires-Dist: python-dotenv
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: requires-dist
26
+ Dynamic: summary
19
27
 
20
28
  [![Documentation Status](https://readthedocs.org/projects/ivoryos/badge/?version=latest)](https://ivoryos.readthedocs.io/en/latest/?badge=latest)
21
29
  [![PyPI version](https://img.shields.io/pypi/v/ivoryos)](https://pypi.org/project/ivoryos/)
@@ -1,8 +1,10 @@
1
+ import importlib
2
+ import inspect
1
3
  import os
2
4
  import sys
3
5
  from typing import Union
4
6
 
5
- from flask import Flask, redirect, url_for
7
+ from flask import Flask, redirect, url_for, Blueprint, g
6
8
 
7
9
  from ivoryos.config import Config, get_config
8
10
  from ivoryos.routes.auth.auth import auth, login_manager
@@ -10,13 +12,13 @@ from ivoryos.routes.control.control import control
10
12
  from ivoryos.routes.database.database import database
11
13
  from ivoryos.routes.design.design import design, socketio
12
14
  from ivoryos.routes.main.main import main
13
- from ivoryos.routes.monitor.monitor import monitor
15
+ # from ivoryos.routes.monitor.monitor import monitor
14
16
  from ivoryos.utils import utils
15
17
  from ivoryos.utils.db_models import db
16
18
  from ivoryos.utils.global_config import GlobalConfig
17
19
  from ivoryos.utils.script_runner import ScriptRunner
18
- from version import __version__ as ivoryos_version
19
-
20
+ from ivoryos.version import __version__ as ivoryos_version
21
+ from importlib.metadata import entry_points
20
22
  global_config = GlobalConfig()
21
23
 
22
24
  url_prefix = os.getenv('URL_PREFIX', "/ivoryos")
@@ -51,7 +53,6 @@ def create_app(config_class=None):
51
53
  Called before
52
54
 
53
55
  """
54
- from flask import g
55
56
  g.logger = logger
56
57
  g.socketio = socketio
57
58
 
@@ -66,7 +67,7 @@ def run(module=None, host="0.0.0.0", port=None, debug=None, llm_server=None, mod
66
67
  config: Config = None,
67
68
  logger: Union[str, list] = None,
68
69
  logger_output_name: str = None,
69
- enable_design=True, stream_address=None
70
+ enable_design=True
70
71
  ):
71
72
  """
72
73
  Start ivoryOS app server.
@@ -80,30 +81,29 @@ def run(module=None, host="0.0.0.0", port=None, debug=None, llm_server=None, mod
80
81
  :param config: config class, defaults to None
81
82
  :param logger: logger name of list of logger names, defaults to None
82
83
  :param logger_output_name: log file save name of logger, defaults to None, and will use "default.log"
83
- :param enable_design:
84
+ :param enable_design: enable design canvas, database and workflow execution
84
85
  :param stream_address:
85
86
  """
86
87
  app = create_app(config_class=config or get_config()) # Create app instance using factory function
87
- enable_monitor = stream_address is not None
88
+
89
+ app.register_blueprint(main, url_prefix=url_prefix)
90
+ app.register_blueprint(auth, url_prefix=url_prefix)
91
+ app.register_blueprint(control, url_prefix=url_prefix)
92
+
93
+ if enable_design:
94
+ app.register_blueprint(design, url_prefix=url_prefix)
95
+ app.register_blueprint(database, url_prefix=url_prefix)
96
+
97
+ plugins = load_plugins(app, socketio)
88
98
 
89
99
  def inject_nav_config():
90
100
  """Make NAV_CONFIG available globally to all templates."""
91
101
  return dict(
92
102
  enable_design=enable_design,
93
- enable_monitor=enable_monitor,
103
+ plugins=plugins,
94
104
  )
95
105
 
96
- # todo modular page
97
106
  app.context_processor(inject_nav_config)
98
- app.register_blueprint(main, url_prefix=url_prefix)
99
- app.register_blueprint(auth, url_prefix=url_prefix)
100
- if enable_design:
101
- app.register_blueprint(design, url_prefix=url_prefix)
102
- app.register_blueprint(database, url_prefix=url_prefix)
103
- if enable_monitor:
104
- app.register_blueprint(monitor, url_prefix=url_prefix)
105
- app.register_blueprint(control, url_prefix=url_prefix)
106
-
107
107
  port = port or int(os.environ.get("PORT", 8000))
108
108
  debug = debug if debug is not None else app.config.get('DEBUG', True)
109
109
 
@@ -115,6 +115,7 @@ def run(module=None, host="0.0.0.0", port=None, debug=None, llm_server=None, mod
115
115
  app.config["MODULE"] = module
116
116
  app.config["OFF_LINE"] = False
117
117
  global_config.deck = sys.modules[module]
118
+ # global_config.heinsight = HeinsightAPI("http://127.0.0.1:8080")
118
119
  global_config.deck_snapshot = utils.create_deck_snapshot(global_config.deck,
119
120
  output_path=app.config["DUMMY_DECK"], save=True)
120
121
  # global_config.runner = ScriptRunner(globals())
@@ -137,3 +138,21 @@ def run(module=None, host="0.0.0.0", port=None, debug=None, llm_server=None, mod
137
138
  utils.start_logger(socketio, log_filename=logger_path, logger_name=log)
138
139
  socketio.run(app, host=host, port=port, debug=debug, use_reloader=False, allow_unsafe_werkzeug=True)
139
140
  # return app
141
+
142
+
143
+ def load_plugins(app, socketio):
144
+ """
145
+ Dynamically load installed plugins and attach Flask-SocketIO.
146
+ """
147
+ plugin_names = []
148
+ for entry_point in entry_points().get("ivoryos.plugins", []):
149
+ plugin = entry_point.load()
150
+
151
+ # If the plugin has an `init_socketio()` function, pass socketio
152
+ if hasattr(plugin, 'init_socketio'):
153
+ plugin.init_socketio(socketio)
154
+
155
+ plugin_names.append(entry_point.name)
156
+ app.register_blueprint(getattr(plugin, entry_point.name), url_prefix=f"{url_prefix}/{entry_point.name}")
157
+
158
+ return plugin_names
@@ -1,6 +1,6 @@
1
1
  from flask import Blueprint, render_template, current_app
2
2
  from flask_login import login_required
3
- from version import __version__ as ivoryos_version
3
+ from ivoryos.version import __version__ as ivoryos_version
4
4
 
5
5
  main = Blueprint('main', __name__, template_folder='templates/main')
6
6
 
@@ -47,11 +47,7 @@
47
47
  <a class="nav-link" href="{{ url_for('design.experiment_run') }}">Compile/Run</a>
48
48
  </li>
49
49
  {% endif %}
50
- {% if enable_monitor %}
51
- <li class="nav-item">
52
- <a class="nav-link" href="{{ url_for('monitor.stream_feed') }}">Monitor</a></li>
53
- </li>
54
- {% endif %}
50
+
55
51
  <li class="nav-item">
56
52
  <a class="nav-link" href="{{ url_for('control.deck_controllers') }}">Devices</a></li>
57
53
  </li>
@@ -61,6 +57,13 @@
61
57
  <li class="nav-item">
62
58
  <a class="nav-link" href="{{ url_for('main.help_info') }}">About</a>
63
59
  </li>
60
+ {% if plugins %}
61
+ {% for plugin in plugins %}
62
+ <li class="nav-item">
63
+ <a class="nav-link" href="{{ url_for(plugin+'.main') }}">{{ plugin.capitalize() }}</a></li>
64
+ </li>
65
+ {% endfor %}
66
+ {% endif %}
64
67
  </ul>
65
68
  <ul class="navbar-nav ms-auto">
66
69
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.17"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: ivoryos
3
- Version: 0.1.15
3
+ Version: 0.1.17
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
@@ -16,6 +16,14 @@ Requires-Dist: Flask-SQLAlchemy
16
16
  Requires-Dist: Flask-WTF
17
17
  Requires-Dist: SQLAlchemy-Utils
18
18
  Requires-Dist: python-dotenv
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: requires-dist
26
+ Dynamic: summary
19
27
 
20
28
  [![Documentation Status](https://readthedocs.org/projects/ivoryos/badge/?version=latest)](https://ivoryos.readthedocs.io/en/latest/?badge=latest)
21
29
  [![PyPI version](https://img.shields.io/pypi/v/ivoryos)](https://pypi.org/project/ivoryos/)
@@ -4,6 +4,7 @@ README.md
4
4
  setup.py
5
5
  ivoryos/__init__.py
6
6
  ivoryos/config.py
7
+ ivoryos/version.py
7
8
  ivoryos.egg-info/PKG-INFO
8
9
  ivoryos.egg-info/SOURCES.txt
9
10
  ivoryos.egg-info/dependency_links.txt
@@ -1,9 +1,16 @@
1
1
  from setuptools import setup, find_packages
2
- from version import __version__ as ivoryos_version
2
+
3
+
4
+ def get_version():
5
+ version = {}
6
+ with open("ivoryos/version.py") as f:
7
+ exec(f.read(), version)
8
+ return version["__version__"]
9
+
3
10
 
4
11
  setup(
5
12
  name='ivoryos',
6
- version=ivoryos_version,
13
+ version=get_version(),
7
14
  packages=find_packages(exclude=['example', 'example.*', 'docs', 'docs.*']),
8
15
  include_package_data=True,
9
16
  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