Get positional constructors to accept units-bearing values. Right now, only the keyword argument ones do, which is a weird inconsistency.
There's also the question of whether units should be required, and if so, what that looks like. Taking ACBus as an example, the following args have implicit units:
ACBus(
number::Int,
name::String,
available::Bool,
bustype::Union{Nothing, ACBusTypes.Value},
angle::Union{Nothing, Float}, # NU, radians
magnitude::Union{Nothing, Float}, # CU
voltage_limits::Union{Nothing, MinMax}, # CU
base_voltage::Union{Nothing, Float}, # NU, kV
area::Union{Nothing, Area} = nothing,
load_zone::Union{Nothing, LoadZone} = nothing;
) -> ACBus
Aside: it'd make things marginally easier on the user if our positional constructors had typed arguments. As-is, if you mangle the constructor call, the "closest candidates" are listed as ACBus(::Any, ::Any, ... ::Any), which isn't terribly helpful.
Get positional constructors to accept units-bearing values. Right now, only the keyword argument ones do, which is a weird inconsistency.
There's also the question of whether units should be required, and if so, what that looks like. Taking
ACBusas an example, the following args have implicit units:Aside: it'd make things marginally easier on the user if our positional constructors had typed arguments. As-is, if you mangle the constructor call, the "closest candidates" are listed as
ACBus(::Any, ::Any, ... ::Any), which isn't terribly helpful.