-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add allow_module_overrides to AsyncDriver #1217
Add allow_module_overrides to AsyncDriver #1217
Conversation
Hey @rwhitten577, here is an example of how you can ask me to improve this pull request: @Sweep Add a unit test for AsyncDriver that verifies the behavior when multiple modules with the same function name are provided directly to the constructor (rather than through the Builder), testing both with and without allow_module_overrides=True. 📖 For more information on how to use Sweep, please read our documentation. |
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 good to me! Reviewed everything up to 0d3db5d in 6 seconds
More details
- Looked at
74
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. tests/test_async_driver.py:330
- Draft comment:
Consider adding a comment to explain the purpose of this test and the expected behavior whenallow_module_overrides
is used. This will improve the readability and maintainability of the test. - Reason this comment was not posted:
Confidence changes required:20%
The PR adds a new parameterallow_module_overrides
to theAsyncDriver
class and ensures it is passed correctly fromAsyncBuilder
. The testtest_async_builder_allow_module_overrides
verifies this functionality. However, the test could be improved by adding a comment to explain the purpose of the test and the expected behavior whenallow_module_overrides
is used.
2. hamilton/async_driver.py:201
- Draft comment:
The parameterallow_module_overrides
is accessed as_allow_module_overrides
in theBuilder
class. Consider using consistent naming across classes to avoid confusion. - Reason this comment was not posted:
Confidence changes required:50%
The code inasync_driver.py
andtest_async_driver.py
is generally well-structured and follows the given principles. However, there is a minor issue with the naming consistency of theallow_module_overrides
parameter in theAsyncDriver
class. The parameter is namedallow_module_overrides
in theAsyncDriver
class, but it is accessed as_allow_module_overrides
in theBuilder
class. This inconsistency could lead to confusion. It would be better to maintain consistent naming across the classes.
Workflow ID: wflow_h1iyTFyWEsERaH3Q
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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 good! Would be nice to have a test for build_without_init
(could just add this to the one you have, or create another), but that's not necessary
Thanks @elijahbenizzy , just added! |
AsyncDriver got left out of the
.allow_module_overrides
feature. Adding support for it .Fixes #1216
Changes
allow_module_overrides
from AsyncBuilder -> AsyncDriver -> DriverHow I tested this
Notes
Checklist