-
Notifications
You must be signed in to change notification settings - Fork 0
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: change state to userdict #44
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.
This looks great! The only suggestion I have is to add a minimal jupyter notebook under docs/cycle that outlines the new functionality, i.e., how the state can be modified (adding fields, changing delta functions).
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 great!
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 think this needs a bunch of automated tests before it gets merged — it's such a central part of the core, that we really need confidence it's working!
@@ -45,8 +45,95 @@ def __add__(self: C, other: Union[Delta, Mapping]) -> C: | |||
S = TypeVar("S", bound=DeltaAddable) | |||
|
|||
|
|||
class StateDict(UserDict): |
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 think this class would benefit from a bunch of doctests which demo and check it's full functionality! You could start with the doctests in the StandardState as an example, and then add the new functionality too.
…onal-approach docs: update docs with functional workflow approach examples
Description
Change state into a user dict
Type of change
feat: A new feature
BREAKING_CHANGE: Not sure if it breaks existing code, but tests/notebooks in the core worked fine
Remarks (Optional)