PyMieSimX 0.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.
- PyMieSimX/__init__.py +5 -0
- PyMieSimX/__main__.py +35 -0
- PyMieSimX/gui/__init__.py +5 -0
- PyMieSimX/gui/assets/card-state.js +41 -0
- PyMieSimX/gui/assets/dashboard.css +3352 -0
- PyMieSimX/gui/assets/default-settings.json +32 -0
- PyMieSimX/gui/assets/logo.png +0 -0
- PyMieSimX/gui/assets/pymiesim-favicon.svg +6 -0
- PyMieSimX/gui/assets/pymiesim-logo-dark.svg +15 -0
- PyMieSimX/gui/assets/pymiesim-logo.svg +39 -0
- PyMieSimX/gui/components/__init__.py +5 -0
- PyMieSimX/gui/components/cards.py +64 -0
- PyMieSimX/gui/defaults.py +18 -0
- PyMieSimX/gui/interface.py +688 -0
- PyMieSimX/gui/layout.py +329 -0
- PyMieSimX/gui/pages/__init__.py +9 -0
- PyMieSimX/gui/pages/citation.py +66 -0
- PyMieSimX/gui/pages/documentation.py +132 -0
- PyMieSimX/gui/pages/experiment/__init__.py +5 -0
- PyMieSimX/gui/pages/experiment/page.py +49 -0
- PyMieSimX/gui/pages/experiment/sections/__init__.py +5 -0
- PyMieSimX/gui/pages/experiment/sections/configuration.py +42 -0
- PyMieSimX/gui/pages/home.py +152 -0
- PyMieSimX/gui/pages/install_local.py +110 -0
- PyMieSimX/gui/pages/settings.py +87 -0
- PyMieSimX/gui/pages/single/__init__.py +5 -0
- PyMieSimX/gui/pages/single/page.py +28 -0
- PyMieSimX/gui/pages/single/sections/__init__.py +6 -0
- PyMieSimX/gui/pages/single/sections/representations.py +38 -0
- PyMieSimX/gui/pages/single/sections/setup.py +27 -0
- PyMieSimX/gui/parsing.py +149 -0
- PyMieSimX/gui/schemas.py +118 -0
- PyMieSimX/gui/services.py +735 -0
- pymiesimx-0.1.0.dist-info/METADATA +90 -0
- pymiesimx-0.1.0.dist-info/RECORD +39 -0
- pymiesimx-0.1.0.dist-info/WHEEL +5 -0
- pymiesimx-0.1.0.dist-info/entry_points.txt +2 -0
- pymiesimx-0.1.0.dist-info/licenses/LICENSE +21 -0
- pymiesimx-0.1.0.dist-info/top_level.txt +1 -0
PyMieSimX/__init__.py
ADDED
PyMieSimX/__main__.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Entry point for launching the PyMieSimX dashboard."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import logging
|
|
5
|
+
|
|
6
|
+
from PyMieSimX.gui.interface import OpticalSetupGUI
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _build_argument_parser() -> argparse.ArgumentParser:
|
|
10
|
+
"""Create the CLI parser for the dashboard launcher."""
|
|
11
|
+
parser = argparse.ArgumentParser(description="Launch the PyMieSimX dashboard.")
|
|
12
|
+
parser.add_argument("--host", default="0.0.0.0", help="Host interface for the Dash server.")
|
|
13
|
+
parser.add_argument("--port", default="8050", help="Port for the Dash server.")
|
|
14
|
+
parser.add_argument("--debug", action="store_true", help="Enable Dash debug mode and verbose debug logging.")
|
|
15
|
+
parser.add_argument("--no-browser", action="store_true", help="Start the server without opening a browser window.")
|
|
16
|
+
return parser
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def main(argv: list[str] | None = None) -> None:
|
|
20
|
+
"""Launch the PyMieSimX dashboard from a console entry point."""
|
|
21
|
+
args = _build_argument_parser().parse_args(argv)
|
|
22
|
+
logging.basicConfig(
|
|
23
|
+
level=logging.DEBUG if args.debug else logging.INFO,
|
|
24
|
+
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
|
|
25
|
+
)
|
|
26
|
+
OpticalSetupGUI().run(
|
|
27
|
+
host=args.host,
|
|
28
|
+
port=args.port,
|
|
29
|
+
open_browser=not args.no_browser,
|
|
30
|
+
debug=args.debug,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
if __name__ == "__main__":
|
|
35
|
+
main()
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const storagePrefix = "pymiesim-card-state:";
|
|
5
|
+
|
|
6
|
+
function restoreCard(card) {
|
|
7
|
+
if (!card.id || !card.matches("details.workflow-card")) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const savedState = window.sessionStorage.getItem(storagePrefix + card.id);
|
|
12
|
+
if (savedState === "open") {
|
|
13
|
+
card.open = true;
|
|
14
|
+
} else if (savedState === "closed") {
|
|
15
|
+
card.open = false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (!card.dataset.statePersistenceBound) {
|
|
19
|
+
card.addEventListener("toggle", function () {
|
|
20
|
+
window.sessionStorage.setItem(storagePrefix + card.id, card.open ? "open" : "closed");
|
|
21
|
+
});
|
|
22
|
+
card.dataset.statePersistenceBound = "true";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function scan(root) {
|
|
27
|
+
if (root instanceof HTMLElement) {
|
|
28
|
+
restoreCard(root);
|
|
29
|
+
root.querySelectorAll("details.workflow-card").forEach(restoreCard);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
34
|
+
scan(document.body);
|
|
35
|
+
new MutationObserver(function (mutations) {
|
|
36
|
+
mutations.forEach(function (mutation) {
|
|
37
|
+
mutation.addedNodes.forEach(scan);
|
|
38
|
+
});
|
|
39
|
+
}).observe(document.body, { childList: true, subtree: true });
|
|
40
|
+
});
|
|
41
|
+
})();
|