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.
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PKG-INFO +1 -1
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/callbacks.py +11 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/computation.py +2 -1
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/PKG-INFO +1 -1
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/scm_version.json +2 -2
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_dash_callbacks.py +13 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_services.py +3 -1
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.coveragerc +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.flake8 +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/dependabot.yml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/deploy_PyPi.yml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/deploy_anaconda.yml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/deploy_coverage.yml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/quality.yml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.github/workflows/tests.yml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.gitignore +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/.pre-commit-config.yaml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/CONTRIBUTING.md +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/Dockerfile +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/LICENSE +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/__main__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/api.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/application/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/application/wsgi.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/admin.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/card-state.js +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/dashboard.css +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/default-settings.json +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/home-spf-radial.gif +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/home-spf-radial.png +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/logo.png +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/materials-stock.json +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/pymiesim-favicon.svg +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/pymiesim-logo-dark.svg +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/assets/pymiesim-logo.svg +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/callback_helpers.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/components/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/components/cards.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/defaults.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/experiment_service.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/interface.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/jobs.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/layout.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/material_catalog.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/models.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/citation.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/documentation.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/page.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/sections/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/sections/configuration.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/field_syntax.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/home.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/install_local.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/sellmeier.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/settings.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/page.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/sections/__init__.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/sections/representations.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/single/sections/setup.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/parsing.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/plotting.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/schemas.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/services.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/single_service.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/usage_metrics.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/validation.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/SOURCES.txt +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/dependency_links.txt +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/entry_points.txt +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/requires.txt +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/scm_file_list.json +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX.egg-info/top_level.txt +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/README.rst +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/conda.recipe/meta.yaml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/makefile +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/pyproject.toml +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/pytest.ini +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/setup.cfg +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/browser/test_dashboard.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/cli.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_admin.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_api.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tests/gui/test_usage_metrics.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tools/generate_home_spf.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tools/next_release_version.py +0 -0
- {pymiesimx-0.1.4 → pymiesimx-0.1.5}/tools/release_tag.py +0 -0
|
@@ -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
|
-
|
|
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
|
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymiesimx-0.1.4 → pymiesimx-0.1.5}/PyMieSimX/gui/pages/experiment/sections/configuration.py
RENAMED
|
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
|
|
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
|
|
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
|