Skip to content

Fixing ci - #41

Open
M-Chan wants to merge 18 commits into
dataclassesfrom
fixing_ci
Open

Fixing ci#41
M-Chan wants to merge 18 commits into
dataclassesfrom
fixing_ci

Conversation

@M-Chan

@M-Chan M-Chan commented Aug 14, 2026

Copy link
Copy Markdown

No description provided.

@JamesOHeaDLS JamesOHeaDLS 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.

Thanks @M-Chan

Comments in the review. There are also a few tests in test_motor.py and test_comms_thread.py which are still commented out. I think most of them would now run after restoring and updating

Comment thread tests/test_commsthread.py
Comment on lines +38 to +39
# assert self.obj.updateReadyEvent is None
# assert self.obj.disablePollingStatus is False

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.

updateReadyEvent can be deleted rather than commented out

disablePollingStatus now has a new equivalent that can be tested against - disablePollingStatusValue

Comment thread tests/test_motor.py
assert self.obj.ConnectionType == 1
assert (
self.obj.lneServer.text() == "172.23.171.103"
) ### CHANGE BACK TO "172.23.240.97"

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.

This should stay as the original address for the test as the other address is only for your lab tests

def update_func(self):
if self.parent.pmac is None or not self.parent.pmac.isConnectionOpen:
time.sleep(0.1)
# time.sleep(0.1)

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.

Removing the sleeps makes sense, but delete the lines rather than comment them out.

This change does highlight that some functionality has been lost with the recent changes - the ability to enable/disable polling. There is a disblePollingStatusValue variable now, but it is not checked for anywhere. This should be checked for and the timer stopped

self.timer.stop()
self.finished.emit()
self.timer.deleteLater()
self.timer = None

@JamesOHeaDLS JamesOHeaDLS Aug 21, 2026

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.

Careful with deleting and setting the timer to None if we want to be able to start and stop it when polling enabled/disabled


QMainWindow.__init__(self, parent)
self.setup_ui(self)
# self.parent = parent

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.

This commented out line can also be removed

Comment thread tests/test_login.py

def tearDown(self):
self.obj.close()
self.obj.close()

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.

Duplicate line here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants