Skip to content

Conversation

DhairyaLGandhi
Copy link
Member

@DhairyaLGandhi DhairyaLGandhi commented Aug 13, 2025

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Ref #3734

Add any other context about the problem here.

Are there cases where there are expression evaluations anywhere for the model parsing? Currently everything is delayed, but that means local variables are not referred to properly, and esc will simply convert the escaped expression, whereas we need it as parse/ expansion time.

@DhairyaLGandhi DhairyaLGandhi marked this pull request as ready for review August 28, 2025 11:47
@AayushSabharwal
Copy link
Member

InterfaceI is failing

@DhairyaLGandhi
Copy link
Member Author

It's seemingly related to units, is that something this PR could break? I did rebase this branch recently as well

@AayushSabharwal
Copy link
Member

The error is specifically in the test added in this PR, and there is no unit failure on master or the recently opened #3912 so it is likely that something here is wrong.

@DhairyaLGandhi
Copy link
Member Author

Hmm, unable to reproduce locally.

I get

    struct Author end
    struct MyVersion end
    struct License end
    struct Category end
    struct Tags end
    struct MyBool end
    struct NewInt end

    @mtkmodel TestMetadataModel begin
        @metadata begin
            Author = "Test Author"
            MyVersion = "1.0.0"
            License = "MIT"
            Category => "example"
            Tags = ["test", "demo", "metadata"]
            MyBool => false
            NewInt => 1
        end
        
        @parameters begin
            k = 1.0, [description = "Gain parameter"]
        end
        
        @variables begin
            x(t), [description = "State variable"]
            y(t), [description = "Output variable"]
        end
        
        @equations begin
            D(x) ~ -k * x
            y ~ x
        end
    end
julia> @named test_model = TestMetadataModel()
Model test_model:
Equations (2):
  2 standard: see equations(test_model)
Unknowns (2): see unknowns(test_model)
  x(t): State variable
  y(t): Output variable
Parameters (1): see parameters(test_model)
  k [defaults to 1.0]: Gain parameter

@AayushSabharwal
Copy link
Member

Does it reproduce if you run the entire testset locally? Or just that file?

@DhairyaLGandhi
Copy link
Member Author

Let me try running the whole test suite locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants