Fix #205: experiment application automatic client init not working - #206
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #205 where ExperimentApplication instances were getting AttributeError when accessing experiment_client and workcell_client properties. The root cause was type annotations in ExperimentApplication that were shadowing the property descriptors inherited from MadsciClientMixin.
Key changes:
- Removed type annotations for client properties that were shadowing inherited properties from
MadsciClientMixin - Added explanatory comments documenting that client properties are inherited via
MadsciClientMixin - Refactored test mocking to use a reusable
mock_all_clients()context manager - Added regression tests to prevent this issue from recurring
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/madsci_experiment_application/madsci/experiment_application/experiment_application.py |
Removed unused client imports and type annotations that were shadowing MadsciClientMixin properties; added documentation comments explaining the inheritance |
src/madsci_experiment_application/tests/test_experiment_application.py |
Added mock_all_clients() helper function, refactored existing tests to use it, and added two new regression tests for issue #205 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Info
Developer Checklists
I have: