Skip to content

Fix #205: experiment application automatic client init not working - #206

Merged
RyanTheRobothead merged 2 commits into
unstablefrom
fix_205
Dec 31, 2025
Merged

Fix #205: experiment application automatic client init not working#206
RyanTheRobothead merged 2 commits into
unstablefrom
fix_205

Conversation

@RyanTheRobothead

Copy link
Copy Markdown
Member

PR Info

Developer Checklists

I have:

  • Run Pre-commit and Unit Tests, and ensured that they pass
  • Created or updated documentation relevant to your change
  • Created or updated unit tests relevant to your change

@RyanTheRobothead RyanTheRobothead added this to the 0.7 Release milestone Dec 27, 2025
@RyanTheRobothead RyanTheRobothead self-assigned this Dec 27, 2025
@RyanTheRobothead RyanTheRobothead added the bug Something isn't working label Dec 27, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/madsci_experiment_application/tests/test_experiment_application.py Outdated
@github-actions

github-actions Bot commented Dec 27, 2025

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/madsci_experiment_application/madsci/experiment_application
  experiment_application.py 78, 80, 84, 86
Project Total  

This report was generated by python-coverage-comment-action

@RyanTheRobothead
RyanTheRobothead merged commit 18b54d8 into unstable Dec 31, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants