-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add default_values
to interface
#47
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #47 +/- ##
==========================================
- Coverage 38.17% 34.03% -4.14%
==========================================
Files 7 7
Lines 296 332 +36
==========================================
Hits 113 113
- Misses 183 219 +36 ☔ View full report in Codecov by Sentry. |
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.
Does the spec says what should be used as keys or is it up to the package that implements this? I was thinking that if we use something that standardized, then the defaults are compatible between packages implementing the interface.
Also, are the default_values
something that's supposed to be immutable or not?
src/symbol_cache.jl
Outdated
@@ -75,6 +75,7 @@ all_variable_symbols(sc::SymbolCache) = variable_symbols(sc) | |||
function all_symbols(sc::SymbolCache) | |||
vcat(variable_symbols(sc), parameter_symbols(sc), independent_variable_symbols(sc)) | |||
end | |||
default_values(::SymbolCache) = Dict() |
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.
Does this create a new dictionary every time we need defaults?
All SII can say is that the keys are symbolic variables. Whether that's |
e75c0cc
to
58b29fb
Compare
58b29fb
to
7713bc0
Compare
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.
The mutability of the defaults dictionary is needed for updating the default values?
Right now it's somewhat arbitrary. I don't think we'll need it to be mutable in remake or anywhere else, but you mentioned that we should standardize it and mutability offers us more flexibility in the future. |
Yeah, it's nicer if it's mutable, that makes it easier in certain situations. |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.