-
Notifications
You must be signed in to change notification settings - Fork 35
Add support for creating an empty Simulation #520
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
Conversation
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 like the idea, but will let @lrennels do a proper review of the code :)
What’s the use case here? Doesn’t the new API work about the same but by deep copying the existing sim and then adding a few characteristics like models and N? |
This was in response to James' issue. It occurred to me that he could allocated an empty sim and use the functional API to add to it in each component's file. We might streamline the API as we discussed. Alternatively, we could modify |
Ah ok so this is in line with our conversation at the end today, not just the API we had on the board. |
We could also generally think about support for merging simulations? Either via |
Yes, Maybe a better pattern for James' case: each file with a |
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.
Looks like some tests are failing so I will look into that!
Looks good to me! |
Made it possible to call
sim = Simulation()
and use the new API to populatesim
.