-
Notifications
You must be signed in to change notification settings - Fork 928
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
Updated docs and check_model param #2510
Conversation
Performance benchmarks:
|
Thanks for your PR! Could you format your PR following our bug template? That makes it readable on its own, helps us review and serves as a historical reference if we ever need to revisit it. |
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.
I have left a few suggestions and 1 big point. However, some of these suggestions might have knock-on consequences elsewhere in the code. Also, you should most likely have to change the signature of MoneyModel to keyword arguments only.
The big thing is that the check in solara_viz.py
is not doing what you think it is doing. It would be good to explicitly add a test to test_solara_viz.py
which checks that the appropriate exception is raised if you try to use SolaraViz with a model that has arguments and keyword arguments.
"source": [ | ||
"# Create initial model instance\n", | ||
"model1 = MoneyModel(50, 10, 10)\n", | ||
"model1 = MoneyModel(n=50, width=10, height=10) #keyword arguments\n", |
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.
"model1 = MoneyModel(n=50, width=10, height=10) #keyword arguments\n", | |
"model = MoneyModel(n=50, width=10, height=10) #keyword arguments\n", |
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.
Needs to be model
not model1
Co-authored-by: Jan Kwakkel <[email protected]>
Co-authored-by: Jan Kwakkel <[email protected]>
Co-authored-by: Jan Kwakkel <[email protected]>
Co-authored-by: Jan Kwakkel <[email protected]>
Co-authored-by: Jan Kwakkel <[email protected]>
Co-authored-by: Jan Kwakkel <[email protected]>
@quaquel ,i have added the test case. |
I'll try to review this asap, but it might be somewhere next week before I get to it because I am traveling for work atm. |
I think all that is left is the last point on the failing read the docs built. It should be an easy fix that I had hoped to do today (but life intervened) |
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.
@nissu99 Thanks again for doing this! As indicated in #2535 this is needed
It is passing the build but I found some other model1
that need to be changed to model
For the solara_viz I would get rid of VAR_KEYWORD
all together. I also made the value error more explicit as we have some users new to python and coding. Feel free to further improve
As soon as you get this done we will get it merged!
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@tpike3 thanks for all the instructive comments ,i have made the changes. |
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.
Thanks @nissu99!
Great work, thanks! |
@tpike3 could you please Squash and merge when merging PRs? That keeps our commits on the main branch clean. Clean commits can be easier backported or reverted if needed. |
Summary
This PR adds documentation for the SolaraViz instantiation and adds a new test case to handle arguments and keyword arguments in solaraviz.
Bug / Issue
SolaraViz docs #2494
Implementation
changes in docs and explicit check in _check_model_params.
Testing
Additional Notes