Skip to content

Expose a method to retrieve simulation data from outside of OpenCOR#440

Merged
agarny merged 4 commits intoopencor:mainfrom
agarny:issue439
Mar 3, 2026
Merged

Expose a method to retrieve simulation data from outside of OpenCOR#440
agarny merged 4 commits intoopencor:mainfrom
agarny:issue439

Conversation

@agarny
Copy link
Contributor

@agarny agarny commented Mar 3, 2026

Fixes #439.

Copilot AI review requested due to automatic review settings March 3, 2026 05:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to expose a simulationData(modelParameter) method so simulation results can be retrieved programmatically from outside the OpenCOR UI, addressing the need described in issue #439.

Changes:

  • Exposes simulationData() from SimulationExperimentView and plumbs it up through ContentsComponent to OpenCOR via defineExpose.
  • Introduces a small demo app (AppWithSimulationData.vue) showing how to call the new API from a parent component.
  • Refactors renderer-side theme typing (moves Theme to vueCommon.ts) and includes minor styling/dependency/version updates.

Reviewed changes

Copilot reviewed 9 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/renderer/src/components/views/SimulationExperimentView.vue Adds simulationData() and exposes it to parents.
src/renderer/src/components/ContentsComponent.vue Adds a ref to SimulationExperimentView and exposes a pass-through simulationData().
src/renderer/src/components/OpenCOR.vue Exposes top-level simulationData() delegating to ContentsComponent.
src/renderer/src/common/vueCommon.ts Defines Theme locally instead of importing from the package entry.
src/renderer/src/AppWithSimulationData.vue New demo usage of OpenCOR ref + simulationData().
src/renderer/src/components/dialogs/SimulationExperimentViewSettingsDialog.vue Removes unused .plot-card styling.
src/renderer/src/App.vue / AppWithOmex.vue / AppWithRawOmex.vue / AppWithMultipleInstances.vue / AppWithinContainers.vue Style import formatting changes.
src/renderer/package.json / package.json Version bump; renderer dev dependency bump.
bun.lock / src/renderer/bun.lock Lockfile updates.
src/renderer/index.ts / src/renderer/index.d.ts Removes the renderer library entry/type declaration files.
Comments suppressed due to low confidence (1)

src/renderer/package.json:49

  • This PR removes src/renderer/index.ts and src/renderer/index.d.ts, but vite.lib.config.ts still points the library build entry to ./index.ts and scripts/copy.indexdts.js still copies ../index.d.ts into dist. As-is, bun run build:lib (and the package exports.types) will break; either restore those entry/type files or update the build/scripts/exports to the new entry point.
  },
  "version": "0.20260303.1",
  "scripts": {
    "build": "vite build && bun scripts/generate.version.js",
    "build:lib": "vite build --config vite.lib.config.ts && bun scripts/copy.indexdts.js",
    "clean": "bun scripts/clean.js",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 17 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 18 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 18 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 19 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@agarny agarny merged commit 5873d44 into opencor:main Mar 3, 2026
12 checks passed
@agarny agarny deleted the issue439 branch March 3, 2026 10:38
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.

Expose a method to retrieve simulation data from outside of OpenCOR

2 participants