Skip to content

Update DL_visuals for pelicun 3.10 - #432

Merged
fmckenna merged 3 commits into
NHERI-SimCenter:masterfrom
zsarnoczay:master
Aug 5, 2026
Merged

Update DL_visuals for pelicun 3.10#432
fmckenna merged 3 commits into
NHERI-SimCenter:masterfrom
zsarnoczay:master

Conversation

@zsarnoczay

Copy link
Copy Markdown
Contributor

Two commits that keep the PBE figure pipeline working with pelicun 3.10:

  • feat: a new query dataset_paths keyword maps each default-DB alias to
    its resolved dataset directory and dataset ID through pelicun 3.10's
    resolver (the model library now lives in the separately installed DLML
    package). query default_db is unchanged, and a pelicun older than 3.10
    gets a clear error instead of a traceback.
  • fix: the generated figures reference a local plotly bundle written next
    to them instead of the CDN. The CDN tag's SRI/CORS attributes and the
    bundle's :focus-visible CSS rules both break the figures in PBE's
    QtWebEngine viewer; the bundle is patched accordingly and refreshed into
    cached figure folders automatically.

PBE needs the on-disk location of each default model dataset so it
can offer them in the component database selector. pelicun 3.10
moved these datasets out of the package tree and into the separately
installed DLML package, where their paths are only discoverable
through the library's resolver.

Add a `query dataset_paths` keyword that reads the method alias map
from the pelicun resources folder, resolves each alias through
`pelicun.file_io.resolve_default_dataset_path`, and writes a single
JSON object mapping each alias to its absolute dataset directory and
its DLML dataset ID. Leave the `query default_db` output untouched;
older PBE builds parse it.
Modern plotly emits the CDN script tag with integrity and crossorigin
attributes that fail Chromium's CORS check in the PBE figure viewer,
and its bundle injects :focus-visible CSS rules that the Chromium in
Qt 5.15 cannot parse. This leaves the figure area blank.

Write the plotly.js bundle into each figure folder and reference it
relatively (include_plotlyjs='directory'), with the :focus-visible
selectors downgraded to :focus.
@fmckenna
fmckenna merged commit 4b559e9 into NHERI-SimCenter:master Aug 5, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants