ivoryos 1.0.9__py3-none-any.whl → 1.1.0__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.

Files changed (78) hide show
  1. ivoryos/__init__.py +18 -6
  2. ivoryos/routes/api/api.py +109 -0
  3. ivoryos/routes/auth/auth.py +5 -5
  4. ivoryos/routes/control/control.py +55 -353
  5. ivoryos/routes/control/control_file.py +36 -0
  6. ivoryos/routes/control/control_new_device.py +142 -0
  7. ivoryos/routes/control/templates/controllers.html +137 -0
  8. ivoryos/routes/control/templates/controllers_new.html +112 -0
  9. ivoryos/routes/control/utils.py +38 -0
  10. ivoryos/routes/data/data.py +108 -0
  11. ivoryos/routes/{database/templates/database → data/templates}/workflow_database.html +7 -7
  12. ivoryos/routes/{database/templates/database → data/templates}/workflow_view.html +3 -3
  13. ivoryos/routes/design/__init__.py +4 -0
  14. ivoryos/routes/design/design.py +96 -517
  15. ivoryos/routes/design/design_file.py +57 -0
  16. ivoryos/routes/design/design_step.py +43 -0
  17. ivoryos/routes/design/templates/components/action_form.html +52 -0
  18. ivoryos/routes/design/templates/components/action_list.html +15 -0
  19. ivoryos/routes/design/templates/components/autofill_toggle.html +14 -0
  20. ivoryos/routes/design/templates/components/canvas.html +14 -0
  21. ivoryos/routes/design/templates/components/canvas_footer.html +5 -0
  22. ivoryos/routes/design/templates/components/canvas_header.html +54 -0
  23. ivoryos/routes/design/templates/components/deck_selector.html +12 -0
  24. ivoryos/routes/design/templates/components/edit_action_form.html +29 -0
  25. ivoryos/routes/design/templates/components/instrument_panel.html +23 -0
  26. ivoryos/routes/design/templates/components/modals/drop_modal.html +19 -0
  27. ivoryos/routes/design/templates/components/modals/json_modal.html +22 -0
  28. ivoryos/routes/design/templates/components/modals/new_script_modal.html +18 -0
  29. ivoryos/routes/design/templates/components/modals/rename_modal.html +23 -0
  30. ivoryos/routes/design/templates/components/modals/saveas_modal.html +27 -0
  31. ivoryos/routes/design/templates/components/modals.html +6 -0
  32. ivoryos/routes/design/templates/components/operations_panel.html +43 -0
  33. ivoryos/routes/design/templates/components/python_code_overlay.html +17 -0
  34. ivoryos/routes/design/templates/components/script_info.html +31 -0
  35. ivoryos/routes/design/templates/components/scripts.html +50 -0
  36. ivoryos/routes/design/templates/components/sidebar.html +16 -0
  37. ivoryos/routes/design/templates/components/text_to_code_panel.html +20 -0
  38. ivoryos/routes/design/templates/experiment_builder.html +41 -0
  39. ivoryos/routes/execute/__init__.py +0 -0
  40. ivoryos/routes/execute/execute.py +173 -0
  41. ivoryos/routes/execute/execute_file.py +44 -0
  42. ivoryos/routes/execute/templates/components/error_modal.html +20 -0
  43. ivoryos/routes/execute/templates/components/logging_panel.html +31 -0
  44. ivoryos/routes/execute/templates/components/progress_panel.html +27 -0
  45. ivoryos/routes/execute/templates/components/run_panel.html +9 -0
  46. ivoryos/routes/execute/templates/components/run_tabs.html +17 -0
  47. ivoryos/routes/execute/templates/components/tab_bayesian.html +147 -0
  48. ivoryos/routes/execute/templates/components/tab_configuration.html +98 -0
  49. ivoryos/routes/execute/templates/components/tab_repeat.html +14 -0
  50. ivoryos/routes/execute/templates/experiment_run.html +294 -0
  51. ivoryos/routes/library/__init__.py +0 -0
  52. ivoryos/routes/{database/database.py → library/library.py} +10 -112
  53. ivoryos/routes/{database/templates/database/scripts_database.html → library/templates/library.html} +8 -8
  54. ivoryos/routes/main/main.py +1 -1
  55. ivoryos/routes/main/templates/{main/home.html → home.html} +4 -4
  56. ivoryos/socket_handlers.py +52 -0
  57. ivoryos/templates/base.html +4 -4
  58. ivoryos/utils/bo_campaign.py +43 -3
  59. ivoryos/utils/form.py +1 -0
  60. ivoryos/utils/py_to_json.py +225 -0
  61. ivoryos/utils/script_runner.py +30 -7
  62. ivoryos/version.py +1 -1
  63. {ivoryos-1.0.9.dist-info → ivoryos-1.1.0.dist-info}/METADATA +5 -8
  64. ivoryos-1.1.0.dist-info/RECORD +102 -0
  65. ivoryos/routes/control/templates/control/controllers.html +0 -78
  66. ivoryos/routes/control/templates/control/controllers_home.html +0 -55
  67. ivoryos/routes/control/templates/control/controllers_new.html +0 -89
  68. ivoryos/routes/design/templates/design/experiment_builder.html +0 -521
  69. ivoryos/routes/design/templates/design/experiment_run.html +0 -558
  70. ivoryos-1.0.9.dist-info/RECORD +0 -61
  71. /ivoryos/routes/auth/templates/{auth/login.html → login.html} +0 -0
  72. /ivoryos/routes/auth/templates/{auth/signup.html → signup.html} +0 -0
  73. /ivoryos/routes/{database → data}/__init__.py +0 -0
  74. /ivoryos/routes/{database/templates/database → data/templates/components}/step_card.html +0 -0
  75. /ivoryos/routes/main/templates/{main/help.html → help.html} +0 -0
  76. {ivoryos-1.0.9.dist-info → ivoryos-1.1.0.dist-info}/LICENSE +0 -0
  77. {ivoryos-1.0.9.dist-info → ivoryos-1.1.0.dist-info}/WHEEL +0 -0
  78. {ivoryos-1.0.9.dist-info → ivoryos-1.1.0.dist-info}/top_level.txt +0 -0
@@ -1,55 +0,0 @@
1
- {% extends 'base.html' %}
2
- {% block title %}IvoryOS | Devices{% endblock %}
3
- {% block body %}
4
- <div class="row">
5
- {% if defined_variables %}
6
- {% for instrument in defined_variables %}
7
- <div class="col-xl-3 col-lg-4 col-md-6 mb-4 ">
8
- <div class="bg-white rounded shadow-sm position-relative">
9
- {% if deck %}
10
- {# <a href="{{ url_for('control.disconnect', instrument=instrument) }}" class="stretched-link controller-card" style="float: right;color: red; position: relative;">Disconnect <i class="bi bi-x-square"></i></a>#}
11
- <div class="p-4 controller-card">
12
- <h5 class=""><a href="{{ url_for('control.controllers', instrument=instrument) }}" class="text-dark stretched-link">{{instrument.split(".")[1]}}</a></h5>
13
- </div>
14
- {% else %}
15
- <div class="p-4 controller-card">
16
- <h5 class=""><a href="{{ url_for('control.controllers', instrument=instrument) }}" class="text-dark stretched-link">{{instrument}}</a></h5>
17
- </div>
18
- {% endif %}
19
- </div>
20
- </div>
21
- {% endfor %}
22
- <div class="d-flex mb-3">
23
- <a href="{{ url_for('control.download_proxy', filetype='proxy') }}" class="btn btn-outline-primary">
24
- <i class="bi bi-download"></i> Download remote control script
25
- </a>
26
- </div>
27
- {% if not deck %}
28
- <div class="col-xl-3 col-lg-4 col-md-6 mb-4 ">
29
- <div class="bg-white rounded shadow-sm position-relative">
30
- <div class="p-4 controller-card" >
31
- {% if deck %}
32
- {# todo disconnect for imported deck #}
33
- {# <h5> <a href="{{ url_for("disconnect") }}" class="stretched-link" style="color: orangered">Disconnect deck</a></h5>#}
34
- {% else %}
35
- <h5><a href="{{ url_for('control.new_controller') }}" style="color: orange" class="stretched-link">New connection</a></h5>
36
- {% endif %}
37
- </div>
38
- </div>
39
- </div>
40
- {% endif %}
41
- {% else %}
42
- <div class="col-xl-3 col-lg-4 col-md-6 mb-4 ">
43
- <div class="bg-white rounded shadow-sm position-relative">
44
- <div class="p-4 controller-card" >
45
- {% if deck %}
46
- <h5><a data-bs-toggle="modal" href="#importModal" class="stretched-link"><i class="bi bi-folder-plus"></i> Import deck </a></h5>
47
- {% else %}
48
- <h5><a href="{{ url_for('control.new_controller') }}" style="color: orange" class="stretched-link">New connection</a></h5>
49
- {% endif %}
50
- </div>
51
- </div>
52
- </div>
53
- {% endif %}
54
- </div>
55
- {% endblock %}
@@ -1,89 +0,0 @@
1
- {% extends 'base.html' %}
2
- {% block title %}IvoryOS | New devices{% endblock %}
3
-
4
- {% block body %}
5
- <div class="row">
6
- <div class="col-xl-4 col-lg-4 col-md-6 mb-4 ">
7
- <h5>Available Python API</h5>
8
- <hr>
9
- {% for instrument in api_variables %}
10
- <div class="bg-white rounded shadow-sm position-relative">
11
- <h5 class="p-3 controller-card">
12
- <a href="{{ url_for('control.new_controller', instrument=instrument) }}" class="text-dark stretched-link">{{instrument}}</a>
13
- </h5>
14
- </div>
15
- {% endfor %}
16
- <div class="bg-white rounded shadow-sm position-relative">
17
- <h5 class="p-3 controller-card">
18
- <a data-bs-toggle="modal" href="#importAPI" class="stretched-link"><i class="bi bi-folder-plus"></i> Import API</a>
19
- </h5>
20
- </div>
21
- </div>
22
- <div class="col-xl-5 col-lg-5 col-md-6 mb-4 ">
23
- {% if device %}
24
- <h5>Connecting</h5><hr>
25
- <form role="form" method='POST' name="init" action="{{ url_for('control.new_controller', instrument=instrument) }}">
26
- <div class="form-group">
27
- <div class="input-group mb-3">
28
- <span class="input-group-text" >Name this device</span>
29
- <input class="form-control" type="text" id="device_name" name="device_name" aria-labelledby="nameHelpBlock" placeholder="e.g. {{device.__name__}}_1" >
30
- <div id="nameHelpBlock" class="form-text">
31
- Name your instrument, avoid names that are defined on the right
32
- </div>
33
- </div>
34
- {% for arg in device.__init__.__annotations__ %}
35
- {% if not arg == "return" %}
36
- <div class="input-group mb-3">
37
- <span class="input-group-text" >{{arg}}</span>
38
- <input class="form-control" type="text" id="{{arg}}" name="{{arg}}"
39
- placeholder="{{device.__init__.__annotations__[arg].__name__}}"
40
- value="{{args.parameters[arg].default if not args.parameters[arg].default.__name__ == '_empty' else ''}}">
41
- {% if device.__init__.__annotations__[arg].__module__ is not in ["builtins", "typing"] %}
42
- <a role="button" href="{{ url_for('control.new_controller', instrument=device.__init__.__annotations__[arg].__name__) }}" class="btn btn-secondary">initialize {{device.__init__.__annotations__[arg].__name__}} first</a>
43
- {% endif %}
44
- </div>
45
- {% endif %}
46
- {% endfor %}
47
- <button type="submit" class="btn btn-dark">Connect</button>
48
- </div>
49
- </form>
50
- {% endif %}
51
- </div>
52
- <div class="col-xl-3 col-lg-3 col-md-6 mb-4">
53
- <h5>Defined Instruments</h5><hr>
54
- {% if defined_variables %}
55
- <ul class="list-group">
56
- {% for instrument in defined_variables %}
57
- <li class="list-group-item">{{instrument}}</li>
58
- {% endfor %}
59
- </ul>
60
- {% endif %}
61
- </div>
62
- </div>
63
-
64
-
65
- <div class="modal fade" id="importAPI" tabindex="-1" aria-labelledby="importModal" aria-hidden="true" >
66
- <div class="modal-dialog">
67
- <div class="modal-content">
68
- <div class="modal-header">
69
- <h1 class="modal-title fs-5" id="importModal">Import API by file path</h1>
70
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
71
- </div>
72
- <form method="POST" action="{{ url_for('control.import_api') }}" enctype="multipart/form-data">
73
- <div class="modal-body">
74
- <h5>input manually</h5>
75
- <div class="input-group mb-3">
76
- <label class="input-group-text" for="filepath">File Path:</label>
77
- <input type="text" class="form-control" name="filepath" id="filepath">
78
- </div>
79
- <div class="modal-footer">
80
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> Close </button>
81
- <button type="submit" class="btn btn-primary"> Save </button>
82
- </div>
83
- </div>
84
- </form>
85
- </div>
86
- </div>
87
- </div>
88
-
89
- {% endblock %}