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

feat(step-generation, shared-data): pipette collision warnings #14989

Merged
merged 8 commits into from
Apr 25, 2024

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Apr 23, 2024

closes AUTH-19

Overview

Update the pipette collision warnings in step-generation for the 96-channel column pick up only for now by checking all adjacent slots to the labware of interest and checking to see if the pipette will go into the bounding boxes. The logic is sort of complicated but should match python.

Test Plan

Create a flex protocol with a 96-channel attached. Add a heater-shaker module with an adapter and labware, and add a labware. Move the tiprack off of the tiprack adapter. Make sure the labware is next to the module. Create a move liquid step and make sure its a column pick up. See that the possible collision error occurs. Move the labware around and see that it disappears when its not next to the module.

I added a bunch of test cases to test all the options to make sure it works as expected.

NOTE: the thermocycler collision stuff isn't working yet, i'll investigate more and fix it in a followup PR. I left a comment to add test coverage for it.

Changelog

  • create getFlexSurroundingSlots in shared-data that returns all surrounding slots for a slot of interest only for the flex
  • create getIsSafePipetteMovement with a bunch of helper utils to use in step-generation
  • update the old collision warning error creator and make it more generic and delete the old 96-channel collision util that was being used
  • add thorough test coverage
  • fix all instances of the step-generation util in the compound pipetting commands

Review requests

I added most of the utils to step-generation directly since I think only step-generation needs them. Lots of the utils rely on having RobotState and InvariantContext as props which is exclusive to step-generation. I added 1 util to shared-data and it is the util that returns all surrounding slots. Let me know if you have thoughts on that!

Risk assessment

medium-ish, there is a lot of logic here but i tried to thoroughly test.

@jerader
Copy link
Collaborator Author

jerader commented Apr 23, 2024

TODO:

  • add some more test coverage

)
expect(result).toEqual(false)
})
// todo(jr, 4/23/24): add more test cases, test thermocycler collision - i'll do this in a follow up
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deckSlot = modules[adapterSlot].slot
} else {
// labware on adapter on deck
// eslint-disable-next-line no-unused-vars
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i cannot seem to figure out why lint thinks line 359 isn't being used??? i'm so confused. If anyone has advice, that'd be great!

@jerader jerader marked this pull request as ready for review April 24, 2024 14:12
@jerader jerader requested review from a team as code owners April 24, 2024 14:12
@jerader jerader requested review from shlokamin, koji and ncdiehl11 and removed request for a team April 24, 2024 14:12
Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

I seem to be getting an unexpected message for following this test plan
Screenshot 2024-04-24 at 11 36 28 AM

@jerader
Copy link
Collaborator Author

jerader commented Apr 24, 2024

I seem to be getting an unexpected message for following this test plan

@ncdiehl11 , oh you need to move the tiprack off of the adapter. my bad, let me add that to the test plan!

@ncdiehl11
Copy link
Collaborator

I seem to be getting an unexpected message for following this test plan

@ncdiehl11 , oh you need to move the tiprack off of the adapter. my bad, let me add that to the test plan!

I did! Before the transfer step
Screenshot 2024-04-24 at 11 51 42 AM

Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

logic looks solid and I tested as expected with the caveat in the comment thread above

@jerader jerader merged commit bd1f8da into edge Apr 25, 2024
31 checks passed
@jerader jerader deleted the sg-update-96-collision-warnings branch April 25, 2024 02:16
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