-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add metadata getters #3334
base: master
Are you sure you want to change the base?
Conversation
@AayushSabharwal Haven't change |
Yeah go for it |
add to the docs section on metadata? |
This one should be ready |
|
||
meta = ( | ||
var = var, | ||
vartype, | ||
variable_source, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this key is breaking
docs/src/basics/Variable_metadata.md
Outdated
|
||
## Units | ||
|
||
Units for variables can be designated using symbolic metadata. For more information, please see the [model validation and units](@ref units) section of the docs. Note that `getunit` is equivalent to `get_unit`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getunit
and get_unit
aren't equivalent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah never mind, I read the code wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make them not equivalent? Having two functions do the same thing doesn't really help. get_unit
can do all the unit propagation it currently does, and getunit
should just make it get the VariableUnit
metadata.
Fixes #2643. Adds getters for
connect, unit, misc