solprop-gui 0.2.0__tar.gz → 0.3.0__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.
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/.gitignore +1 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/PKG-INFO +8 -7
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/README.md +4 -4
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/analysis.md +2 -2
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/classes.md +1 -1
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/first-run.md +19 -2
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/index.md +3 -0
- solprop_gui-0.3.0/guide/machines.md +130 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/hatch_build.py +2 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/pyproject.toml +8 -4
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/__init__.py +3 -2
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/app.py +3 -11
- solprop_gui-0.3.0/src/solprop_gui/askpass.py +78 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/classes/catalog.py +12 -13
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/classes/problem.py +37 -58
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/help/guide.py +6 -6
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/compressor.py +1 -1
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/display.py +0 -39
- solprop_gui-0.3.0/src/solprop_gui/model/plot_options.py +186 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/quantities.py +2 -30
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/recipe.py +1 -35
- solprop_gui-0.3.0/src/solprop_gui/model/workspace.py +113 -0
- solprop_gui-0.3.0/src/solprop_gui/registry/pages.py +128 -0
- solprop_gui-0.3.0/src/solprop_gui/registry/routes.py +207 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/analyse.py +78 -5
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/analysis.py +2 -2
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/analysis_pages.py +1 -4
- solprop_gui-0.3.0/src/solprop_gui/ui/bridge.py +381 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/design_stage.py +3 -3
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/document.py +12 -10
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/fields.py +36 -9
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/home.py +16 -11
- solprop_gui-0.3.0/src/solprop_gui/ui/machines_dialog.py +434 -0
- solprop_gui-0.3.0/src/solprop_gui/ui/machines_hub.py +773 -0
- solprop_gui-0.3.0/src/solprop_gui/ui/pages.py +92 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/pin.py +6 -47
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/postprocess.py +10 -10
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/quantity.py +2 -1
- solprop_gui-0.3.0/src/solprop_gui/ui/run_options.py +300 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/run_panel.py +180 -71
- solprop_gui-0.3.0/src/solprop_gui/ui/runs_window.py +523 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/scan_editor.py +1 -2
- solprop_gui-0.3.0/src/solprop_gui/ui/setup_dialog.py +212 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/sheet.py +51 -12
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/workflow_window.py +395 -96
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/compression.py +1 -1
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/live.py +1 -1
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/plotting.py +0 -26
- solprop_gui-0.3.0/tests/conftest.py +167 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_app.py +7 -0
- solprop_gui-0.3.0/tests/test_beam.py +72 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_classes.py +104 -16
- solprop_gui-0.3.0/tests/test_design.py +43 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_display.py +1 -1
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_help_manual.py +9 -1
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_layers.py +26 -11
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_lifecycle.py +30 -16
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_postprocess.py +6 -14
- solprop_gui-0.3.0/tests/test_pure.py +93 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_ui.py +0 -15
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_ui_identity.py +2 -2
- solprop_gui-0.3.0/tests/test_ui_machines.py +682 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_ui_review.py +1 -15
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_ui_scans.py +41 -42
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_ui_workflow.py +222 -42
- solprop_gui-0.2.0/src/solprop_gui/help/figures/antiresonant.svg +0 -70
- solprop_gui-0.2.0/src/solprop_gui/help/figures/capillary-averaged.svg +0 -63
- solprop_gui-0.2.0/src/solprop_gui/help/figures/capillary-modal.svg +0 -65
- solprop_gui-0.2.0/src/solprop_gui/help/figures/cartesian.svg +0 -164
- solprop_gui-0.2.0/src/solprop_gui/help/figures/gnlse.svg +0 -64
- solprop_gui-0.2.0/src/solprop_gui/help/figures/grin.svg +0 -63
- solprop_gui-0.2.0/src/solprop_gui/help/figures/line.svg +0 -84
- solprop_gui-0.2.0/src/solprop_gui/help/figures/radial.svg +0 -68
- solprop_gui-0.2.0/src/solprop_gui/help/figures/rectangular.svg +0 -63
- solprop_gui-0.2.0/src/solprop_gui/help/figures/slab.svg +0 -68
- solprop_gui-0.2.0/src/solprop_gui/help/figures/step-index.svg +0 -63
- solprop_gui-0.2.0/src/solprop_gui/help/figures.py +0 -106
- solprop_gui-0.2.0/src/solprop_gui/model/plot_options.py +0 -343
- solprop_gui-0.2.0/src/solprop_gui/model/stats_layout.py +0 -115
- solprop_gui-0.2.0/src/solprop_gui/model/workspace.py +0 -151
- solprop_gui-0.2.0/src/solprop_gui/registry/explore.py +0 -481
- solprop_gui-0.2.0/src/solprop_gui/registry/pages.py +0 -273
- solprop_gui-0.2.0/src/solprop_gui/registry/routes.py +0 -450
- solprop_gui-0.2.0/src/solprop_gui/service/__init__.py +0 -12
- solprop_gui-0.2.0/src/solprop_gui/service/beam.py +0 -226
- solprop_gui-0.2.0/src/solprop_gui/service/beams.py +0 -257
- solprop_gui-0.2.0/src/solprop_gui/service/client.py +0 -398
- solprop_gui-0.2.0/src/solprop_gui/service/design.py +0 -362
- solprop_gui-0.2.0/src/solprop_gui/service/figures.py +0 -106
- solprop_gui-0.2.0/src/solprop_gui/service/handlers.py +0 -709
- solprop_gui-0.2.0/src/solprop_gui/service/kernel.py +0 -187
- solprop_gui-0.2.0/src/solprop_gui/service/messages.py +0 -210
- solprop_gui-0.2.0/src/solprop_gui/service/outbox.py +0 -139
- solprop_gui-0.2.0/src/solprop_gui/service/postprocess.py +0 -513
- solprop_gui-0.2.0/src/solprop_gui/service/reduce.py +0 -368
- solprop_gui-0.2.0/src/solprop_gui/service/remote.py +0 -513
- solprop_gui-0.2.0/src/solprop_gui/service/results.py +0 -951
- solprop_gui-0.2.0/src/solprop_gui/service/run.py +0 -648
- solprop_gui-0.2.0/src/solprop_gui/service/scan_reductions.py +0 -261
- solprop_gui-0.2.0/src/solprop_gui/service/server.py +0 -501
- solprop_gui-0.2.0/src/solprop_gui/service/sheet.py +0 -1023
- solprop_gui-0.2.0/src/solprop_gui/service/states.py +0 -146
- solprop_gui-0.2.0/src/solprop_gui/service/waveguide.py +0 -320
- solprop_gui-0.2.0/src/solprop_gui/service/worker.py +0 -97
- solprop_gui-0.2.0/src/solprop_gui/ui/bridge.py +0 -258
- solprop_gui-0.2.0/src/solprop_gui/ui/pages.py +0 -436
- solprop_gui-0.2.0/src/solprop_gui/ui/plot_options.py +0 -439
- solprop_gui-0.2.0/src/solprop_gui/ui/results.py +0 -482
- solprop_gui-0.2.0/src/solprop_gui/ui/run_options.py +0 -179
- solprop_gui-0.2.0/src/solprop_gui/views/compare.py +0 -114
- solprop_gui-0.2.0/src/solprop_gui/views/plane.py +0 -650
- solprop_gui-0.2.0/src/solprop_gui/views/scan_browser.py +0 -149
- solprop_gui-0.2.0/src/solprop_gui/views/statistics.py +0 -501
- solprop_gui-0.2.0/tests/conftest.py +0 -83
- solprop_gui-0.2.0/tests/targets.py +0 -43
- solprop_gui-0.2.0/tests/test_beam.py +0 -158
- solprop_gui-0.2.0/tests/test_beams_service.py +0 -81
- solprop_gui-0.2.0/tests/test_client.py +0 -142
- solprop_gui-0.2.0/tests/test_design.py +0 -308
- solprop_gui-0.2.0/tests/test_pure.py +0 -323
- solprop_gui-0.2.0/tests/test_results.py +0 -358
- solprop_gui-0.2.0/tests/test_scan_reductions.py +0 -126
- solprop_gui-0.2.0/tests/test_server.py +0 -546
- solprop_gui-0.2.0/tests/test_service.py +0 -497
- solprop_gui-0.2.0/tests/test_sheet.py +0 -407
- solprop_gui-0.2.0/tests/test_ui_options.py +0 -53
- solprop_gui-0.2.0/tests/test_ui_results.py +0 -249
- solprop_gui-0.2.0/tests/test_ui_service.py +0 -144
- solprop_gui-0.2.0/tests/test_waveguide.py +0 -198
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/LICENSE +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/LICENSE-CC-BY-4.0.txt +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/design.md +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/capillary-along.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/capillary-overview.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/capillary-plane.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/capillary-run.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/capillary-sheet.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/capillary-target.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/design.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/filament-overview.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/filament-sheet.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/home.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/plot-menu.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/images/scan.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/guide/scans.md +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/__main__.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/classes/__init__.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/classes/workflow.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/help/__init__.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/help/manual.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/__init__.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/scans.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/snippets.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/model/values.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/py.typed +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/registry/__init__.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/registry/units.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/__init__.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/chevron.svg +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/fonts/IBMPlexSans-Medium.ttf +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/fonts/IBMPlexSans-Regular.ttf +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/fonts/IBMPlexSans-SemiBold.ttf +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/fonts/LICENSE.txt +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-1024.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-128.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-16.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-24.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-256.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-32.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-48.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-512.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-64.png +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop-compact.svg +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/assets/icon/solprop.svg +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/betas.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/help_window.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/icons.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/identity.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/launch.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/objects.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/scan_stage.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/theme.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/ui/tile_art.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/__init__.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/controls.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/cross_section.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/page_plots.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/sparkline.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/src/solprop_gui/views/splitter.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_licences.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_model.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_plot_interaction.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_scans_model.py +0 -0
- {solprop_gui-0.2.0 → solprop_gui-0.3.0}/tests/test_ui_objects.py +0 -0
|
@@ -36,6 +36,7 @@ docs/introduction/lessons/sg_execution_times.rst
|
|
|
36
36
|
# OS and editors
|
|
37
37
|
.DS_Store
|
|
38
38
|
.idea/
|
|
39
|
+
.vscode/
|
|
39
40
|
|
|
40
41
|
# The galleries' generated pages under docs/introduction/lessons/, docs/auto_tutorials/
|
|
41
42
|
# and docs/auto_examples/ ARE committed (they are reused, not regenerated, by every
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: solprop-gui
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A desktop front end for solprop: set up, run and read ultrafast propagation simulations
|
|
5
5
|
Project-URL: Homepage, https://solprop.readthedocs.io/
|
|
6
|
-
Project-URL: Documentation, https://solprop.readthedocs.io/en/
|
|
6
|
+
Project-URL: Documentation, https://solprop.readthedocs.io/en/stable/guide/front-end/index.html
|
|
7
7
|
Project-URL: Source, https://github.com/LupoLab/solprop/tree/main/gui
|
|
8
8
|
Project-URL: Issues, https://github.com/LupoLab/solprop/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/LupoLab/solprop/blob/main/CHANGELOG.md
|
|
@@ -20,14 +20,15 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
21
21
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
22
22
|
Requires-Python: >=3.14
|
|
23
|
+
Requires-Dist: numpy>=2.5
|
|
23
24
|
Requires-Dist: pyqtgraph>=0.14
|
|
24
25
|
Requires-Dist: pyside6-essentials>=6.10.1
|
|
25
|
-
Requires-Dist: solprop==0.
|
|
26
|
+
Requires-Dist: solprop==0.3.0
|
|
26
27
|
Description-Content-Type: text/markdown
|
|
27
28
|
|
|
28
29
|
# solprop-gui
|
|
29
30
|
|
|
30
|
-
`solprop-gui` is a desktop front end for [solprop](https://solprop.readthedocs.io/en/
|
|
31
|
+
`solprop-gui` is a desktop front end for [solprop](https://solprop.readthedocs.io/en/stable/),
|
|
31
32
|
a Python package for ultrafast nonlinear pulse propagation. It sets up, runs and reads
|
|
32
33
|
solprop simulations without a script. Setups are described in physics terms: a capillary's
|
|
33
34
|
core radius, a gas and its pressure, a pulse's wavelength, duration and energy.
|
|
@@ -62,7 +63,7 @@ sudo apt install libegl1 libxkbcommon0 libxcb-cursor0
|
|
|
62
63
|
for it (a soliton order, a zero-dispersion wavelength) and a preview plot. A number can
|
|
63
64
|
be typed as a target, and solprop solves for the input that gives it.
|
|
64
65
|
- **Run** shows the spectrum and the pulse growing along the waveguide, and can stop and
|
|
65
|
-
resume. A
|
|
66
|
+
resume. A run goes on after the window closes, unless it is tied to the window.
|
|
66
67
|
- **Analyse** reads the results on pages of the class, all at one plane, with zoom,
|
|
67
68
|
readouts, widths at half maximum and publication figures drawn by `solprop.plotting`.
|
|
68
69
|
- **Scans** run a setup over a grid of its parameters, and any point opens as a setup.
|
|
@@ -76,9 +77,9 @@ runs it in separate processes and shows what it returns. It is drawn with Qt for
|
|
|
76
77
|
|
|
77
78
|
## Documentation
|
|
78
79
|
|
|
79
|
-
- [The user guide's chapter on the front end](https://solprop.readthedocs.io/en/
|
|
80
|
+
- [The user guide's chapter on the front end](https://solprop.readthedocs.io/en/stable/guide/front-end/index.html),
|
|
80
81
|
which also opens offline from the window's **Help** menu
|
|
81
|
-
- [The solprop manual](https://solprop.readthedocs.io/en/
|
|
82
|
+
- [The solprop manual](https://solprop.readthedocs.io/en/stable/)
|
|
82
83
|
- [The front end's design](https://solprop.readthedocs.io/en/latest/dev/gui/design.html)
|
|
83
84
|
|
|
84
85
|
The source is the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# solprop-gui
|
|
2
2
|
|
|
3
|
-
`solprop-gui` is a desktop front end for [solprop](https://solprop.readthedocs.io/en/
|
|
3
|
+
`solprop-gui` is a desktop front end for [solprop](https://solprop.readthedocs.io/en/stable/),
|
|
4
4
|
a Python package for ultrafast nonlinear pulse propagation. It sets up, runs and reads
|
|
5
5
|
solprop simulations without a script. Setups are described in physics terms: a capillary's
|
|
6
6
|
core radius, a gas and its pressure, a pulse's wavelength, duration and energy.
|
|
@@ -35,7 +35,7 @@ sudo apt install libegl1 libxkbcommon0 libxcb-cursor0
|
|
|
35
35
|
for it (a soliton order, a zero-dispersion wavelength) and a preview plot. A number can
|
|
36
36
|
be typed as a target, and solprop solves for the input that gives it.
|
|
37
37
|
- **Run** shows the spectrum and the pulse growing along the waveguide, and can stop and
|
|
38
|
-
resume. A
|
|
38
|
+
resume. A run goes on after the window closes, unless it is tied to the window.
|
|
39
39
|
- **Analyse** reads the results on pages of the class, all at one plane, with zoom,
|
|
40
40
|
readouts, widths at half maximum and publication figures drawn by `solprop.plotting`.
|
|
41
41
|
- **Scans** run a setup over a grid of its parameters, and any point opens as a setup.
|
|
@@ -49,9 +49,9 @@ runs it in separate processes and shows what it returns. It is drawn with Qt for
|
|
|
49
49
|
|
|
50
50
|
## Documentation
|
|
51
51
|
|
|
52
|
-
- [The user guide's chapter on the front end](https://solprop.readthedocs.io/en/
|
|
52
|
+
- [The user guide's chapter on the front end](https://solprop.readthedocs.io/en/stable/guide/front-end/index.html),
|
|
53
53
|
which also opens offline from the window's **Help** menu
|
|
54
|
-
- [The solprop manual](https://solprop.readthedocs.io/en/
|
|
54
|
+
- [The solprop manual](https://solprop.readthedocs.io/en/stable/)
|
|
55
55
|
- [The front end's design](https://solprop.readthedocs.io/en/latest/dev/gui/design.html)
|
|
56
56
|
|
|
57
57
|
The source is the
|
|
@@ -52,8 +52,8 @@ element set to *Auto* is searched by solprop for the shortest pulse; **Take the
|
|
|
52
52
|
found** fixes them. The plane and band compressed are the ones chosen on *At this plane*.
|
|
53
53
|
|
|
54
54
|
**Run health** says how the run went: its step size along z with the rejected steps,
|
|
55
|
-
the light removed at the time window's edges, the run's record (its backend
|
|
56
|
-
|
|
55
|
+
the light removed at the time window's edges, the run's record (its backend and
|
|
56
|
+
threads, its wall time and peak memory) and its log. Check it before trusting a result: a run whose light
|
|
57
57
|
reaches the window's edges, or whose steps collapse, needs a wider window or a smaller
|
|
58
58
|
tolerance ([numerics](../numerics/index.md)).
|
|
59
59
|
|
|
@@ -14,7 +14,7 @@ here. The pages themselves are described in [Reading the results](analysis.md).
|
|
|
14
14
|
|
|
15
15
|
**Capillary** is a gas-filled hollow [capillary](../waveguides/capillaries.md),
|
|
16
16
|
mode-averaged or with several modes (the *Modes* row; a multimode run adds the *Modes* page). Its numbers come from
|
|
17
|
-
{py:func}`solprop.tools.capillary_params`: the soliton order, the zero-dispersion
|
|
17
|
+
{py:func}`solprop.tools.capillary.capillary_params`: the soliton order, the zero-dispersion
|
|
18
18
|
wavelength and the dispersive wave, each of which can be set as a target, and the peak
|
|
19
19
|
power and intensity, the fission length and the loss at the pump. Its preview is the
|
|
20
20
|
group-velocity dispersion at the entrance. Its pages are *Overview*, *At this plane*,
|
|
@@ -24,10 +24,25 @@ gradient *from* 1.2 bar *to* 0 bar along the capillary, the example's own profil
|
|
|
24
24
|
does when it is left empty. **Advanced** holds every other keyword of the route,
|
|
25
25
|
with a *Find any setting* box.
|
|
26
26
|
|
|
27
|
+
**Saved planes**, in the simulation window, takes one of two forms
|
|
28
|
+
([the length and the saved planes](../setup/running.md#the-length-and-the-saved-planes)):
|
|
29
|
+
|
|
30
|
+
- *Evenly spaced* is a count of observations, `n_save`, spread from the run's entrance
|
|
31
|
+
to its end with both ends counted. Changing the length spreads them again.
|
|
32
|
+
- *Explicit positions* is a list, `save_planes`, written as a recipe writes it:
|
|
33
|
+
`["5 cm", "10 cm"]`. The entrance and the end are recorded as well, one position is a
|
|
34
|
+
list of one, and `[]` keeps only the two ends. The positions stay as typed when the
|
|
35
|
+
length changes, and a position beyond the end is shown as an error at the row.
|
|
36
|
+
|
|
37
|
+
Typing into the other form replaces the first in one edit, which **Undo** takes back,
|
|
38
|
+
so a setup never holds both. A setup opens on the form it holds, and a list is always
|
|
39
|
+
shown as the list, never as its count. Left empty, the row takes solprop's default
|
|
40
|
+
count.
|
|
41
|
+
|
|
27
42
|
As you type, the right side follows:
|
|
28
43
|
|
|
29
44
|
- **What this gives** is computed by solprop from the setup as it stands
|
|
30
|
-
({py:func}`solprop.tools.capillary_params` for a capillary): the soliton order, the
|
|
45
|
+
({py:func}`solprop.tools.capillary.capillary_params` for a capillary): the soliton order, the
|
|
31
46
|
zero-dispersion wavelength, the wavelength of the dispersive wave, the peak power and
|
|
32
47
|
intensity, the fission length and the loss at the pump.
|
|
33
48
|
- The plot is the **group-velocity dispersion at the entrance**, with the pump, the
|
|
@@ -37,7 +52,6 @@ As you type, the right side follows:
|
|
|
37
52
|
- **Runs on** chooses the backend and the number of threads. *Automatic* is solprop's
|
|
38
53
|
own choice ([which backend](../performance/tuning.md#which-backend)); the threads
|
|
39
54
|
default to the process's [thread budget](../performance/tuning.md#the-thread-budget).
|
|
40
|
-
Choosing MLX, the Apple GPU backend, sets single precision, which is all MLX runs.
|
|
41
55
|
|
|
42
56
|
## Ask for a number instead of an input
|
|
43
57
|
|
|
@@ -99,3 +113,6 @@ setup. **⋯ → Save** keeps the setup as a recipe file of your own, and
|
|
|
99
113
|
**⋯ → Show as Python** shows the script that builds the same simulation. Each results
|
|
100
114
|
page's **Export** menu has *Copy as Python* too: the code that draws that page from the
|
|
101
115
|
results file, with {py:mod}`solprop.processing` and {py:mod}`solprop.plotting`.
|
|
116
|
+
|
|
117
|
+
The design of the two forms of the saved planes is
|
|
118
|
+
[SEP 51](https://github.com/LupoLab/solprop/blob/main/docs/dev/seps/archive/sep-0051-save-planes.md).
|
|
@@ -92,6 +92,8 @@ finds there, and copying a run's folder elsewhere loses nothing.
|
|
|
92
92
|
- [Scans](scans.md) runs a setup over a grid of its parameters.
|
|
93
93
|
- [Designing a waveguide](design.md) explores a guide's dispersion, loss and
|
|
94
94
|
phase matching with no pulse and no run.
|
|
95
|
+
- [Running on other machines](machines.md) sends runs and scans to a workstation, a
|
|
96
|
+
Slurm cluster or a rented machine over SSH, and lists every run on every machine.
|
|
95
97
|
|
|
96
98
|
```{toctree}
|
|
97
99
|
:hidden:
|
|
@@ -101,4 +103,5 @@ classes
|
|
|
101
103
|
analysis
|
|
102
104
|
scans
|
|
103
105
|
design
|
|
106
|
+
machines
|
|
104
107
|
```
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Running on other machines
|
|
2
|
+
|
|
3
|
+
A run, or a scan, can go to another machine: a workstation, a cluster with Slurm, or a
|
|
4
|
+
GPU machine you have rented. The window reaches it with SSH, the way you do from a
|
|
5
|
+
terminal, and keeps nothing between you and the run: each run keeps its own record in
|
|
6
|
+
its folder on that machine. You can close the window, lose the network or shut the
|
|
7
|
+
laptop, and the run goes on. When you come back, the window finds it again.
|
|
8
|
+
|
|
9
|
+
The machines a window reaches run Linux (or macOS); the window itself runs on Windows,
|
|
10
|
+
macOS or Linux.
|
|
11
|
+
|
|
12
|
+
## Adding a machine
|
|
13
|
+
|
|
14
|
+
Choose **Run → Machines…**, or **Machines…** at the end of the list on the setup's
|
|
15
|
+
**Runs on** line, then **Add**:
|
|
16
|
+
|
|
17
|
+
- **From the SSH configuration** offers the hosts named in your `~/.ssh/config`, with
|
|
18
|
+
their user names, keys, ports and jump hosts.
|
|
19
|
+
- **Type a host…** takes `user@host`, with a **Port** if it is not 22.
|
|
20
|
+
|
|
21
|
+
For each machine, say:
|
|
22
|
+
|
|
23
|
+
- **solprop's Python there**: the Python that has solprop, as one path
|
|
24
|
+
(`~/env/bin/python`, say, where `~/` is your home folder there) or a command the
|
|
25
|
+
machine's shell finds on its `PATH` (`python3`). It is taken as written: a variable
|
|
26
|
+
(`$SCRATCH`) or `~user` is not expanded, so write the path out in full, and it takes
|
|
27
|
+
no options. **Set up solprop there…** installs one for you (below).
|
|
28
|
+
- **Runs go in**: the folder of its runs on that machine (`~/solprop-runs` by default).
|
|
29
|
+
On a cluster, choose a folder the compute nodes can reach.
|
|
30
|
+
- **Runs start** **directly**, as a process of their own, or **as Slurm jobs**. For
|
|
31
|
+
Slurm, give what each job asks for: the **partition** (**Ask the machine** lists what
|
|
32
|
+
its `sinfo` offers), the **time limit**, **CPUs**, **memory**, **generic resources**
|
|
33
|
+
such as `gpu:1`, any further `#SBATCH` options, and any lines a job needs first, such
|
|
34
|
+
as `module load …`.
|
|
35
|
+
|
|
36
|
+
**Test the connection** says which machine answered, its solprop version and whether
|
|
37
|
+
it has Slurm. The window never stores a password: it uses your keys and agent. A machine
|
|
38
|
+
that asks for a password or a one-time code asks in a small dialog, once per connection.
|
|
39
|
+
|
|
40
|
+
## Setting a machine up
|
|
41
|
+
|
|
42
|
+
**Set up solprop there…** shows the script it will run before it runs anything. The
|
|
43
|
+
script installs `uv` in your home folder if the machine has none, makes an environment
|
|
44
|
+
for the window's solprop version under **Environments go in** (`~/.solprop/envs` by
|
|
45
|
+
default; choose another folder where your home folder has a small quota), and installs
|
|
46
|
+
solprop there from PyPI. Nothing needs root. When it finishes, its Python becomes the
|
|
47
|
+
machine's. A machine that cannot reach PyPI, or a development build that PyPI does not
|
|
48
|
+
have, installs from wheels: **Add wheels…** copies them over first.
|
|
49
|
+
|
|
50
|
+
The machine's solprop must be the window's version, or the window refuses it and says
|
|
51
|
+
so. A development build on either side is allowed, with a note on the Runs on line.
|
|
52
|
+
|
|
53
|
+
## Runs on this computer, too
|
|
54
|
+
|
|
55
|
+
Every run works this way, on your own computer as well: it is a process of its own
|
|
56
|
+
with its record in its folder, and the window follows it. So a run goes on when the
|
|
57
|
+
window closes, or crashes, and a new window takes it up again, as **Runs** finds it.
|
|
58
|
+
Closing the window over a run asks whether to **keep it running**, **stop it** (it can
|
|
59
|
+
be resumed) or **kill it**. **Run → Tie runs to this window** makes runs on this
|
|
60
|
+
computer stop by themselves, resumably, if the window goes for any reason, a crash
|
|
61
|
+
included.
|
|
62
|
+
|
|
63
|
+
## Running there
|
|
64
|
+
|
|
65
|
+
Pick the machine on the **Runs on** line, then **Run**, as on your own computer. The run
|
|
66
|
+
goes into a new folder of the machine's, named for the date, its title and the time.
|
|
67
|
+
On a Slurm machine the line shows what the job will ask for, with **Change…**.
|
|
68
|
+
|
|
69
|
+
The run's progress, spectrum and pulse appear as they do for a run on your computer.
|
|
70
|
+
They come from the run's record on the machine, so nothing is lost while you are away:
|
|
71
|
+
|
|
72
|
+
- A Slurm job waiting in the queue shows **queued**, with Slurm's reason (`Priority`,
|
|
73
|
+
`Resources`).
|
|
74
|
+
- **Stop** asks the run to stop at its next step. Its file can be resumed, as for a run
|
|
75
|
+
on your computer. A run stopped while it is queued or starting ends as soon as it
|
|
76
|
+
starts, before it computes anything.
|
|
77
|
+
- A Slurm job is sent `SIGTERM` two minutes before its time limit, so solprop writes
|
|
78
|
+
where the run stood. **Resume** then continues it as a new job.
|
|
79
|
+
|
|
80
|
+
A data file the setup reads (a measured spectrum, say) is copied beside the run on the
|
|
81
|
+
machine before it starts, and the run reads it from there. It has to be in the setup's
|
|
82
|
+
own folder, as a run on your computer requires.
|
|
83
|
+
|
|
84
|
+
Setting up, checking and the sheet's numbers stay on your computer. A results file on
|
|
85
|
+
the machine is read there: the Analyse pages ask the machine and get back only what
|
|
86
|
+
they draw, so a large file is never copied to look at it. **Export → Publication
|
|
87
|
+
figure…** draws the figure on the machine and saves it on your computer, and **Export
|
|
88
|
+
→ A copy of the results file…** copies the file itself to your computer, as it does a
|
|
89
|
+
run of your own.
|
|
90
|
+
|
|
91
|
+
A scan run on a machine runs its points in a pool of processes, sized to the CPUs and
|
|
92
|
+
memory the machine or the Slurm job gives it. One job on a cluster node of 64 cores
|
|
93
|
+
runs many points at once.
|
|
94
|
+
|
|
95
|
+
## The Runs window
|
|
96
|
+
|
|
97
|
+
**Run → Runs…** lists every run on every machine, with its state, how far it has got and
|
|
98
|
+
when it started:
|
|
99
|
+
|
|
100
|
+
| state | what it means |
|
|
101
|
+
|---|---|
|
|
102
|
+
| **queued** | Submitted to Slurm and waiting, with why |
|
|
103
|
+
| **starting** | Started, and nothing recorded yet |
|
|
104
|
+
| **running** | Going; *stopping* once asked to stop |
|
|
105
|
+
| **finished**, **stopped**, **failed** | Ended, as the run recorded |
|
|
106
|
+
| **lost** | Ended without saying how: its process went, or its job ended or was cancelled first. Its file may still be resumable: **Resume** asks solprop |
|
|
107
|
+
|
|
108
|
+
**Open** follows a run that is going, or reads the results of one that has ended.
|
|
109
|
+
**Resume** continues a run that stopped, or ended early, from where solprop says it
|
|
110
|
+
can, on its machine, and follows it.
|
|
111
|
+
**Stop** asks a run to stop. **Cancel job** ends its Slurm job or its process at once;
|
|
112
|
+
solprop still writes where the run stood. **Fetch a copy** copies a run's results file
|
|
113
|
+
to your computer, under a folder named for the machine in your workspace, and opens
|
|
114
|
+
it. **Remove** deletes a run that has ended, after asking. A machine that cannot be
|
|
115
|
+
reached says so, and is tried again at the next refresh.
|
|
116
|
+
|
|
117
|
+
## What is on the machine
|
|
118
|
+
|
|
119
|
+
Each run's folder holds its recipe (`recipe.toml`), its results (`run.h5`, or
|
|
120
|
+
`scan.h5`) and its log (`run.log`), as on your computer, and its record:
|
|
121
|
+
|
|
122
|
+
- `job.json` says how it was started;
|
|
123
|
+
- `events.bin` holds its rows and events;
|
|
124
|
+
- `status.json` summarises it;
|
|
125
|
+
- `submitted.json` says what started it;
|
|
126
|
+
- a file named `stop` asks it to stop.
|
|
127
|
+
|
|
128
|
+
A Slurm run also keeps its batch script (`job.slurm`) and its job's own output
|
|
129
|
+
(`job.out`). The folder is the truth: anyone who can read it can follow the run, and
|
|
130
|
+
`python -m solprop.service.job FOLDER` runs a prepared folder by hand.
|
|
@@ -41,6 +41,8 @@ class SolpropPinHook(MetadataHookInterface):
|
|
|
41
41
|
"""
|
|
42
42
|
metadata["dependencies"] = [
|
|
43
43
|
f"solprop=={metadata['version']}",
|
|
44
|
+
# solprop's own floor: the window's views compute with NumPy directly.
|
|
45
|
+
"numpy>=2.5",
|
|
44
46
|
# 6.10.1: the first release whose wheels admit CPython 3.14 (6.10.0 declares
|
|
45
47
|
# <3.14). Essentials holds the Qt modules the front end uses, about a third
|
|
46
48
|
# of the full PySide6.
|
|
@@ -12,7 +12,7 @@ name = "solprop-gui"
|
|
|
12
12
|
description = "A desktop front end for solprop: set up, run and read ultrafast propagation simulations"
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
# The code is GPL; the window's font, IBM Plex Sans, is under the Open Font License; the
|
|
15
|
-
# user guide's pages carried for Help, the
|
|
15
|
+
# user guide's pages carried for Help, the drawings and the icon are CC-BY (REUSE.toml).
|
|
16
16
|
license = "GPL-3.0-or-later AND OFL-1.1 AND CC-BY-4.0"
|
|
17
17
|
# The wheel carries the licences: copies of the root LICENSE and LICENSES/CC-BY-4.0.txt,
|
|
18
18
|
# since license-files cannot reach outside the project directory (tests/test_licences.py).
|
|
@@ -45,7 +45,7 @@ solprop-gui = "solprop_gui.app:main"
|
|
|
45
45
|
|
|
46
46
|
[project.urls]
|
|
47
47
|
Homepage = "https://solprop.readthedocs.io/"
|
|
48
|
-
Documentation = "https://solprop.readthedocs.io/en/
|
|
48
|
+
Documentation = "https://solprop.readthedocs.io/en/stable/guide/front-end/index.html"
|
|
49
49
|
Source = "https://github.com/LupoLab/solprop/tree/main/gui"
|
|
50
50
|
Issues = "https://github.com/LupoLab/solprop/issues"
|
|
51
51
|
Changelog = "https://github.com/LupoLab/solprop/blob/main/CHANGELOG.md"
|
|
@@ -87,7 +87,7 @@ known-first-party = ["solprop_gui"]
|
|
|
87
87
|
known-third-party = ["solprop"]
|
|
88
88
|
|
|
89
89
|
[tool.ruff.lint.per-file-ignores]
|
|
90
|
-
"tests/**" = ["D", "ANN", "PLR2004", "ARG"]
|
|
90
|
+
"tests/**" = ["D", "ANN", "PLR2004", "ARG", "PLR0917"]
|
|
91
91
|
|
|
92
92
|
# -------------------------------------------------------------------------- type check
|
|
93
93
|
[tool.basedpyright]
|
|
@@ -112,7 +112,10 @@ xfail_strict = true
|
|
|
112
112
|
# solprop's checks.
|
|
113
113
|
[tool.numpydoc_validation]
|
|
114
114
|
checks = ["all", "ES01", "SA01", "EX01", "GL01", "GL02"]
|
|
115
|
-
|
|
115
|
+
# Private names are left out: a dotted name with a single-underscore component (a private
|
|
116
|
+
# module, class or function, or anything inside one) carries a short docstring, not the
|
|
117
|
+
# public API's numpydoc sections (AGENTS.md, "Docstrings and comments").
|
|
118
|
+
exclude = ['\.__init__$', '^test_', '(^|\.)_[^_]']
|
|
116
119
|
|
|
117
120
|
# ---------------------------------------------------------------------------- coverage
|
|
118
121
|
# The quality bar is split by layer (docs/dev/gui/design.md, decision D11): the layers
|
|
@@ -124,6 +127,7 @@ branch = true
|
|
|
124
127
|
omit = [
|
|
125
128
|
"*/solprop_gui/app.py",
|
|
126
129
|
"*/solprop_gui/__main__.py",
|
|
130
|
+
"*/solprop_gui/askpass.py",
|
|
127
131
|
"*/solprop_gui/ui/*",
|
|
128
132
|
"*/solprop_gui/views/*",
|
|
129
133
|
]
|
|
@@ -10,8 +10,9 @@ can be opened in it. solprop does the physics and the window none: every number
|
|
|
10
10
|
comes from a public solprop call, made in a separate process. The design is
|
|
11
11
|
``docs/dev/gui/design.md`` in the solprop repository.
|
|
12
12
|
|
|
13
|
-
The package's layers are ``model``, ``registry`` and ``
|
|
14
|
-
Qt, and ``ui
|
|
13
|
+
The package's layers are ``model``, ``registry``, ``classes`` and ``help``, which
|
|
14
|
+
import no Qt, and ``ui`` and ``views``, which build the window. The service the window
|
|
15
|
+
reaches its kernel and its runs through is ``solprop.service``, in solprop.
|
|
15
16
|
"""
|
|
16
17
|
|
|
17
18
|
from importlib.metadata import PackageNotFoundError, version
|
|
@@ -31,15 +31,10 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
31
31
|
prog="solprop-gui", description="A desktop front end for solprop."
|
|
32
32
|
)
|
|
33
33
|
parser.add_argument("--version", action="version", version=__version__)
|
|
34
|
-
|
|
35
|
-
parser.add_argument("--workflow", action="store_true", help=argparse.SUPPRESS)
|
|
36
|
-
options = parser.parse_args(argv)
|
|
34
|
+
parser.parse_args(argv)
|
|
37
35
|
|
|
38
36
|
# Qt is imported here, after the arguments: `--version` and `--help` answer without
|
|
39
37
|
# loading it.
|
|
40
|
-
from pyqtgraph.util.garbage_collector import ( # noqa: PLC0415 - see above
|
|
41
|
-
GarbageCollector,
|
|
42
|
-
)
|
|
43
38
|
from PySide6.QtWidgets import QApplication # noqa: PLC0415 - see above
|
|
44
39
|
|
|
45
40
|
from solprop_gui.ui.identity import ( # noqa: PLC0415 - see above
|
|
@@ -48,17 +43,14 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
48
43
|
)
|
|
49
44
|
from solprop_gui.ui.workflow_window import ( # noqa: PLC0415 - see above
|
|
50
45
|
WorkflowWindow,
|
|
46
|
+
collect_between_events,
|
|
51
47
|
)
|
|
52
48
|
|
|
53
49
|
# Before the first window, so that Windows shows this application's taskbar button.
|
|
54
50
|
set_windows_app_id()
|
|
55
51
|
application = QApplication.instance() or QApplication(sys.argv[:1])
|
|
56
52
|
apply_identity(application) # pyright: ignore[reportArgumentType]
|
|
57
|
-
|
|
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)
|
|
53
|
+
collector = collect_between_events()
|
|
62
54
|
window = WorkflowWindow()
|
|
63
55
|
window.show()
|
|
64
56
|
try:
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 John C. Travers and contributors
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
|
+
|
|
5
|
+
"""Ask the user what ``ssh`` asks: a password, a passphrase or a one-time code.
|
|
6
|
+
|
|
7
|
+
``ssh`` runs the program named by ``SSH_ASKPASS`` with its question and reads the
|
|
8
|
+
answer from its output. The window names a small script (:func:`askpass_program`) that
|
|
9
|
+
runs this module, which shows the question in a dialog of its own. Nothing is stored:
|
|
10
|
+
the answer goes to ``ssh`` and nowhere else, and with a master connection per machine
|
|
11
|
+
it is asked once per connection.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import sys
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
__all__ = ["askpass_program", "main"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def askpass_program() -> str | None:
|
|
21
|
+
"""Return the program ``ssh`` should ask, written beside the window's settings.
|
|
22
|
+
|
|
23
|
+
Returns
|
|
24
|
+
-------
|
|
25
|
+
str or None
|
|
26
|
+
The program's path; ``None`` where it cannot be written, so ``ssh`` asks in
|
|
27
|
+
its own way (a terminal, or not at all).
|
|
28
|
+
"""
|
|
29
|
+
folder = Path.home() / ".solprop-gui"
|
|
30
|
+
try:
|
|
31
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
32
|
+
if sys.platform == "win32": # pragma: no cover - Windows only
|
|
33
|
+
path = folder / "askpass.cmd"
|
|
34
|
+
path.write_text(
|
|
35
|
+
f'@"{sys.executable}" -m solprop_gui.askpass %*\r\n', encoding="utf-8"
|
|
36
|
+
)
|
|
37
|
+
else:
|
|
38
|
+
path = folder / "askpass.sh"
|
|
39
|
+
path.write_text(
|
|
40
|
+
f"#!/bin/sh\nexec '{sys.executable}' -m solprop_gui.askpass \"$@\"\n",
|
|
41
|
+
encoding="utf-8",
|
|
42
|
+
)
|
|
43
|
+
path.chmod(0o700)
|
|
44
|
+
except OSError:
|
|
45
|
+
return None
|
|
46
|
+
return str(path)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def main(argv: list[str] | None = None) -> int:
|
|
50
|
+
"""Show ``ssh``'s question and print the answer.
|
|
51
|
+
|
|
52
|
+
Parameters
|
|
53
|
+
----------
|
|
54
|
+
argv : list of str or None, optional
|
|
55
|
+
The question's words; ``None`` reads the command line.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
int
|
|
60
|
+
0 with an answer, 1 when the user cancels.
|
|
61
|
+
"""
|
|
62
|
+
from PySide6.QtWidgets import QApplication, QInputDialog, QLineEdit # noqa: PLC0415
|
|
63
|
+
|
|
64
|
+
question = " ".join(sys.argv[1:] if argv is None else argv).strip() or "Password:"
|
|
65
|
+
application = QApplication.instance() or QApplication([])
|
|
66
|
+
del application
|
|
67
|
+
secret = any(word in question.lower() for word in ("password", "passphrase", "pin"))
|
|
68
|
+
mode = QLineEdit.EchoMode.Password if secret else QLineEdit.EchoMode.Normal
|
|
69
|
+
answer, given = QInputDialog.getText(None, "solprop: SSH", question, mode)
|
|
70
|
+
if not given:
|
|
71
|
+
return 1
|
|
72
|
+
sys.stdout.write(answer + "\n")
|
|
73
|
+
sys.stdout.flush()
|
|
74
|
+
return 0
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
if __name__ == "__main__": # pragma: no cover - run by ssh
|
|
78
|
+
raise SystemExit(main())
|
|
@@ -45,7 +45,6 @@ _SPECTROGRAM = AnalysisPage("spectrogram", "Spectrogram", ("fields",))
|
|
|
45
45
|
_ALONG = AnalysisPage("along", "Along z", ("statistics",))
|
|
46
46
|
_MODES = AnalysisPage("modes", "Modes", ("fields", "modes"))
|
|
47
47
|
_COMPRESS = AnalysisPage("compress", "Compress", ("fields",), "compression")
|
|
48
|
-
_NOISE = AnalysisPage("noise", "Noise and coherence", ("fields", "ensemble"))
|
|
49
48
|
_HEALTH = AnalysisPage("health", "Run health")
|
|
50
49
|
|
|
51
50
|
_PULSE = Section(
|
|
@@ -66,7 +65,7 @@ _WINDOW = Section(
|
|
|
66
65
|
(
|
|
67
66
|
Field("wavelength_limits", "Wavelengths"),
|
|
68
67
|
Field("trange", "Time window"),
|
|
69
|
-
Field("n_save", "Saved planes"),
|
|
68
|
+
Field("n_save", "Saved planes", positions="save_planes"),
|
|
70
69
|
),
|
|
71
70
|
folded=True,
|
|
72
71
|
)
|
|
@@ -187,7 +186,7 @@ FILAMENT: Final = ProblemClass(
|
|
|
187
186
|
),
|
|
188
187
|
),
|
|
189
188
|
Field("medium.pressure", "Pressure"),
|
|
190
|
-
Field("grid.length", "Propagate"
|
|
189
|
+
Field("grid.length", "Propagate"),
|
|
191
190
|
),
|
|
192
191
|
),
|
|
193
192
|
Section(
|
|
@@ -233,7 +232,7 @@ FILAMENT: Final = ProblemClass(
|
|
|
233
232
|
Field("grid.wavelength_limits", "Wavelengths"),
|
|
234
233
|
Field("grid.trange", "Time window"),
|
|
235
234
|
Field(
|
|
236
|
-
"settings.
|
|
235
|
+
"settings.n_save", "Saved planes", positions="settings.save_planes"
|
|
237
236
|
),
|
|
238
237
|
),
|
|
239
238
|
folded=True,
|
|
@@ -300,7 +299,7 @@ GNLSE: Final = ProblemClass(
|
|
|
300
299
|
(
|
|
301
300
|
Field("grid.wavelength_limits", "Wavelengths"),
|
|
302
301
|
Field("grid.trange", "Time window"),
|
|
303
|
-
Field("n_save", "Saved planes"),
|
|
302
|
+
Field("n_save", "Saved planes", positions="save_planes"),
|
|
304
303
|
),
|
|
305
304
|
folded=True,
|
|
306
305
|
),
|
|
@@ -316,7 +315,7 @@ GNLSE: Final = ProblemClass(
|
|
|
316
315
|
numbers="fibre_sheet",
|
|
317
316
|
curve="fibre_curve",
|
|
318
317
|
preview="Group-velocity dispersion against wavelength",
|
|
319
|
-
pages=(_OVERVIEW, _PLANE, _SPECTROGRAM, _ALONG, _COMPRESS,
|
|
318
|
+
pages=(_OVERVIEW, _PLANE, _SPECTROGRAM, _ALONG, _COMPRESS, _HEALTH),
|
|
320
319
|
statistics=("energy",),
|
|
321
320
|
)
|
|
322
321
|
|
|
@@ -359,7 +358,7 @@ STEP_INDEX: Final = ProblemClass(
|
|
|
359
358
|
(
|
|
360
359
|
Field("wavelength_limits", "Wavelengths"),
|
|
361
360
|
Field("trange", "Time window"),
|
|
362
|
-
Field("n_save", "Saved planes"),
|
|
361
|
+
Field("n_save", "Saved planes", positions="save_planes"),
|
|
363
362
|
),
|
|
364
363
|
folded=True,
|
|
365
364
|
),
|
|
@@ -411,7 +410,7 @@ GRIN: Final = ProblemClass(
|
|
|
411
410
|
(
|
|
412
411
|
Field("grid.wavelength_limits", "Wavelengths"),
|
|
413
412
|
Field("grid.trange", "Time window"),
|
|
414
|
-
Field("n_save", "Saved planes"),
|
|
413
|
+
Field("n_save", "Saved planes", positions="save_planes"),
|
|
415
414
|
),
|
|
416
415
|
folded=True,
|
|
417
416
|
),
|
|
@@ -447,7 +446,7 @@ CARTESIAN: Final = ProblemClass(
|
|
|
447
446
|
also=("responses[*].chi3.gas",),
|
|
448
447
|
),
|
|
449
448
|
Field("medium.pressure", "Pressure"),
|
|
450
|
-
Field("grid.length", "Propagate"
|
|
449
|
+
Field("grid.length", "Propagate"),
|
|
451
450
|
),
|
|
452
451
|
),
|
|
453
452
|
Section(
|
|
@@ -501,7 +500,7 @@ CARTESIAN: Final = ProblemClass(
|
|
|
501
500
|
Field("grid.wavelength_limits", "Wavelengths"),
|
|
502
501
|
Field("grid.trange", "Time window"),
|
|
503
502
|
Field(
|
|
504
|
-
"settings.
|
|
503
|
+
"settings.n_save", "Saved planes", positions="settings.save_planes"
|
|
505
504
|
),
|
|
506
505
|
),
|
|
507
506
|
folded=True,
|
|
@@ -545,7 +544,7 @@ CARTESIAN_BEAM: Final = ProblemClass(
|
|
|
545
544
|
also=("responses[*].chi3.gas",),
|
|
546
545
|
),
|
|
547
546
|
Field("medium.pressure", "Pressure"),
|
|
548
|
-
Field("grid.length", "Propagate"
|
|
547
|
+
Field("grid.length", "Propagate"),
|
|
549
548
|
),
|
|
550
549
|
),
|
|
551
550
|
Section(
|
|
@@ -581,7 +580,7 @@ CARTESIAN_BEAM: Final = ProblemClass(
|
|
|
581
580
|
Field("grid.wavelength_limits", "Wavelengths"),
|
|
582
581
|
Field("grid.trange", "Time window"),
|
|
583
582
|
Field(
|
|
584
|
-
"settings.
|
|
583
|
+
"settings.n_save", "Saved planes", positions="settings.save_planes"
|
|
585
584
|
),
|
|
586
585
|
),
|
|
587
586
|
folded=True,
|
|
@@ -635,7 +634,7 @@ LINE: Final = ProblemClass(
|
|
|
635
634
|
Field("grid.wavelength_limits", "Wavelengths"),
|
|
636
635
|
Field("grid.trange", "Time window"),
|
|
637
636
|
Field(
|
|
638
|
-
"settings.
|
|
637
|
+
"settings.n_save", "Saved planes", positions="settings.save_planes"
|
|
639
638
|
),
|
|
640
639
|
),
|
|
641
640
|
folded=True,
|