AlgebraicJulia / GATlab.jl

GATlab: a computer algebra system based on generalized algebraic theories (GATs)
https://algebraicjulia.github.io/GATlab.jl/
MIT License
24 stars 2 forks source link

ModelingToolkit integration #53

Closed olynch closed 1 year ago

olynch commented 1 year ago

This provides an overload for ODESystem that constructs an ODESystem from a lens. This really should be refactored on top of a System struct from #52.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 61.84% and project coverage change: -1.28 :warning:

Comparison is base (f86b79f) 80.89% compared to head (620658a) 79.62%.

:exclamation: Current head 620658a differs from pull request most recent head c4a3043. Consider uploading reports for the commit c4a3043 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #53 +/- ## ========================================== - Coverage 80.89% 79.62% -1.28% ========================================== Files 33 35 +2 Lines 1052 1114 +62 ========================================== + Hits 851 887 +36 - Misses 201 227 +26 ``` | [Impacted Files](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia) | Coverage Δ | | |---|---|---| | [ext/GatlabSciMLExt/GatlabSciMLExt.jl](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia#diff-ZXh0L0dhdGxhYlNjaU1MRXh0L0dhdGxhYlNjaU1MRXh0Lmps) | `0.00% <0.00%> (ø)` | | | [src/stdlib/models/ContextMaps.jl](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia#diff-c3JjL3N0ZGxpYi9tb2RlbHMvQ29udGV4dE1hcHMuamw=) | `68.42% <0.00%> (ø)` | | | [src/syntax/Theories.jl](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia#diff-c3JjL3N5bnRheC9UaGVvcmllcy5qbA==) | `79.71% <25.00%> (-7.18%)` | :arrow_down: | | [...GatlabAlgebraicPetriExt/GatlabAlgebraicPetriExt.jl](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia#diff-ZXh0L0dhdGxhYkFsZ2VicmFpY1BldHJpRXh0L0dhdGxhYkFsZ2VicmFpY1BldHJpRXh0Lmps) | `100.00% <100.00%> (ø)` | | | [src/dsl/Parsing.jl](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia#diff-c3JjL2RzbC9QYXJzaW5nLmps) | `86.66% <100.00%> (+0.18%)` | :arrow_up: | | [src/dsl/TheoryMacros.jl](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia#diff-c3JjL2RzbC9UaGVvcnlNYWNyb3Muamw=) | `99.24% <100.00%> (+<0.01%)` | :arrow_up: | | [src/stdlib/models/SimpleLenses.jl](https://app.codecov.io/gh/AlgebraicJulia/Gatlab.jl/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AlgebraicJulia#diff-c3JjL3N0ZGxpYi9tb2RlbHMvU2ltcGxlTGVuc2VzLmps) | `80.00% <100.00%> (+5.00%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

jpfairbanks commented 1 year ago

Since CICD for MTK is going to add a lot of heft to the package, should we factor out these examples into SymbolicLenses.jl or something? Then we can test MTK integration in a separate repo. It looks like we can us GHA to test downstream deps so that Gatlab tests will reflect the status of another package. We could move faster on Gatlab and just make sure that tagged releases of Gatlab don't break the SymbolicLenses.jl package. https://github.com/SciML/SciMLBase.jl/blob/master/.github/workflows/Downstream.yml

epatters commented 1 year ago

Agreed that MTK should not be a hard dependency of this package. I assume that this was just temporary since Gatlab is not yet a released package. On that note, Julia 1.9 will be out soon with better support for optional dependencies, removing the need for Requires.jl.

olynch commented 1 year ago

Since CICD for MTK is going to add a lot of heft to the package, should we factor out these examples into SymbolicLenses.jl or something? Then we can test MTK integration in a separate repo. It looks like we can us GHA to test downstream deps so that Gatlab tests will reflect the status of another package. We could move faster on Gatlab and just make sure that tagged releases of Gatlab don't break the SymbolicLenses.jl package. https://github.com/SciML/SciMLBase.jl/blob/master/.github/workflows/Downstream.yml

I have an issue for this: #47. This is definitely not going to be merged into Gatlab, but I didn't want to go to the bother of creating a new package when I was focused on the demo.