diff --git a/src/systems/model_parsing.jl b/src/systems/model_parsing.jl index 8426967827..f2f61ac1b1 100644 --- a/src/systems/model_parsing.jl +++ b/src/systems/model_parsing.jl @@ -110,6 +110,7 @@ function parse_variable_def!(dict, mod, arg, varclass, kwargs; def = nothing, indices::Union{Vector{UnitRange{Int}}, Nothing} = nothing) metatypes = [(:connection_type, VariableConnectType), (:description, VariableDescription), + (:label, VariableLabel), (:unit, VariableUnit), (:bounds, VariableBounds), (:noise, VariableNoiseType), diff --git a/test/model_parsing.jl b/test/model_parsing.jl index fa036e7350..bea07c9f73 100644 --- a/test/model_parsing.jl +++ b/test/model_parsing.jl @@ -261,13 +261,15 @@ end @testset "Metadata in variables" begin metadata = Dict(:description => "Variable to test metadata in the Model.structure", :input => true, :bounds => (-1, 1), :connection_type => :Flow, :integer => true, - :binary => false, :tunable => false, :disturbance => true, :dist => Normal(1, 1)) + :binary => false, :tunable => false, :disturbance => true, :dist => Normal(1, 1), + :label => "MockVariable") @connector MockMeta begin m(t), [description = "Variable to test metadata in the Model.structure", - input = true, bounds = (-1, 1), connect = Flow, integer = true, - binary = false, tunable = false, disturbance = true, dist = Normal(1, 1)] + label = "MockVariable", input = true, bounds = (-1, 1), connect = Flow, + integer = true, binary = false, tunable = false, disturbance = true, + dist = Normal(1, 1)] end for (k, v) in metadata