-
Notifications
You must be signed in to change notification settings - Fork 178
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
chore(api): disable legacy calibration accessors on flex #13513
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
from starlette import status | ||
from fastapi import APIRouter | ||
from fastapi import APIRouter, Depends | ||
from typing import Optional | ||
|
||
from opentrons import types as ot_types | ||
from opentrons.calibration_storage.ot2 import pipette_offset, models | ||
|
||
from robot_server.hardware import get_ot2_hardware | ||
from robot_server.errors import ErrorBody | ||
from robot_server.service.pipette_offset import models as pip_models | ||
from robot_server.service.errors import RobotServerError, CommonErrorDef | ||
from robot_server.service.shared_models import calibration as cal_model | ||
|
||
from opentrons.hardware_control import API | ||
|
||
router = APIRouter() | ||
|
||
|
||
|
@@ -45,7 +48,9 @@ def _format_calibration( | |
response_model=pip_models.MultipleCalibrationsResponse, | ||
) | ||
async def get_all_pipette_offset_calibrations( | ||
pipette_id: Optional[str] = None, mount: Optional[pip_models.MountType] = None | ||
pipette_id: Optional[str] = None, | ||
mount: Optional[pip_models.MountType] = None, | ||
_: API = Depends(get_ot2_hardware), | ||
Comment on lines
50
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make sure I understand correctly: on a Flex, even retrieving pipette calibrations through these endpoints was doing the wrong thing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. This code was hardcoded to select the ot2 pipette offset loaders. |
||
) -> pip_models.MultipleCalibrationsResponse: | ||
|
||
all_calibrations = pipette_offset.get_all_pipette_offset_calibrations() | ||
|
@@ -75,7 +80,7 @@ async def get_all_pipette_offset_calibrations( | |
responses={status.HTTP_404_NOT_FOUND: {"model": ErrorBody}}, | ||
) | ||
async def delete_specific_pipette_offset_calibration( | ||
pipette_id: str, mount: pip_models.MountType | ||
pipette_id: str, mount: pip_models.MountType, _: API = Depends(get_ot2_hardware) | ||
): | ||
try: | ||
pipette_offset.delete_pipette_offset_file( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might leave this as a warning, unless this is actually more false-positive than true-positive in practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this just never should ever print ever so i can make it a warning