Skip to content

New reference files for examples with missing references - #4874

Merged
MatthiasBSchaefer merged 1 commit into
modelica:masterfrom
MatthiasBSchaefer:FixMissingMasterExamples
Nov 26, 2026
Merged

MatthiasBSchaefer merged 1 commit into
modelica:masterfrom
MatthiasBSchaefer:FixMissingMasterExamples

Conversation

@MatthiasBSchaefer

Copy link
Copy Markdown
Contributor

The following examples currently do not have reference files:

Modelica/Electrical/Analog/Examples/OpAmps/MeasureRiseTime
Modelica/Electrical/Polyphase/Examples/PolyphaseInitialization
Modelica/Math/Nonlinear/Examples/MovingIntegral
ModelicaTest/Math/TestErf

This PR fixes that

…OpAmps/MeasureRiseTime Modelica/Electrical/Polyphase/Examples/PolyphaseInitialization Modelica/Math/Nonlinear/Examples/MovingIntegral and ModelicaTest/Math/TestErf which are missing in master branch

@AHaumer AHaumer left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fine with me.
Modelica/Electrical/Analog/Examples/OpAmps/MeasureRiseTime would have come with already prepared PR #4869 after CI had been established.

@AHaumer AHaumer added L: Electrical.Analog Issue addresses Modelica.Electrical.Analog L: Math Issue addresses Modelica.Math L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined L: Electrical.Polyphase Issue addresses Modelica.Electrical.Polyhase ref-result Issue addresses the reference results labels Nov 25, 2026
@AHaumer AHaumer added this to the maintenance milestone Nov 25, 2026
@MSL-RegressionTesting-CI

Copy link
Copy Markdown

@MatthiasBSchaefer

Copy link
Copy Markdown
Contributor Author

Since there was no change in any .mo-file, the regression testing tested all examples.
With the limited computational resources of a github runner (pull request testing) some examples time-outed (after 600s) which they didn't in the master testing- (running on a more powerful machine).
So in my opinion the negative result of the regression testing are false positives (which i have to care about in the setup of the regression testing)

@HansOlsson

Copy link
Copy Markdown
Contributor

Since there was no change in any .mo-file, the regression testing tested all examples. With the limited computational resources of a github runner (pull request testing) some examples time-outed (after 600s) which they didn't in the master testing- (running on a more powerful machine). So in my opinion the negative result of the regression testing are false positives (which i have to care about in the setup of the regression testing)

Given the limited resources for regression testing it seems sub-optimal that all examples are re-run if there are no changes in any .mo-file. (I could understand re-running a lot if there are changes in C-code, but not if there are neither changes in C-code nor in Modelica-code.)

Just adding a note "Regression test not run since no change of code" might suffice.

But, it also seems to indicate another issue: if there had been one example model changed together with these updated reference results, would that only had run the updated example model and not the models with new/updated reference results?

For the future, as I understand it we will not have examples without references so at least this specific case will be rare - so I tried to think of other cases where no Modelica code was changed, and to me the relevant cases are:

  • Changes in Readme.md, Security.md, Contribution.md, and License. No regression test needed. I don't know how common this is, but it may be rare.
  • Changes in Modelica/Resources - seems that we should re-run examples using external C-code (note: I don't separate between different libraries or even between code, header and build projects). Fairly common; is that handled?
  • Changes in reference-results (as in this case). Should re-run at least the related cases. It seems this is not handled, how complicated would it be to detect that the reference directory was changed and re-run just that example? (And in case both code and reference-result was update re-run their union.)

I don't think all of that is urgent, but just want to have an overview.

@HansOlsson HansOlsson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems good. As far as I can see those examples are now Ok.

@MatthiasBSchaefer

Copy link
Copy Markdown
Contributor Author

Given the limited resources for regression testing it seems sub-optimal that all examples are re-run if there are no changes in any .mo-file. (I could understand re-running a lot if there are changes in C-code, but not if there are neither changes in C-code nor in Modelica-code.)

Just adding a note "Regression test not run since no change of code" might suffice.

But, it also seems to indicate another issue: if there had been one example model changed together with these updated reference results, would that only had run the updated example model and not the models with new/updated reference results?

For the future, as I understand it we will not have examples without references so at least this specific case will be rare - so I tried to think of other cases where no Modelica code was changed, and to me the relevant cases are:

* Changes in Readme.md, Security.md, Contribution.md, and License. No regression test needed. I don't know how common this is, but it may be rare.

* Changes in Modelica/Resources - seems that we should re-run examples using external C-code (note: I don't separate between different libraries or even between code, header and build projects). Fairly common; is that handled?

* Changes in reference-results (as in this case). Should re-run at least the related cases. It seems this is not handled, how complicated would it be to detect that the reference directory was changed and re-run just that example? (And in case both code and reference-result was update re-run their union.)

I don't think all of that is urgent, but just want to have an overview.

Thanks for the feedback.
I'll try to improve the rules, which examples are tested.
But - as you pointed out - it's not trivial to find the minimal set of affected examples, without missing one ...

@MatthiasBSchaefer
MatthiasBSchaefer merged commit 7ac7a11 into modelica:master Nov 26, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: Electrical.Analog Issue addresses Modelica.Electrical.Analog L: Electrical.Polyphase Issue addresses Modelica.Electrical.Polyhase L: Math Issue addresses Modelica.Math L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined ref-result Issue addresses the reference results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants