PyMieSimX 0.1.4__tar.gz → 0.1.5__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.
Files changed (91) hide show
  1. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PKG-INFO +1 -1
  2. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/callbacks.py +11 -0
  3. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/computation.py +2 -1
  4. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/PKG-INFO +1 -1
  5. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/scm_version.json +2 -2
  6. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_dash_callbacks.py +13 -0
  7. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_services.py +3 -1
  8. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.coveragerc +0 -0
  9. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.flake8 +0 -0
  10. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/dependabot.yml +0 -0
  11. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/deploy_PyPi.yml +0 -0
  12. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/deploy_anaconda.yml +0 -0
  13. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/deploy_coverage.yml +0 -0
  14. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/quality.yml +0 -0
  15. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/tests.yml +0 -0
  16. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.gitignore +0 -0
  17. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.pre-commit-config.yaml +0 -0
  18. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/CONTRIBUTING.md +0 -0
  19. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/Dockerfile +0 -0
  20. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/LICENSE +0 -0
  21. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/__init__.py +0 -0
  22. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/__main__.py +0 -0
  23. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/api.py +0 -0
  24. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/application/__init__.py +0 -0
  25. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/application/wsgi.py +0 -0
  26. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/__init__.py +0 -0
  27. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/admin.py +0 -0
  28. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/card-state.js +0 -0
  29. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/dashboard.css +0 -0
  30. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/default-settings.json +0 -0
  31. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/home-spf-radial.gif +0 -0
  32. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/home-spf-radial.png +0 -0
  33. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/logo.png +0 -0
  34. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/materials-stock.json +0 -0
  35. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/pymiesim-favicon.svg +0 -0
  36. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/pymiesim-logo-dark.svg +0 -0
  37. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/pymiesim-logo.svg +0 -0
  38. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/callback_helpers.py +0 -0
  39. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/components/__init__.py +0 -0
  40. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/components/cards.py +0 -0
  41. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/defaults.py +0 -0
  42. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/experiment_service.py +0 -0
  43. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/interface.py +0 -0
  44. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/jobs.py +0 -0
  45. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/layout.py +0 -0
  46. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/material_catalog.py +0 -0
  47. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/models.py +0 -0
  48. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/__init__.py +0 -0
  49. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/citation.py +0 -0
  50. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/documentation.py +0 -0
  51. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/__init__.py +0 -0
  52. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/page.py +0 -0
  53. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/sections/__init__.py +0 -0
  54. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/sections/configuration.py +0 -0
  55. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/field_syntax.py +0 -0
  56. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/home.py +0 -0
  57. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/install_local.py +0 -0
  58. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/sellmeier.py +0 -0
  59. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/settings.py +0 -0
  60. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/__init__.py +0 -0
  61. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/page.py +0 -0
  62. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/sections/__init__.py +0 -0
  63. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/sections/representations.py +0 -0
  64. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/sections/setup.py +0 -0
  65. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/parsing.py +0 -0
  66. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/plotting.py +0 -0
  67. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/schemas.py +0 -0
  68. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/services.py +0 -0
  69. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/single_service.py +0 -0
  70. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/usage_metrics.py +0 -0
  71. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/validation.py +0 -0
  72. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/SOURCES.txt +0 -0
  73. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/dependency_links.txt +0 -0
  74. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/entry_points.txt +0 -0
  75. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/requires.txt +0 -0
  76. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/scm_file_list.json +0 -0
  77. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/top_level.txt +0 -0
  78. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/README.rst +0 -0
  79. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/conda.recipe/meta.yaml +0 -0
  80. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/makefile +0 -0
  81. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/pyproject.toml +0 -0
  82. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/pytest.ini +0 -0
  83. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/setup.cfg +0 -0
  84. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/browser/test_dashboard.py +0 -0
  85. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/cli.py +0 -0
  86. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_admin.py +0 -0
  87. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_api.py +0 -0
  88. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_usage_metrics.py +0 -0
  89. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tools/generate_home_spf.py +0 -0
  90. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tools/next_release_version.py +0 -0
  91. {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tools/release_tag.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyMieSimX
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Graphical Dash interface for PyMieSim.
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License-Expression: MIT
@@ -690,6 +690,10 @@ def register_callbacks(app: Dash, default_measure_options: list[str]) -> None:
690
690
  State("single-include-incident-field", "value"),
691
691
  State("single-run-count", "data"),
692
692
  prevent_initial_call=True,
693
+ running=[
694
+ (Output("single-graph-loading", "display"), "show", "auto"),
695
+ (Output("run-single-button", "disabled"), True, False),
696
+ ],
693
697
  )
694
698
  def _run_single(
695
699
  _run_clicks: int,
@@ -732,6 +736,13 @@ def register_callbacks(app: Dash, default_measure_options: list[str]) -> None:
732
736
  LOGGER.exception("Failed to record PyMieSimX particle-explorer metric.")
733
737
  return execution.result, execution.run_count
734
738
 
739
+ @app.callback(
740
+ Output("result-graph-loading", "display"),
741
+ Input("run-experiment-button", "disabled"),
742
+ )
743
+ def _show_experiment_computing(run_disabled: bool):
744
+ return "show" if run_disabled else "auto"
745
+
735
746
  @app.callback(
736
747
  Output("single-representation", "options"),
737
748
  Output("single-representation", "value"),
@@ -336,7 +336,8 @@ def build_single_figure(
336
336
  colorscale = PYMIESIM_BLUE_BLACK_RED
337
337
  x = np.asarray(nearfields.u.to(ureg.nanometer).magnitude, dtype=float)
338
338
  y = np.asarray(nearfields.v.to(ureg.nanometer).magnitude, dtype=float)
339
- heatmap_kwargs = {"x": x, "y": y, "z": values, "colorscale": colorscale, "colorbar": {"title": "V/m"}}
339
+ # PyMieSim indexes fields as (u, v); Plotly indexes z as (y, x).
340
+ heatmap_kwargs = {"x": x, "y": y, "z": values.T, "colorscale": colorscale, "colorbar": {"title": "V/m"}}
340
341
  if not is_absolute:
341
342
  maximum = float(np.max(np.abs(values)))
342
343
  maximum = maximum if maximum > 0 else 1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyMieSimX
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Graphical Dash interface for PyMieSim.
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License-Expression: MIT
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "0.1.4",
2
+ "tag": "0.1.5",
3
3
  "distance": 0,
4
- "node": "g2e29bb996302211b093871a257400195c74429e2",
4
+ "node": "gd609c6cff7e32e562d54244f48e9fe337e64b543",
5
5
  "dirty": false,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-10-02"
@@ -247,6 +247,12 @@ def test_single_computation_waits_for_run(monkeypatch):
247
247
  assert definition["inputs"] == [{"id": "run-single-button", "property": "n_clicks"}]
248
248
  assert {"id": "single-projection", "property": "value"} in definition["state"]
249
249
  assert {"id": "single-representation", "property": "value"} in definition["state"]
250
+ registration = next(
251
+ entry for entry in application._callback_list
252
+ if entry["output"] == "..single-result.data...single-run-count.data.."
253
+ )
254
+ assert registration["running"]["running"]["single-graph-loading.display"] == "show"
255
+ assert registration["running"]["runningOff"]["single-graph-loading.display"] == "auto"
250
256
 
251
257
  for clicks in (None, 0):
252
258
  assert run_single(
@@ -275,3 +281,10 @@ def test_single_computation_waits_for_run(monkeypatch):
275
281
  assert captured["representation"] == "spf"
276
282
  assert result == {"figure": {}, "summary": {}}
277
283
  assert run_count == 2
284
+
285
+
286
+ def test_sweep_computing_message_covers_background_job():
287
+ application = create_dash_app()
288
+ show_computing = _callback(application, "_show_experiment_computing")
289
+ assert show_computing(True) == "show"
290
+ assert show_computing(False) == "auto"
@@ -335,7 +335,8 @@ def test_single_nearfield_supports_new_scatterer_types(monkeypatch, scatterer_ty
335
335
  assert component == "Ex"
336
336
  assert type == "total"
337
337
  assert sampling == 24
338
- return {component: np.ones((sampling, sampling), dtype=complex)}
338
+ # An asymmetric field catches accidental swaps of the plane axes.
339
+ return {component: np.arange(sampling * sampling).reshape(sampling, sampling).astype(complex)}
339
340
 
340
341
  class FakeSetup:
341
342
  def get_representation(self, representation):
@@ -355,4 +356,5 @@ def test_single_nearfield_supports_new_scatterer_types(monkeypatch, scatterer_ty
355
356
 
356
357
  assert len(figure.data) == 1
357
358
  assert len(figure.data[0].z) == 24
359
+ np.testing.assert_array_equal(figure.data[0].z, np.arange(24 * 24).reshape(24, 24).T)
358
360
  assert summary["Scatterer"] == scatterer_type
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes