-
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
Upload Scale Value to google sheet #14691
Conversation
from .abr_read_logs import create_abr_data_sheet | ||
|
||
|
||
def write_to_sheets(file_name_csv: str, google_sheet: Any, row_list: List) -> None: |
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.
We're using this function quite a lot, right? Like we use it in pretty much all of our scripts at this point? Might be better to put it in a reusable module.
print("No google sheets credentials. Add credentials to storage notebook.") | ||
# Scale Loop | ||
break_all = False | ||
while is_stable is False: |
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.
Does this blow up your terminal with print messages waiting for the scale to stabilize? If so, you might add a small sleep at the end of your while false statement
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.
Yes. I like seeing that though because it gives you an indication of how long the scale is taking.
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.
You could take the time before you enter the while false loop and then take it when you enter the true loop and print that difference.
Whatever you prefer though.
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.
Ok, looks good!
<!-- Thanks for taking the time to open a pull request! Please make sure you've read the "Opening Pull Requests" section of our Contributing Guide: https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests To ensure your code is reviewed quickly and thoroughly, please fill out the sections below to the best of your ability! --> # Overview Reads scale value until it becomes stable and uploads value to google sheet and local csv. # Test Plan Tested with ABR scale. # Changelog Moved abr_scale script to abr_tools folder Added labware, robot, measurement step, storage directory, google sheet name as arguments saves only the stable value, rather than all of the unstable values asks the user if they want to measure another sample to reduce the number of times all arguments need to be put in . deleted analyze_abr script because no longer needed. Analysis is automated on the google sheet. # Review requests <!-- Describe any requests for your reviewers here. --> # Risk assessment <!-- Carefully go over your pull request and look at the other parts of the codebase it may affect. Look for the possibility, even if you think it's small, that your change may affect some other part of the system - for instance, changing return tip behavior in protocol may also change the behavior of labware calibration. Identify the other parts of the system your codebase may affect, so that in addition to your own review and testing, other people who may not have the system internalized as much as you can focus their attention and testing there. -->
Overview
Reads scale value until it becomes stable and uploads value to google sheet and local csv.
Test Plan
Tested with ABR scale.
Changelog
Moved abr_scale script to abr_tools folder
Added labware, robot, measurement step, storage directory, google sheet name as arguments
saves only the stable value, rather than all of the unstable values
asks the user if they want to measure another sample to reduce the number of times all arguments need to be put in .
deleted analyze_abr script because no longer needed. Analysis is automated on the google sheet.
Review requests
Risk assessment