Skip to content

Conversation

@jgillis
Copy link
Collaborator

@jgillis jgillis commented Mar 2, 2025

The project seems seems to be stuck on pymoca 0.9.*.

Since pymoca 0.10.0, Modelica and SI are no longer listed as builtin type ( pymoca/pymoca@cf6d6a3 ).
On the other hand, pymoca cannot yet successfully parse the Modelica Standard Library.

My proposal is to introduce rtc-tools-standard-library, a manually-curated minimal standard library replacement, exclusively tailored to rtc-tools.

However, this approach may break user code when they are using standard library constructs that are untested in the rtc-tools repo.

@jgillis jgillis marked this pull request as draft March 2, 2025 22:16
@jackvreeken
Copy link
Collaborator

I would be very happy to get rid of the 0.9.x maintenance branch on the Pymoca side! I do expect Pymoca to significantly improve and make API-breaking changes over the next couple of months (e.g. in a version 0.12.x), so pinning to 0.11.x like done in this PR is the correct approach IMO.

@jbaayen
Copy link
Collaborator

jbaayen commented Mar 13, 2025

Should this branch be rebased on master?

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
36.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jgillis
Copy link
Collaborator Author

jgillis commented May 19, 2025

Rebased on new master

@jgillis jgillis requested a review from Copilot May 19, 2025 22:17
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 updates the project to use pymoca 0.11 by introducing a curated standard library replacement and fixes a minor Modelica syntax issue in a test model.

  • Add missing semicolon in Modelica test model to correct parsing
  • Bump pymoca dependency to 0.11.* and add rtc-tools-standard-library package

Reviewed Changes

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

File Description
tests/simulation/data/infeasible_initial_value/model_with_sym_ystart.mo Add missing semicolon to Real x declaration
setup.py Pin pymoca to 0.11.*, add rtc-tools-standard-library dependency
Comments suppressed due to low confidence (1)

tests/simulation/data/infeasible_initial_value/model_with_sym_ystart.mo:3

  • Missing semicolon will cause a Modelica parse error; ensure all variable declarations end with ';'.
Real x(start=x0-10);

@jgillis jgillis marked this pull request as ready for review May 19, 2025 22:18
@jarsarasty
Copy link
Contributor

Thank you for this pull request, @jgillis!

Since we will probably be moving to the LF soon, it's best to wait until the repo is migrated to merge these changes. In the coming days, we will be able to provide a likely timeline for when this will happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants