Skip to content

feat: add PlaneWaveFocuserDeviceInterfaceStatus to status in pwi module#60

Open
michealroberts wants to merge 1 commit intomainfrom
feature/focuser/PlaneWaveFocuserDeviceInterfaceStatus
Open

feat: add PlaneWaveFocuserDeviceInterfaceStatus to status in pwi module#60
michealroberts wants to merge 1 commit intomainfrom
feature/focuser/PlaneWaveFocuserDeviceInterfaceStatus

Conversation

@michealroberts
Copy link
Copy Markdown
Owner

feat: add PlaneWaveFocuserDeviceInterfaceStatus to status in pwi module

feat: add PlaneWaveFocuserDeviceInterfaceStatus to status in pwi module
@michealroberts michealroberts added the enhancement New feature or request label Apr 6, 2025
@michealroberts michealroberts requested a review from Copilot April 6, 2025 19:26
@michealroberts michealroberts self-assigned this Apr 6, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

@michealroberts michealroberts requested a review from Copilot April 23, 2025 10:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds a new device status class for the focuser, along with corresponding tests, and updates the package interface.

  • Introduces PlaneWaveFocuserDeviceInterfaceStatus in src/pwi/status.py with parsing and validator logic
  • Adds unit tests for focuser status parsing in test/test_status.py
  • Exposes the new focuser interface status in src/pwi/init.py

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/test_status.py Adds tests for focuser status parsing and missing key behavior
src/pwi/status.py Implements the new focuser interface status with validation logic
src/pwi/init.py Updates public API to include the new focuser status class

Comment thread src/pwi/status.py
Comment on lines +247 to +248
return value.lower() == "true"

Copy link

Copilot AI Apr 23, 2025

Choose a reason for hiding this comment

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

Consider trimming the string (e.g., using value.strip()) before converting to lowercase, to ensure robust boolean parsing when extra whitespace is present.

Suggested change
return value.lower() == "true"
return value.strip().lower() == "true"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants