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

fix(api): Sleeps do not happen in thermocycler and tempdeck when simulating. #7515

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

amitlissack
Copy link
Contributor

@amitlissack amitlissack commented Mar 18, 2021

Overview

An issue discovered during testing of fast simulation: asyncio.sleep calls in Thermocycler and Tempdeck caused needless delays in simulation.

This is a simple solution that eliminates the simulation issue. More broadly, we should strive to not use asyncio.sleep or time.sleep in our codebase. Sleep intervals are almost always estimates that can lead to unnecessary delays.

closes #7506

Changelog

  • skip sleep calls when simulating

Review requests

Risk assessment

None

@amitlissack amitlissack added api Affects the `api` project fix PR fixes a bug labels Mar 18, 2021
@amitlissack amitlissack requested review from a team and mcous and removed request for a team March 18, 2021 16:47
@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #7515 (9a8489e) into edge (78869dc) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #7515      +/-   ##
==========================================
- Coverage   82.21%   82.17%   -0.05%     
==========================================
  Files         310      310              
  Lines       20646    20654       +8     
==========================================
- Hits        16975    16972       -3     
- Misses       3671     3682      +11     
Impacted Files Coverage Δ
opentrons/hardware_control/modules/tempdeck.py 82.89% <0.00%> (-5.11%) ⬇️
opentrons/hardware_control/modules/thermocycler.py 91.46% <0.00%> (-2.85%) ⬇️
opentrons/drivers/thermocycler/driver.py 73.80% <0.00%> (-0.26%) ⬇️
opentrons/__init__.py 53.68% <0.00%> (+3.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78869dc...9a8489e. Read the comment docs.

@amitlissack amitlissack marked this pull request as ready for review March 18, 2021 18:13
@amitlissack amitlissack requested a review from a team as a code owner March 18, 2021 18:13
Copy link
Contributor

@Laura-Danielle Laura-Danielle left a comment

Choose a reason for hiding this comment

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

Looks good to me, do we want to get this into 4.2 @nusrat813? If so, we should point this to the release branch.

@amitlissack
Copy link
Contributor Author

Looks good to me, do we want to get this into 4.2 @nusrat813? If so, we should point this to the release branch.

@nusrat813 and I agreed that it is not worth delaying release for this.

@amitlissack amitlissack merged commit 8ef61c0 into edge Mar 19, 2021
@amitlissack amitlissack deleted the api-thermocycler-no-sleep-sim branch March 19, 2021 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the `api` project fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(api): Thermocycler sleeps during simulation
2 participants