-
Notifications
You must be signed in to change notification settings - Fork 180
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(step-generation): temperature python commands for temp & heater-shaker modules #17650
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## edge #17650 +/- ##
==========================================
+ Coverage 25.69% 25.73% +0.04%
==========================================
Files 2851 2851
Lines 219479 219589 +110
Branches 17972 18004 +32
==========================================
+ Hits 56385 56515 +130
+ Misses 163079 163059 -20
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
const moduleType = invariantContext.moduleEntities[moduleId]?.type | ||
const module = invariantContext.moduleEntities[moduleId] | ||
const moduleType = module?.type | ||
const modulePythonName = module?.pythonName |
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.
Is there ever a case where module
is undefined? Are you only doing the module?
thing because the typechecker wants it?
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.
hmm actually, good question. i don't think we should hit this since we throw an error if it is null. i'll remove it
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 i think we should keep the ?
in there to prevent whitescreens in the event that a user deleted their module or something. We should be hitting the "missing module" timeline error before hand but i think this is just addition precautions.
step-generation/src/commandCreators/atomic/waitForTemperature.ts
Outdated
Show resolved
Hide resolved
const moduleType = invariantContext.moduleEntities[moduleId]?.type | ||
const module = invariantContext.moduleEntities[moduleId] | ||
const moduleType = module?.type | ||
const pythonCommand = `${module?.pythonName}.wait_for_temperature(${celsius})` |
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.
Hey, I'm having trouble finding the wait_for_temperature()
function in the API that takes a temperature argument. Could you point me to where it is?
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.
ahh good question. i just looked in the api docs, and i don't see it either. i don't see the temperature module even emitting wait_for_temperature
, i only see it referenced for a heater-shaker 🤔 let me double check with the backend team
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.
Thanks!
When you get a chance, could you generate a Python protocol that uses the new modules you added and see if the code is runnable?
@@ -44,6 +44,7 @@ export const commandCreatorFromStepArgs = ( | |||
) | |||
|
|||
case 'setTemperature': | |||
console.log('hit set temperature', args) |
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.
Remember to clean this up before checking in :)
closes AUTH-1100
Overview
This PR adds python command support for the temperature module (
deactivate
,waitForTemprature
,setTemperature
follow up from here). it also fixes the heater-shaker temperature commands.Test Plan and Hands on Testing
Review code but there are unit tests. Also smoke test!
Here is a test i made where it tests setting a temp with and without a pause for Heater-shaker and Temperature module, as well as deactivating both. And it passes analysis:
Changelog
Risk assessment
low, behind ff