Repository navigation
Conversation
- Pressure_coocker: replace the removed SimpleOpening with Opening and redeclare MoistAir, required by the two-phase gas node since the default medium MyMedia became SimpleAir - DiffusionGaussian, BoundaryStepDiffusion: add the missing semicolon that attached the experiment annotation to the last equation, so it was ignored (DiffusionGaussian started at t = 0 and divided by zero, BoundaryStepDiffusion stopped at 1 s instead of 300 s) - test_counterCurrent: stop the Cr ramp at 0.99, as counterCurrent evaluates its general formula even where only the Cr = 1 limit is used (0/0 at Cr = 1) - CI: upload the OpenModelica logs of each model, and report JUnit results as job annotations instead of a separate check run that GitHub attached to the mofmt workflow and marked as failed
- Run ModelicaTests on the branch (config_new.json) and on a reference version checked out in ref/TAeZoSysPro (config_ref.json): the target branch for pull requests, the previous commit for pushes to master - Add .test/compare_results.py, which writes to the run summary the status of each model on both versions and the changes (fixed, regression, results changed on final values) - Save all variables (vars_filter ".*"): ModelicaTests' comparison fails on result files without variables, and function tests had none - Report only the branch results in the JUnit annotations
- Rename .test/compare_results.py to .test/report.py, which now writes to the run summary the results table of the ModelicaTests HTML report for the tested configuration, followed by the comparison with the reference - Compute relative differences with ModelicaTests' compute_relative_diff, and list the 10 largest ones for each model whose results changed, as in the ModelicaTests HTML comparison - Remove the JUnit report step
…aster - config_new_openmodelica.json: the library is now in src/TAeZoSysPro - config_ref_openmodelica.json: let ModelicaTests clone master of EDF-Lab/TAeZoSysPro (package_path src/TAeZoSysPro/package.mo), as for ThermoSysPro, instead of checking it out in the workflow - If the reference cannot be tested (master still has the library at the repository root until this layout is merged), test the checked out version alone and report the comparison as not available
Copy of the Modelica package of taezosyspro_testsuite (commit 01db269, https://gitlab.pam-retd.fr/TAeZoSysPro/taezosyspro_testsuite), without its Scripts folder. Files are UTF-8 without BOM, without non-ASCII characters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two GitHub Actions workflows: automatic OpenModelica tests compared with
master, and automatic formatting of the Modelica code with mofmt. It also fixes the 3 models that failed with OpenModelica. On the branch, 22/22 tested models simulate, against 19/22 onmaster.CI: OpenModelica tests (
.github/workflows/openmodelica-tests.yml)ExamplesandTestspackages (22 models). They are run with ModelicaTests in theopenmodelica/openmodelica:v1.26.7-ompythonimage, with MSL 3.2.3.master: the previous commit..test/config_new_openmodelica.json(tested version) and.test/config_ref_openmodelica.json(reference, checked out inref/TAeZoSysPro)..test/report.pywrites the run summary.master, pull requests tomaster, manual run.Required setting: ModelicaTests is private. Add a repository secret
MODELICATESTS_TOKEN, a GitLab token withread_repositoryaccess to ModelicaTests. For the same reason, pull requests from forks, including this one, cannot access the secret: the test job is skipped instead of failing. The results of this branch can be seen in the fork's runs: https://github.com/bmazurie/TAeZoSysPro/actionsCI: mofmt formatting (
.github/workflows/mofmt.yml).mofiles andgithub-actions[bot]pushes astyle: format Modelica code with mofmtcommit to the branch.master, nothing is pushed; the job fails if some files are not formatted.Library changes
f80a1f5,665251eand70983cd. This touches 170.mofiles, without semantic change: the test results of all unchanged models are identical. To review the rest, look at the other commits one by one.MoistAir.mo,GasNode_two_phases.mo,Conduction.mo,FanVentilation.mo).FluidDynamics.Examples.Pressure_coocker:SimpleOpening, removed in53fb7ef, is replaced byOpening.MoistAiris redeclared:GasNode_two_phasesneeds a condensable medium, and the default mediumMyMediahas beenSimpleAirsinceda9e7c9.PDE.Examples.DiffusionGaussianandPDE.Examples.BoundaryStepDiffusion: add the missing;after the last equation. Theexperimentannotation was attached to that equation and ignored. As a result,DiffusionGaussianstarted at t = 0 and divided by zero, andBoundaryStepDiffusionstopped at 1 s instead of 300 s.HeatTransfer.Functions.ExchangerEffectiveness.Tests.test_counterCurrent: theCrramp now stops at 0.99.counterCurrentevaluates its general formula, which is 0/0 atCr = 1, even whereregSteponly uses theCr = 1limit.Test results (branch vs master)
Pressure_coocker,test_counterCurrent,DiffusionGaussian.BoundaryStepDiffusion, which now runs until 300 s.Known limitations and follow-ups
GITHUB_TOKEN).counterCurrentstill divides by zero atCr = 1. Components that use it (HeatExchanger,AnalyticExchanger,DiscreteExchanger) would fail if both heat capacity rates became equal. Not changed here.Inverse.NTU_coCurrenthas aninverseannotation pointing tocounterCurrentinstead ofcoCurrent, probably a copy-paste error. Not changed here.urlfeature clones intoREPO_<lib>_<n>, which fails whenpackage.mois at the repository root, as here.compare_rescrashes when a result file has no variable..git-blame-ignore-revsfile listing the mofmt commits could be added, so thatgit blameskips the reformatting.