ivoryos 0.1.14__tar.gz → 0.1.16__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 (55) hide show
  1. {ivoryos-0.1.14/ivoryos.egg-info → ivoryos-0.1.16}/PKG-INFO +1 -1
  2. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/__init__.py +23 -6
  3. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/main/templates/main/home.html +19 -17
  4. ivoryos-0.1.16/ivoryos/routes/monitor/monitor.py +21 -0
  5. ivoryos-0.1.16/ivoryos/routes/monitor/templates/monitor/monitor.html +24 -0
  6. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/templates/base.html +17 -10
  7. ivoryos-0.1.16/ivoryos/version.py +1 -0
  8. {ivoryos-0.1.14 → ivoryos-0.1.16/ivoryos.egg-info}/PKG-INFO +1 -1
  9. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos.egg-info/SOURCES.txt +2 -0
  10. {ivoryos-0.1.14 → ivoryos-0.1.16}/setup.py +9 -2
  11. ivoryos-0.1.14/ivoryos/version.py +0 -1
  12. {ivoryos-0.1.14 → ivoryos-0.1.16}/LICENSE +0 -0
  13. {ivoryos-0.1.14 → ivoryos-0.1.16}/MANIFEST.in +0 -0
  14. {ivoryos-0.1.14 → ivoryos-0.1.16}/README.md +0 -0
  15. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/config.py +0 -0
  16. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/__init__.py +0 -0
  17. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/auth/__init__.py +0 -0
  18. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/auth/auth.py +0 -0
  19. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/auth/templates/auth/login.html +0 -0
  20. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/auth/templates/auth/signup.html +0 -0
  21. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/control/__init__.py +0 -0
  22. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/control/control.py +0 -0
  23. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/control/templates/control/controllers.html +0 -0
  24. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/control/templates/control/controllers_home.html +0 -0
  25. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/control/templates/control/controllers_new.html +0 -0
  26. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/database/__init__.py +0 -0
  27. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/database/database.py +0 -0
  28. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/database/templates/database/experiment_database.html +0 -0
  29. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/design/__init__.py +0 -0
  30. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/design/design.py +0 -0
  31. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/design/templates/design/experiment_builder.html +0 -0
  32. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/design/templates/design/experiment_run.html +0 -0
  33. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/main/__init__.py +0 -0
  34. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/main/main.py +0 -0
  35. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/routes/main/templates/main/help.html +0 -0
  36. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/favicon.ico +0 -0
  37. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/gui_annotation/Slide1.png +0 -0
  38. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/gui_annotation/Slide2.PNG +0 -0
  39. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/js/overlay.js +0 -0
  40. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/js/socket_handler.js +0 -0
  41. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/js/sortable_card.js +0 -0
  42. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/js/sortable_design.js +0 -0
  43. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/logo.webp +0 -0
  44. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/static/style.css +0 -0
  45. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/utils/__init__.py +0 -0
  46. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/utils/db_models.py +0 -0
  47. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/utils/form.py +0 -0
  48. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/utils/global_config.py +0 -0
  49. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/utils/llm_agent.py +0 -0
  50. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/utils/script_runner.py +0 -0
  51. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos/utils/utils.py +0 -0
  52. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos.egg-info/dependency_links.txt +0 -0
  53. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos.egg-info/requires.txt +0 -0
  54. {ivoryos-0.1.14 → ivoryos-0.1.16}/ivoryos.egg-info/top_level.txt +0 -0
  55. {ivoryos-0.1.14 → ivoryos-0.1.16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ivoryos
3
- Version: 0.1.14
3
+ Version: 0.1.16
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
@@ -10,6 +10,7 @@ from ivoryos.routes.control.control import control
10
10
  from ivoryos.routes.database.database import database
11
11
  from ivoryos.routes.design.design import design, socketio
12
12
  from ivoryos.routes.main.main import main
13
+ from ivoryos.routes.monitor.monitor import monitor
13
14
  from ivoryos.utils import utils
14
15
  from ivoryos.utils.db_models import db
15
16
  from ivoryos.utils.global_config import GlobalConfig
@@ -20,11 +21,6 @@ global_config = GlobalConfig()
20
21
 
21
22
  url_prefix = os.getenv('URL_PREFIX', "/ivoryos")
22
23
  app = Flask(__name__, static_url_path=f'{url_prefix}/static', static_folder='static')
23
- app.register_blueprint(main, url_prefix=url_prefix)
24
- app.register_blueprint(auth, url_prefix=url_prefix)
25
- app.register_blueprint(design, url_prefix=url_prefix)
26
- app.register_blueprint(database, url_prefix=url_prefix)
27
- app.register_blueprint(control, url_prefix=url_prefix)
28
24
 
29
25
 
30
26
  def create_app(config_class=None):
@@ -70,6 +66,7 @@ def run(module=None, host="0.0.0.0", port=None, debug=None, llm_server=None, mod
70
66
  config: Config = None,
71
67
  logger: Union[str, list] = None,
72
68
  logger_output_name: str = None,
69
+ enable_design=True, stream_address=None
73
70
  ):
74
71
  """
75
72
  Start ivoryOS app server.
@@ -83,9 +80,29 @@ def run(module=None, host="0.0.0.0", port=None, debug=None, llm_server=None, mod
83
80
  :param config: config class, defaults to None
84
81
  :param logger: logger name of list of logger names, defaults to None
85
82
  :param logger_output_name: log file save name of logger, defaults to None, and will use "default.log"
86
-
83
+ :param enable_design:
84
+ :param stream_address:
87
85
  """
88
86
  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
+ def inject_nav_config():
90
+ """Make NAV_CONFIG available globally to all templates."""
91
+ return dict(
92
+ enable_design=enable_design,
93
+ enable_monitor=enable_monitor,
94
+ )
95
+
96
+ # todo modular page
97
+ 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)
89
106
 
90
107
  port = port or int(os.environ.get("PORT", 8000))
91
108
  debug = debug if debug is not None else app.config.get('DEBUG', True)
@@ -9,32 +9,32 @@
9
9
  </h1>
10
10
  <p>Version: {{ version }}</p>
11
11
  <div class="row">
12
-
13
- <div class="col-lg-6 mb-4 d-flex align-items-stretch">
14
- <div class="card rounded shadow-sm flex-fill">
15
- <div class="card-body">
16
- <h5 class="card-title">Browse designs</h5>
17
- <p class="card-text">Browse all workflows saved in the database.</p>
18
- <a href="{{ url_for('database.load_from_database') }}" class="stretched-link"></a>
12
+ {% if enable_design %}
13
+ <div class="col-lg-6 mb-4 d-flex align-items-stretch">
14
+ <div class="card rounded shadow-sm flex-fill">
15
+ <div class="card-body">
16
+ <h5 class="card-title">Browse designs</h5>
17
+ <p class="card-text">Browse all workflows saved in the database.</p>
18
+ <a href="{{ url_for('database.load_from_database') }}" class="stretched-link"></a>
19
+ </div>
19
20
  </div>
20
21
  </div>
21
- </div>
22
- <div class="col-lg-6 mb-4 d-flex align-items-stretch">
23
- <div class="card rounded shadow-sm flex-fill">
24
- <div class="card-body">
25
- <h5 class="card-title">Edit designs</h5>
26
- <p class="card-text">Build your workflow from current deck functions.</p>
27
- <a href="{{ url_for('design.experiment_builder') }}" class="stretched-link"></a>
22
+ <div class="col-lg-6 mb-4 d-flex align-items-stretch">
23
+ <div class="card rounded shadow-sm flex-fill">
24
+ <div class="card-body">
25
+ <h5 class="card-title">Edit designs</h5>
26
+ <p class="card-text">Build your workflow from current deck functions.</p>
27
+ <a href="{{ url_for('design.experiment_builder') }}" class="stretched-link"></a>
28
+ </div>
28
29
  </div>
29
30
  </div>
30
- </div>
31
+ {% endif %}
31
32
  </div>
32
33
 
33
34
  <br><br><br>
34
35
  {% if not off_line %}
35
- {# <h5>Only available in online mode</h5>#}
36
- {# <hr>#}
37
36
  <div class="row">
37
+ {% if enable_design %}
38
38
  <div class="col-lg-6 mb-4 d-flex align-items-stretch">
39
39
  <div class="card rounded shadow-sm flex-fill">
40
40
  <div class="card-body">
@@ -44,6 +44,8 @@
44
44
  </div>
45
45
  </div>
46
46
  </div>
47
+ {% endif %}
48
+
47
49
  <div class="col-lg-6 mb-4 d-flex align-items-stretch">
48
50
  <div class="card rounded shadow-sm flex-fill">
49
51
  <div class="card-body">
@@ -0,0 +1,21 @@
1
+ from flask import Blueprint, flash, render_template
2
+ from flask_login import login_required
3
+
4
+ from ivoryos.utils.global_config import GlobalConfig
5
+
6
+ global_config = GlobalConfig()
7
+
8
+ monitor = Blueprint('monitor', __name__, template_folder='templates/monitor')
9
+
10
+
11
+ @monitor.route("/stream_feed")
12
+ @login_required
13
+ def stream_feed():
14
+ """
15
+ .. :quickref: Monitor; stream feed
16
+
17
+ display feed by ip address
18
+ e.g. HeinSight output feed
19
+ .. http:get:: /my_deck
20
+ """
21
+ return render_template('monitor.html', stream_address="http://127.0.0.1:8001/frame")
@@ -0,0 +1,24 @@
1
+ {% extends 'base.html' %}
2
+ {% block title %}IvoryOS | Monitor {% endblock %}
3
+
4
+ {% block body %}
5
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.4.1/socket.io.js"></script>
6
+
7
+ <h1>Live Stream</h1>
8
+ <img src="{{ stream_address }}" width="800" height="600">
9
+
10
+ {% if no_deck_warning and not dismiss %}
11
+ {# auto pop import when there is no deck#}
12
+ <script type="text/javascript">
13
+ function OpenBootstrapPopup() {
14
+ $("#importModal").modal('show');
15
+ }
16
+ window.onload = function () {
17
+ OpenBootstrapPopup();
18
+ };
19
+ </script>
20
+ {% endif %}
21
+
22
+ <script src="{{ url_for('static', filename='js/socket_handler.js') }}"></script>
23
+
24
+ {% endblock %}
@@ -23,7 +23,7 @@
23
23
  <body>
24
24
  <nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
25
25
  <div class= "container">
26
-
26
+ {# {{ module_config }}#}
27
27
  <a class="navbar-brand" href="{{ url_for('main.index') }}">
28
28
  <img src="{{url_for('static', filename='logo.webp')}}" alt="Logo" height="60" class="d-inline-block align-text-bottom">
29
29
  </a>
@@ -36,15 +36,22 @@
36
36
  <li class="nav-item">
37
37
  <a class="nav-link" href="{{ url_for('main.index') }}" aria-current="page">Home</a>
38
38
  </li>
39
- <li class="nav-item">
40
- <a class="nav-link" href="{{ url_for('database.load_from_database') }}" aria-current="page">Library</a>
41
- </li>
42
- <li class="nav-item">
43
- <a class="nav-link" href="{{ url_for('design.experiment_builder') }}">Design</a>
44
- </li>
45
- <li class="nav-item">
46
- <a class="nav-link" href="{{ url_for('design.experiment_run') }}">Compile/Run</a>
47
- </li>
39
+ {% if enable_design %}
40
+ <li class="nav-item">
41
+ <a class="nav-link" href="{{ url_for('database.load_from_database') }}" aria-current="page">Library</a>
42
+ </li>
43
+ <li class="nav-item">
44
+ <a class="nav-link" href="{{ url_for('design.experiment_builder') }}">Design</a>
45
+ </li>
46
+ <li class="nav-item">
47
+ <a class="nav-link" href="{{ url_for('design.experiment_run') }}">Compile/Run</a>
48
+ </li>
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 %}
48
55
  <li class="nav-item">
49
56
  <a class="nav-link" href="{{ url_for('control.deck_controllers') }}">Devices</a></li>
50
57
  </li>
@@ -0,0 +1 @@
1
+ __version__ = "0.1.16"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ivoryos
3
- Version: 0.1.14
3
+ Version: 0.1.16
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
@@ -31,6 +31,8 @@ ivoryos/routes/main/__init__.py
31
31
  ivoryos/routes/main/main.py
32
32
  ivoryos/routes/main/templates/main/help.html
33
33
  ivoryos/routes/main/templates/main/home.html
34
+ ivoryos/routes/monitor/monitor.py
35
+ ivoryos/routes/monitor/templates/monitor/monitor.html
34
36
  ivoryos/static/favicon.ico
35
37
  ivoryos/static/logo.webp
36
38
  ivoryos/static/style.css
@@ -1,9 +1,16 @@
1
1
  from setuptools import setup, find_packages
2
- from ivoryos.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',
@@ -1 +0,0 @@
1
- __version__ = "0.1.14"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes