-
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
Automated ABR Calibration Data Uploading #14782
Conversation
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 great!
@@ -72,8 +74,8 @@ def upload_file(self, file_path: str) -> str: | |||
"""Upload file to Google Drive.""" | |||
file_metadata = { | |||
"name": os.path.basename(file_path), | |||
"mimeType": "application/vnd.google-apps.folder", | |||
"parents": [self.parent_folder] if self.parent_folder else "", | |||
"mimeType": "application/json", |
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.
definitely shouldn't be folder, but should this maybe depend on the kind of file? You can use the standard library mimetypes.guess_type()
for this.
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.
changed to mimetypes.guess_type! Thanks for suggestion
<!-- 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 Pulls Calibration Data from Robots and Uploads to google_drive/google_sheet # Test Plan Tested on ABR robots. Successfully pulls calibration data, uploads to google drive, and saves to google sheet. # Changelog - Adds abr_calibration_logs.py 1. Connects to google drive folder 2. Connects to google sheet 3. Pulls module, instrument, and deck calibration data and compiles into one .json file per robot via http requests 4. Uploads new files to google drive folder 5. adds new rows to instrument, module, and deck calibration sheets if the serial and calibration lastmodified timestamp pairing do not already exist - Split jira_tool up into a file with just jira_tools and a file that uses the tools with the robots. - For all scripts uploading to google drive, changed the folder_name argument to folder_id so that the service_account is writing to the correct folder. Adds email as argument to allow for permission sharing by service account. # 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
Pulls Calibration Data from Robots and Uploads to google_drive/google_sheet
Test Plan
Tested on ABR robots. Successfully pulls calibration data, uploads to google drive, and saves to google sheet.
Changelog
Review requests
Risk assessment