TS-CUBED / CirculatorySystemModels.jl

MIT License
16 stars 5 forks source link

Update the lib with `@mtkmodel` #29

Closed ven-k closed 6 months ago

ven-k commented 6 months ago

This PR updates the lib with @mtkmodel DSL.

codecov-commenter commented 6 months ago

Codecov Report

Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (69e70b7) 44.07% compared to head (98cc2b6) 43.75%.

Files Patch % Lines
src/CirculatorySystemModels.jl 10.63% 42 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #29 +/- ## ========================================== - Coverage 44.07% 43.75% -0.33% ========================================== Files 1 1 Lines 422 144 -278 ========================================== - Hits 186 63 -123 + Misses 236 81 -155 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ven-k commented 6 months ago

The earlier syntax of extending components was @extend = var1, var2 = Component(). In a later version of MTK, that was changed to @extend Component(). This later version must have Julia compat as 1.9. So the CI has failed with 1.8.

Shall I update CI to 1.9, 1.10 (current latest) and nightly?

Also, the error on nightly is unrelated to this PR.

TS-CUBED commented 6 months ago

Thanks a lot for this. I had this on my todo list before Christmas, but put it on the back burner, because I did not know how to handle the conditionals. I will merge this PR now and once the other elements are adapted and MTK 9 has been tested with this (I hope to get to that in March), will release a new version.

TS-CUBED commented 2 months ago

Compliance, VariableCompliance, Elastance and ShiValve will be updated with a follow up PR. The first three need a way to set default values to conditional parameters and ShiValve needs a way to set continuous_events. PRs adding both are currently open upstream. Once they are merged I'll update them here.

I haven't followed upstream recently due to other commitments. Do we have these features (conditional parameters/branching, and continuous events) in the @mtkmodel framework?

ven-k commented 1 month ago

Yes; those features are now part of MTK@v9+.