-
Notifications
You must be signed in to change notification settings - Fork 176
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(app, api-client, react-api-client): delete POC TLC calibration data from overflow menu #12075
Conversation
… package methods to handle deletion
Codecov Report
@@ Coverage Diff @@
## edge #12075 +/- ##
==========================================
- Coverage 73.99% 73.73% -0.26%
==========================================
Files 2197 1440 -757
Lines 60839 47611 -13228
Branches 6456 2988 -3468
==========================================
- Hits 45017 35106 -9911
+ Misses 14300 12050 -2250
+ Partials 1522 455 -1067
Flags with carried forward coverage won't be shown. Click here to find out more. |
e29795b
to
0b7944d
Compare
…ata from overflow menu adds a Delete calibration data option to the overflow menus for TLC and POC calibrations from the robot settings calibration page. Also adds to the api-client and react-api-client packags methods to make a DELETE request to the /calibrations endpoint closes RAUT-307
0b7944d
to
0507edd
Compare
api-client/src/index.ts
Outdated
@@ -8,3 +8,4 @@ export * from './protocols' | |||
export * from './server' | |||
export * from './modules' | |||
export * from './pipettes' | |||
export * from './robot-calibrations' |
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.
Our naming pattern in api-client
and react-api-client
has been to name the resource directory after the api resource in the path directly. Because the api resource this is accessing is at /calibration/...
we would name this directory calibration
.
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.
ah, gotcha. Looks like calibration
works fine, I initially had calibrations
and the .gitignore
rules were ignoring the folder, I'll go ahead and make these naming updates shortly
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.
Naming scheme updated
import type { HostConfig, EmptyResponse } from '../types' | ||
import type { DeleteCalRequestParams } from './types' | ||
|
||
export function deleteCalData( |
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 file and function should be called deleteCalibration
if following past api-client
additions
.
const { deleteCalData } = useDeleteCalDataMutation() | ||
|
||
const handleDeleteCalibrationData = ( | ||
calType: 'pipetteOffset' | 'tipLength', |
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.
calType
doesn't have to be passed in as a param because it's already a top level prop here.
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.
That was my initial thought, but I followed the lead of the handleDownload
and handleCalibration
functions in this file that also passed in the calType
as an argument, happy to make the change here though if you think I should
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.
Went ahead and removed this param from this function, as well as the other similar handler functions in this file for consistency's sake
@@ -136,6 +143,9 @@ export function OverflowMenu({ | |||
const applicablePipetteOffsetCal = pipetteOffsetCalibrations?.find( | |||
p => p.mount === mount && p.pipette === serialNumber | |||
) | |||
const applicableTipLengthCal = tipLengthCalibrations?.find( |
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 is not a reliable way of retrieving the correct TLC data to delete, because it doesn't take into consideration the the tiprack identity. Each entry in the outer TLC table should probably pass through a callback or both the tiprack and pipette info to match on
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.
additional check on the tiprackUri added to make this reliable
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.
Changes look good 👍
* edge: (116 commits) feat(system-server): add sqlite database and barebones HTTP server (#12085) feat(ot3): add enableOT3FirmwareUpdates feature flag to gate firmware update functionality. (#12102) feat(app): add bare bones hardware section to protocol details (#12099) feat(app): Support failed calibrations in the calibration wizard (#12092) refactor(docs): clean up Versioning page (#12084) refactor(robot-server): Make run and protocol limits configurable at launch (#12094) feat(app): add robotServerVersion to display the current robot software version (#12096) fix(hardware): do not track tip motor positions (#12093) feat(engine): allow calibrateGripper command to save calibration data (#12046) feat(app, api-client, react-api-client): delete POC TLC calibration data from overflow menu (#12075) fix(api): actually update OT3 instrument calibration offset in cache instrument (#12089) fix(robot-server): correct the data returned from instruments endpoint (#12067) feat(api): add thermocycler plate lift to hardware controller (#12068) fix(app): reference moduleId from result not params (#12077) feat(app): create ODD protocol setup page (#12071) refactor(api): Deprecate presses and increment args when using PAPI pick_up_tip (#12079) fix(ot3): handle multiple responses for a tip action request (#12083) refactor(api): touch tip implementation for PAPIv2 engine core (#12053) refactor(app): Remove ssid parameter from OnDeviceRouteParams (#11930) fix(api): fix broken test in the api hardware controller (#12080) ...
Overview
adds a Delete calibration data option to the overflow menus for TLC and POC calibrations from the
robot settings calibration page. Also adds to the api-client and react-api-client packages, methods to
make a DELETE request to the /calibrations endpoint
closes RAUT-307
Screen.Recording.2023-01-27.at.1.43.38.PM.mov
Test Plan
Visited the Robot settings calibration page and ensured the POC and TLC overflow menus had the
Delete calibration data
options present. Clicked the delete option and ensured that the next page refresh showed the correct remaining calibrations. Double-checked local calibration data in the.opentrons
folder to ensure the correct calibration data was removedChangelog
robot-calibrations
directory and thedeleteCalData
functionrobot-calibrations
directory and theuseDeleteCalDataMutation
hookReview requests
Ensure the changes behave as expected using the above Test Plan as guidance. Ensure the mutation logic, and handle delete logic in the app all look appropriate
Risk assessment
Med - low, changes span several packages, but all new behavior is contained in a single user interaction