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

refactor(api): remove feature-flag dependency from calibration_storage #13833

Merged
merged 12 commits into from
Oct 31, 2023
Merged
69 changes: 7 additions & 62 deletions api/src/opentrons/calibration_storage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from opentrons import config

from .ot3 import ot3_gripper_offset
from .ot3 import gripper_offset
from .ot2 import mark_bad_calibration

# TODO these functions are only used in robot server. We should think about moving them and/or
Expand All @@ -23,79 +21,26 @@
delete_robot_deck_attitude,
)

if config.feature_flags.enable_ot3_hardware_controller():
from .ot3.pipette_offset import (
save_pipette_calibration,
clear_pipette_offset_calibrations,
get_pipette_offset,
delete_pipette_offset_file,
)
from .ot3.tip_length import (
clear_tip_length_calibration,
create_tip_length_data,
save_tip_length_calibration,
tip_lengths_for_pipette,
load_tip_length_calibration,
delete_tip_length_calibration,
)
from .ot3 import models
from .ot3.module_offset import (
save_module_calibration,
clear_module_offset_calibrations,
get_module_offset,
delete_module_offset_file,
load_all_module_offsets,
)
else:
from .ot2.pipette_offset import (
save_pipette_calibration,
clear_pipette_offset_calibrations,
get_pipette_offset,
delete_pipette_offset_file,
)
from .ot2.tip_length import (
clear_tip_length_calibration,
create_tip_length_data,
save_tip_length_calibration,
tip_lengths_for_pipette,
load_tip_length_calibration,
delete_tip_length_calibration,
)
from .ot2 import models # type: ignore[no-redef]
from . import ot2, ot3, helpers

__all__ = [
"helpers",
# deck calibration functions
"save_robot_deck_attitude",
"get_robot_deck_attitude",
"delete_robot_deck_attitude",
"save_robot_belt_attitude",
"get_robot_belt_attitude",
"delete_robot_belt_attitude",
# pipette calibration functions
"save_pipette_calibration",
"get_pipette_offset",
"clear_pipette_offset_calibrations",
"delete_pipette_offset_file",
# tip length calibration functions
"clear_tip_length_calibration",
"create_tip_length_data",
"save_tip_length_calibration",
"tip_lengths_for_pipette",
"delete_tip_length_calibration",
"load_tip_length_calibration",
# module calibration functions
"save_module_calibration",
"clear_module_offset_calibrations",
"get_module_offset",
"delete_module_offset_file",
"load_all_module_offsets",
# functions only used in robot server
"_save_custom_tiprack_definition",
"get_custom_tiprack_definition_for_tlc",
"get_all_pipette_offset_calibrations",
"get_all_tip_length_calibrations",
# file exports
"models",
"ot3_gripper_offset",
"gripper_offset",
"mark_bad_calibration",
# Platform specific submodules
"ot2",
"ot3",
]
28 changes: 26 additions & 2 deletions api/src/opentrons/calibration_storage/ot2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
from . import (
models as ot2_models,
models,
mark_bad_calibration,
)
from .pipette_offset import (
save_pipette_calibration,
clear_pipette_offset_calibrations,
get_pipette_offset,
delete_pipette_offset_file,
)

from .tip_length import (
clear_tip_length_calibration,
create_tip_length_data,
save_tip_length_calibration,
tip_lengths_for_pipette,
load_tip_length_calibration,
delete_tip_length_calibration,
)

__all__ = [
"ot2_models",
"models",
"mark_bad_calibration",
"save_pipette_calibration",
"clear_pipette_offset_calibrations",
"get_pipette_offset",
"delete_pipette_offset_file",
"clear_tip_length_calibration",
"create_tip_length_data",
"save_tip_length_calibration",
"tip_lengths_for_pipette",
"load_tip_length_calibration",
"delete_tip_length_calibration",
]
31 changes: 26 additions & 5 deletions api/src/opentrons/calibration_storage/ot3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
from . import (
models as ot3_models,
gripper_offset as ot3_gripper_offset,
models,
gripper_offset as gripper_offset,
)
from .pipette_offset import (
save_pipette_calibration,
clear_pipette_offset_calibrations,
get_pipette_offset,
delete_pipette_offset_file,
)
from .module_offset import (
save_module_calibration,
clear_module_offset_calibrations,
get_module_offset,
delete_module_offset_file,
load_all_module_offsets,
)


__all__ = [
"ot3_models",
"ot3_gripper_offset",
"models",
"gripper_offset",
"save_pipette_calibration",
"clear_pipette_offset_calibrations",
"get_pipette_offset",
"delete_pipette_offset_file",
"save_module_calibration",
"clear_module_offset_calibrations",
"get_module_offset",
"delete_module_offset_file",
"load_all_module_offsets",
]
181 changes: 0 additions & 181 deletions api/src/opentrons/calibration_storage/ot3/tip_length.py

This file was deleted.

Loading
Loading