Skip to content

Let test.py set the OMPlot page of a report - #391

Merged
AnHeuermann merged 1 commit into
OpenModelica:masterfrom
AnHeuermann:omplot-url
Nov 4, 2026
Merged

AnHeuermann merged 1 commit into
OpenModelica:masterfrom
AnHeuermann:omplot-url

Conversation

@AnHeuermann

Copy link
Copy Markdown
Member

Makes the verification plot usable for a report on a local machine or on a private server, see OpenModelica/OpenModelica#16732 (comment). This replaces #386, and follows the suggestion there to host the OMPlot WASM with the report.

Problem

A failed verification links to the OMPlot page on the playground, and that page fetches the two .mat files itself. The files must therefore be public and allow cross-origin reads. The link does not work for a report behind a login or on a private network.

Approach

  • test.py --omplot=URL sets the OMPlot page. A relative URL is resolved against the library's report page, so a copy of OMPlot can be hosted with the results and reads them from the same origin.
  • The default stays the playground. Reports on the public site get the same links as before, and no result data goes into the HTML.
  • OMPlot cannot fetch files from file://, so there the link stays a download of the .diff.mat file.
  • The README explains how to build a copy of OMPlot with install-result-web. It is static files, about 2.4 MB.

openmodelica-library-testing-gitlab will use this: its image will contain OMPlot and pass --omplot. That change needs the merge commit of this PR, so it comes after this one.

Testing

Done locally with an AI agent (Claude), which also wrote the change.

  • Ran test.py through the openmodelica-library-testing-gitlab image on its example library, with a copy of OMPlot in the results.
  • In headless Chromium, clicked from the report's failed link to the tube plot and selected another variable. The server required a cookie, used a sub-path, sent nosniff and served .wasm with the wrong MIME type. The browser contacted only that server.
  • Opened the same report from file://: the link is a download of the .diff.mat file.
  • Loaded a real 39 MB result (1935 differing variables) in the self-hosted OMPlot directly.

Not tested: a report generated with the default URL (the only change for it is that the URL goes through new URL()), a real private GitLab instance, Firefox and Windows. CI has not run yet.

🤖 Generated with Claude Code

A failed verification links to the OMPlot page on the playground, and
that page fetches the two .mat files itself. This does not work for a
report on a local machine or behind a login, such as a private GitLab
instance (OpenModelica/OpenModelica#16732).

Add --omplot to set the page. A relative URL is resolved against the
report, so a copy of OMPlot can be hosted with the results. The default
stays the playground, and no result data goes into the HTML.

OMPlot cannot fetch files from file://, so there the link stays a
download of the .diff.mat file.

Assisted-by: Claude Opus 5.5
@AnHeuermann AnHeuermann self-assigned this Nov 4, 2026
@AnHeuermann
AnHeuermann enabled auto-merge (squash) November 4, 2026 10:09
@AnHeuermann
AnHeuermann disabled auto-merge November 4, 2026 10:39
@AnHeuermann
AnHeuermann merged commit e66ec94 into OpenModelica:master Nov 4, 2026
7 checks passed
@AnHeuermann
AnHeuermann deleted the omplot-url branch November 4, 2026 12:23
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.

1 participant