Skip to content
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

Robot firefly #221

Merged
merged 34 commits into from
Jun 28, 2024
Merged

Robot firefly #221

merged 34 commits into from
Jun 28, 2024

Conversation

yannachen
Copy link
Collaborator

No description provided.

@yannachen
Copy link
Collaborator Author

The tests in pull_request are so slow, not finished even after 8 hours.

@canismarko
Copy link
Contributor

canismarko commented May 29, 2024 via email

@canismarko
Copy link
Contributor

I cancelled the workflow because it finished the tests but didn't exit the test runner. There was 1 failure, so you could take a look while a fix the test runner (hopefully).

@yanna
Copy link

yanna commented May 29, 2024 via email

@canismarko
Copy link
Contributor

I think you may have the wrong person. I'm not Yanna Chen which I believe is the one you want.

Absolutely right. Sorry about that.

Copy link
Contributor

@canismarko canismarko left a comment

Choose a reason for hiding this comment

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

Good start, nothing major. I think most of the changes are removing commented-out code blocks or leftover print statements from development.

@@ -57,6 +61,7 @@ class FireflyApplication(PyDMApplication):
show_voltmeters_window_action: QtWidgets.QAction
show_logs_window_action: QtWidgets.QAction
launch_queuemonitor_action: QtWidgets.QAction
# show_robot_window_action: QtWidgets.QAction
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be removed if not needed.

@@ -696,6 +710,12 @@ def show_sample_viewer_window(self):
FireflyMainWindow, ui_dir / "sample_viewer.ui", name="sample_viewer"
)

# @QtCore.Slot()
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove if not needed.

@@ -140,6 +140,9 @@ def customize_ui(self):
text="Sample",
menu=self.ui.positioners_menu,
)
# Robot transfer sample
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove if not needed.


# ROBOT_NAMES = ["Austin"]

SAMPLE_NUMBERS = [8, 9, 10, 14, 15, 16, 20, 21, 22, None] # list(range(24))+[None]
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't hard-code this list of which samples are enabled in the UI layer. Can we get this information from the Robot() device somehow?

src/firefly/robot.py Show resolved Hide resolved
for i in range(num):
layout = self.regions[-1].layout
# iterate/wait, and delete all widgets in the layout in the end
while layout.count():
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be while layout.count() > 0? This current way should work okay, but checking explicitly for > 0 makes it more clear what you're thinking.

src/firefly/tests/test_robot_gui.py Show resolved Hide resolved
assert len(disp.regions) == 1


from ophyd import Component as Cpt
Copy link
Contributor

Choose a reason for hiding this comment

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

Move to top of file with other ophyd imports.

def sim_motor_registry(sim_registry):
# Create the motors
motor1 = FakeHavenMotor(name="motor1")
sim_registry.register(motor1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need to explicitly register devices anymore. Do the tests pass without these two sim_registry.register() calls?


# get macros
macros = display.macros()
print(macros)
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove print statement.

@canismarko canismarko merged commit b1167aa into spc-group:main Jun 28, 2024
1 check failed
@yannachen yannachen deleted the robot_fire branch August 12, 2024 15:50
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.

3 participants