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

Module ramp rate to google sheet #14868

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Module ramp rate to google sheet #14868

merged 2 commits into from
Apr 11, 2024

Conversation

rclarke0
Copy link
Contributor

Overview

Calculates module ramp rates based on run log and uploads to google sheet.

Test Plan

Ramp rate script tested on all three modules with different robots.

Changelog

Created module ramp rate script to find ramp rate runs in run log folder and upload ramp rates to abr-run-data sheet
Also changed IP address in error recording to a user input rather than an input in order to allow the command to be created into a desktop shortcut.

Review requests

Risk assessment

@rclarke0 rclarke0 requested a review from a team as a code owner April 11, 2024 14:45
@rclarke0 rclarke0 requested review from a team and sfoster1 April 11, 2024 14:46
error_instrument,
error_level,
) = read_robot_logs.get_error_info(file_results)
if isinstance(file_results, dict):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with something like this, it's usually a good idea to split out these checks and the code inside them by creating some boundary where

  • we do some validity checks before entering the boundary, and therefore
  • once inside the boundary, the data is known to be valid

A common way to do it would be to have a function that takes a dict and only a dict - and doesn't check - and returns some data; and before calling the function you check that it's a dict.

Here though a good intermediate step would be to invert the logic to

if not isinstance(file_results, dict):
    continue
run_id = file_results.get("run_id", "NaN")
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha that makes sense.

@rclarke0 rclarke0 merged commit 9b45ea1 into edge Apr 11, 2024
5 checks passed
@rclarke0 rclarke0 deleted the abr-thermocycler-ramprate branch April 11, 2024 18:15
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
<!--
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

Calculates module ramp rates based on run log and uploads to google
sheet.

# Test Plan

Ramp rate script tested on all three modules with different robots. 

# Changelog

Created module ramp rate script to find ramp rate runs in run log folder
and upload ramp rates to abr-run-data sheet
Also changed IP address in error recording to a user input rather than
an input in order to allow the command to be created into a desktop
shortcut.

# Review requests

<!--
Describe any requests for your reviewers here.
-->

# Risk assessment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants