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(hardware): allow variable number of tip presence messages #13478

Merged
merged 17 commits into from
Sep 13, 2023

Conversation

caila-marashaj
Copy link
Contributor

@caila-marashaj caila-marashaj commented Sep 6, 2023

Overview

Currently, the hardware controller is only able to process one tip presence notification. This changes tip_presence.py to wait for and return either 1 or 2 notifications, as a List[int] rather than an int.

At the hardware controller level, we check that both responses are the same, and then handle the tip presence status as a single value.

@caila-marashaj caila-marashaj requested a review from a team as a code owner September 6, 2023 19:01
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #13478 (036e64d) into edge (3ffe41c) will decrease coverage by 0.01%.
Report is 2 commits behind head on edge.
The diff coverage is 82.14%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #13478      +/-   ##
==========================================
- Coverage   71.30%   71.30%   -0.01%     
==========================================
  Files        2419     2419              
  Lines       67951    67965      +14     
  Branches     7912     7913       +1     
==========================================
+ Hits        48454    48462       +8     
- Misses      17641    17647       +6     
  Partials     1856     1856              
Flag Coverage Δ
app 68.86% <ø> (ø)
g-code-testing 96.44% <ø> (ø)
hardware 56.55% <100.00%> (+0.01%) ⬆️
hardware-testing ∅ <ø> (∅)
notify-server 89.13% <ø> (ø)
protocol-designer 45.99% <ø> (+<0.01%) ⬆️
shared-data 73.80% <37.50%> (-0.10%) ⬇️
step-generation 86.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...entrons/hardware_control/backends/ot3controller.py 68.42% <ø> (ø)
...pentrons/hardware_control/backends/ot3simulator.py 86.44% <ø> (ø)
api/src/opentrons/hardware_control/ot3api.py 79.26% <ø> (ø)
api/src/opentrons/hardware_control/types.py 96.57% <ø> (ø)
.../python/opentrons_shared_data/errors/exceptions.py 63.81% <28.57%> (-1.29%) ⬇️
...pentrons_hardware/hardware_control/tip_presence.py 100.00% <100.00%> (ø)
...-data/python/opentrons_shared_data/errors/codes.py 92.75% <100.00%> (+0.10%) ⬆️

... and 3 files with indirect coverage changes

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Looks good, though I would like to change the name of the backend argument - I feel like ideally it's just the hardware controller that knows about the 96

@caila-marashaj caila-marashaj changed the title feat(backend): allow variable number of tip presence messages feat(hardware): allow variable number of tip presence messages Sep 6, 2023
Copy link
Contributor

@Laura-Danielle Laura-Danielle left a comment

Choose a reason for hiding this comment

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

We should still not be checking tip presence for the 96 chan until we implement the motor routine.

api/src/opentrons/hardware_control/ot3api.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ahiuchingau ahiuchingau left a comment

Choose a reason for hiding this comment

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

One nit otherwise looks good to me!

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Looks good once @Laura-Danielle 's changes are addressed, some nitpicks/improvements

api/src/opentrons/hardware_control/types.py Outdated Show resolved Hide resolved
api/src/opentrons/hardware_control/types.py Outdated Show resolved Hide resolved
@caila-marashaj caila-marashaj requested a review from a team as a code owner September 12, 2023 14:56
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Couple more small changes, only really important one is the error code

shared-data/errors/definitions/1/errors.json Outdated Show resolved Hide resolved
shared-data/python/opentrons_shared_data/errors/codes.py Outdated Show resolved Hide resolved
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Noice! Looks good to me if tests pass.

@caila-marashaj caila-marashaj merged commit de9e42c into edge Sep 13, 2023
45 of 48 checks passed
@caila-marashaj caila-marashaj deleted the tip-presence-response-handling branch September 13, 2023 21:17
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.

4 participants