AlgebraicJulia / SyntacticModels.jl

Specifying models with syntax trees
MIT License
3 stars 3 forks source link

Swap out Decapodes dep for DiagEqs #33

Closed lukem12345 closed 8 months ago

lukem12345 commented 8 months ago

Close #32

lukem12345 commented 8 months ago

@jpfairbanks If tests pass this will be good to merge upon your review.

lukem12345 commented 8 months ago

@jpfairbanks I will get back to working on this at 4:15, but if the fix is obvious to you, you can push here in the meantime.

lukem12345 commented 8 months ago

@jpfairbanks Tests pass locally. These are the contents of harmonic_oscillator.json. Please advise on if this is the JSON we want:

{
    "annotations": [
        {
            "note": {
                "str": "The X variable.",
                "_type": "Name"
            },
            "type": "Form0",
            "entity": "X",
            "_type": "Annotation"
        }
    ],
    "header": {
        "description": "A Simple Harmonic Oscillator as a Diagrammatic Equation",
        "name": "harmonic_oscillator",
        "_type": "Header",
        "model_version": "v1.0",
        "schema": "modelreps.io/DecaExpr",
        "schema_name": "DecaExpr"
    },
    "_type": "ASKEMDecaExpr",
    "model": {
        "context": [
            {
                "var": "X",
                "dim": "Form0",
                "space": "Point"
            },
            {
                "var": "V",
                "dim": "Form0",
                "space": "Point"
            },
            {
                "var": "k",
                "dim": "Constant",
                "space": "Point"
            }
        ],
        "_type": "DecaExpr",
        "equations": [
            {
                "rhs": {
                    "name": "V",
                    "_type": "Var"
                },
                "lhs": {
                    "var": {
                        "name": "X",
                        "_type": "Var"
                    },
                    "_type": "Tan"
                },
                "_type": "Eq"
            },
            {
                "rhs": {
                    "args": [
                        {
                            "name": "-1",
                            "_type": "Lit"
                        },
                        {
                            "name": "k",
                            "_type": "Var"
                        },
                        {
                            "name": "X",
                            "_type": "Var"
                        }
                    ],
                    "_type": "Mult"
                },
                "lhs": {
                    "var": {
                        "name": "V",
                        "_type": "Var"
                    },
                    "_type": "Tan"
                },
                "_type": "Eq"
            }
        ]
    }
}
codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (0ea6f64) 81.74% compared to head (529aa2e) 81.57%.

Files Patch % Lines
src/decapodes.jl 90.90% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #33 +/- ## ========================================== - Coverage 81.74% 81.57% -0.17% ========================================== Files 6 6 Lines 378 380 +2 ========================================== + Hits 309 310 +1 - Misses 69 70 +1 ```

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

jpfairbanks commented 8 months ago

LGTM

lukem12345 commented 8 months ago

Swapped in DiagrammaticEquations in the docs. Will merge whenever they pass.