solprop-gui 0.2.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.
Files changed (143) hide show
  1. solprop_gui/__init__.py +24 -0
  2. solprop_gui/__main__.py +11 -0
  3. solprop_gui/app.py +67 -0
  4. solprop_gui/classes/__init__.py +9 -0
  5. solprop_gui/classes/catalog.py +854 -0
  6. solprop_gui/classes/problem.py +868 -0
  7. solprop_gui/classes/workflow.py +139 -0
  8. solprop_gui/help/__init__.py +7 -0
  9. solprop_gui/help/figures/antiresonant.svg +70 -0
  10. solprop_gui/help/figures/capillary-averaged.svg +63 -0
  11. solprop_gui/help/figures/capillary-modal.svg +65 -0
  12. solprop_gui/help/figures/cartesian.svg +164 -0
  13. solprop_gui/help/figures/gnlse.svg +64 -0
  14. solprop_gui/help/figures/grin.svg +63 -0
  15. solprop_gui/help/figures/line.svg +84 -0
  16. solprop_gui/help/figures/radial.svg +68 -0
  17. solprop_gui/help/figures/rectangular.svg +63 -0
  18. solprop_gui/help/figures/slab.svg +68 -0
  19. solprop_gui/help/figures/step-index.svg +63 -0
  20. solprop_gui/help/figures.py +106 -0
  21. solprop_gui/help/guide/analysis.md +96 -0
  22. solprop_gui/help/guide/classes.md +94 -0
  23. solprop_gui/help/guide/design.md +59 -0
  24. solprop_gui/help/guide/first-run.md +101 -0
  25. solprop_gui/help/guide/images/capillary-along.png +0 -0
  26. solprop_gui/help/guide/images/capillary-overview.png +0 -0
  27. solprop_gui/help/guide/images/capillary-plane.png +0 -0
  28. solprop_gui/help/guide/images/capillary-run.png +0 -0
  29. solprop_gui/help/guide/images/capillary-sheet.png +0 -0
  30. solprop_gui/help/guide/images/capillary-target.png +0 -0
  31. solprop_gui/help/guide/images/design.png +0 -0
  32. solprop_gui/help/guide/images/filament-overview.png +0 -0
  33. solprop_gui/help/guide/images/filament-sheet.png +0 -0
  34. solprop_gui/help/guide/images/home.png +0 -0
  35. solprop_gui/help/guide/images/plot-menu.png +0 -0
  36. solprop_gui/help/guide/images/scan.png +0 -0
  37. solprop_gui/help/guide/index.md +104 -0
  38. solprop_gui/help/guide/scans.md +55 -0
  39. solprop_gui/help/guide.py +48 -0
  40. solprop_gui/help/manual.py +199 -0
  41. solprop_gui/model/__init__.py +12 -0
  42. solprop_gui/model/compressor.py +407 -0
  43. solprop_gui/model/display.py +501 -0
  44. solprop_gui/model/plot_options.py +343 -0
  45. solprop_gui/model/quantities.py +179 -0
  46. solprop_gui/model/recipe.py +473 -0
  47. solprop_gui/model/scans.py +288 -0
  48. solprop_gui/model/snippets.py +118 -0
  49. solprop_gui/model/stats_layout.py +115 -0
  50. solprop_gui/model/values.py +195 -0
  51. solprop_gui/model/workspace.py +151 -0
  52. solprop_gui/py.typed +0 -0
  53. solprop_gui/registry/__init__.py +12 -0
  54. solprop_gui/registry/explore.py +481 -0
  55. solprop_gui/registry/pages.py +273 -0
  56. solprop_gui/registry/routes.py +450 -0
  57. solprop_gui/registry/units.py +135 -0
  58. solprop_gui/service/__init__.py +12 -0
  59. solprop_gui/service/beam.py +226 -0
  60. solprop_gui/service/beams.py +257 -0
  61. solprop_gui/service/client.py +398 -0
  62. solprop_gui/service/design.py +362 -0
  63. solprop_gui/service/figures.py +106 -0
  64. solprop_gui/service/handlers.py +709 -0
  65. solprop_gui/service/kernel.py +187 -0
  66. solprop_gui/service/messages.py +210 -0
  67. solprop_gui/service/outbox.py +139 -0
  68. solprop_gui/service/postprocess.py +513 -0
  69. solprop_gui/service/reduce.py +368 -0
  70. solprop_gui/service/remote.py +513 -0
  71. solprop_gui/service/results.py +951 -0
  72. solprop_gui/service/run.py +648 -0
  73. solprop_gui/service/scan_reductions.py +261 -0
  74. solprop_gui/service/server.py +501 -0
  75. solprop_gui/service/sheet.py +1023 -0
  76. solprop_gui/service/states.py +146 -0
  77. solprop_gui/service/waveguide.py +320 -0
  78. solprop_gui/service/worker.py +97 -0
  79. solprop_gui/ui/__init__.py +11 -0
  80. solprop_gui/ui/analyse.py +808 -0
  81. solprop_gui/ui/analysis.py +338 -0
  82. solprop_gui/ui/analysis_pages.py +2954 -0
  83. solprop_gui/ui/assets/chevron.svg +6 -0
  84. solprop_gui/ui/assets/fonts/IBMPlexSans-Medium.ttf +0 -0
  85. solprop_gui/ui/assets/fonts/IBMPlexSans-Regular.ttf +0 -0
  86. solprop_gui/ui/assets/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  87. solprop_gui/ui/assets/fonts/LICENSE.txt +93 -0
  88. solprop_gui/ui/assets/icon/solprop-1024.png +0 -0
  89. solprop_gui/ui/assets/icon/solprop-128.png +0 -0
  90. solprop_gui/ui/assets/icon/solprop-16.png +0 -0
  91. solprop_gui/ui/assets/icon/solprop-24.png +0 -0
  92. solprop_gui/ui/assets/icon/solprop-256.png +0 -0
  93. solprop_gui/ui/assets/icon/solprop-32.png +0 -0
  94. solprop_gui/ui/assets/icon/solprop-48.png +0 -0
  95. solprop_gui/ui/assets/icon/solprop-512.png +0 -0
  96. solprop_gui/ui/assets/icon/solprop-64.png +0 -0
  97. solprop_gui/ui/assets/icon/solprop-compact.svg +19 -0
  98. solprop_gui/ui/assets/icon/solprop.svg +20 -0
  99. solprop_gui/ui/betas.py +245 -0
  100. solprop_gui/ui/bridge.py +258 -0
  101. solprop_gui/ui/design_stage.py +956 -0
  102. solprop_gui/ui/document.py +693 -0
  103. solprop_gui/ui/fields.py +812 -0
  104. solprop_gui/ui/help_window.py +214 -0
  105. solprop_gui/ui/home.py +291 -0
  106. solprop_gui/ui/icons.py +191 -0
  107. solprop_gui/ui/identity.py +230 -0
  108. solprop_gui/ui/launch.py +261 -0
  109. solprop_gui/ui/objects.py +530 -0
  110. solprop_gui/ui/pages.py +436 -0
  111. solprop_gui/ui/pin.py +286 -0
  112. solprop_gui/ui/plot_options.py +439 -0
  113. solprop_gui/ui/postprocess.py +532 -0
  114. solprop_gui/ui/quantity.py +532 -0
  115. solprop_gui/ui/results.py +482 -0
  116. solprop_gui/ui/run_options.py +179 -0
  117. solprop_gui/ui/run_panel.py +767 -0
  118. solprop_gui/ui/scan_editor.py +421 -0
  119. solprop_gui/ui/scan_stage.py +724 -0
  120. solprop_gui/ui/sheet.py +1371 -0
  121. solprop_gui/ui/theme.py +247 -0
  122. solprop_gui/ui/tile_art.py +146 -0
  123. solprop_gui/ui/workflow_window.py +1332 -0
  124. solprop_gui/views/__init__.py +11 -0
  125. solprop_gui/views/compare.py +114 -0
  126. solprop_gui/views/compression.py +146 -0
  127. solprop_gui/views/controls.py +211 -0
  128. solprop_gui/views/cross_section.py +124 -0
  129. solprop_gui/views/live.py +704 -0
  130. solprop_gui/views/page_plots.py +1073 -0
  131. solprop_gui/views/plane.py +650 -0
  132. solprop_gui/views/plotting.py +381 -0
  133. solprop_gui/views/scan_browser.py +149 -0
  134. solprop_gui/views/sparkline.py +131 -0
  135. solprop_gui/views/splitter.py +141 -0
  136. solprop_gui/views/statistics.py +501 -0
  137. solprop_gui-0.2.0.dist-info/METADATA +92 -0
  138. solprop_gui-0.2.0.dist-info/RECORD +143 -0
  139. solprop_gui-0.2.0.dist-info/WHEEL +4 -0
  140. solprop_gui-0.2.0.dist-info/entry_points.txt +2 -0
  141. solprop_gui-0.2.0.dist-info/licenses/LICENSE +674 -0
  142. solprop_gui-0.2.0.dist-info/licenses/LICENSE-CC-BY-4.0.txt +156 -0
  143. solprop_gui-0.2.0.dist-info/licenses/src/solprop_gui/ui/assets/fonts/LICENSE.txt +93 -0
@@ -0,0 +1,24 @@
1
+ # SPDX-FileCopyrightText: 2026 John C. Travers and contributors
2
+ #
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+
5
+ """A desktop front end for solprop.
6
+
7
+ The window sets up, runs and reads solprop simulations without Python, while every
8
+ setup can leave it as a recipe file or a script and every results file solprop writes
9
+ can be opened in it. solprop does the physics and the window none: every number shown
10
+ comes from a public solprop call, made in a separate process. The design is
11
+ ``docs/dev/gui/design.md`` in the solprop repository.
12
+
13
+ The package's layers are ``model``, ``registry`` and ``service``, which import no
14
+ Qt, and ``ui``, ``views`` and ``help``, which build the window.
15
+ """
16
+
17
+ from importlib.metadata import PackageNotFoundError, version
18
+
19
+ __all__ = ["__version__"]
20
+
21
+ try:
22
+ __version__: str = version("solprop-gui")
23
+ except PackageNotFoundError: # pragma: no cover - a tree never installed
24
+ __version__ = "0.0.0"
@@ -0,0 +1,11 @@
1
+ # SPDX-FileCopyrightText: 2026 John C. Travers and contributors
2
+ #
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+
5
+ """Run the window: ``python -m solprop_gui``."""
6
+
7
+ import sys
8
+
9
+ from solprop_gui.app import main
10
+
11
+ sys.exit(main())
solprop_gui/app.py ADDED
@@ -0,0 +1,67 @@
1
+ # SPDX-FileCopyrightText: 2026 John C. Travers and contributors
2
+ #
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+
5
+ """The ``solprop-gui`` command."""
6
+
7
+ import argparse
8
+ import sys
9
+ from collections.abc import Sequence
10
+
11
+ from solprop_gui import __version__
12
+
13
+ __all__ = ["main"]
14
+
15
+
16
+ def main(argv: Sequence[str] | None = None) -> int:
17
+ """Open the window and run until it closes.
18
+
19
+ Parameters
20
+ ----------
21
+ argv : sequence of str or None, optional
22
+ The command-line arguments after the program name; ``None`` reads
23
+ ``sys.argv``.
24
+
25
+ Returns
26
+ -------
27
+ int
28
+ The exit status: 0 when the window closed normally.
29
+ """
30
+ parser = argparse.ArgumentParser(
31
+ prog="solprop-gui", description="A desktop front end for solprop."
32
+ )
33
+ parser.add_argument("--version", action="version", version=__version__)
34
+ # Accepted, and no longer needed: the workflow window is the only one.
35
+ parser.add_argument("--workflow", action="store_true", help=argparse.SUPPRESS)
36
+ options = parser.parse_args(argv)
37
+
38
+ # Qt is imported here, after the arguments: `--version` and `--help` answer without
39
+ # loading it.
40
+ from pyqtgraph.util.garbage_collector import ( # noqa: PLC0415 - see above
41
+ GarbageCollector,
42
+ )
43
+ from PySide6.QtWidgets import QApplication # noqa: PLC0415 - see above
44
+
45
+ from solprop_gui.ui.identity import ( # noqa: PLC0415 - see above
46
+ apply_identity,
47
+ set_windows_app_id,
48
+ )
49
+ from solprop_gui.ui.workflow_window import ( # noqa: PLC0415 - see above
50
+ WorkflowWindow,
51
+ )
52
+
53
+ # Before the first window, so that Windows shows this application's taskbar button.
54
+ set_windows_app_id()
55
+ application = QApplication.instance() or QApplication(sys.argv[:1])
56
+ apply_identity(application) # pyright: ignore[reportArgumentType]
57
+ del options
58
+ # Garbage is collected on a timer, between events, never by Python in the middle of
59
+ # one: a plot dropped while its scene still had an event queued was otherwise freed
60
+ # inside that event's handler, deleting the scene under Qt's feet.
61
+ collector = GarbageCollector(interval=1.0)
62
+ window = WorkflowWindow()
63
+ window.show()
64
+ try:
65
+ return application.exec()
66
+ finally:
67
+ collector.timer.stop()
@@ -0,0 +1,9 @@
1
+ # SPDX-FileCopyrightText: 2026 John C. Travers and contributors
2
+ #
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+
5
+ """The problem classes: what each asks for, what it shows, and how a run moves on.
6
+
7
+ A class is a definition held as data (design 6.1), so a view never asks which class it
8
+ is drawing, and a new class is a new definition. Nothing here imports Qt.
9
+ """