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(app): rewire cli and jupyter snippets to offsets modals #12180

Merged
merged 9 commits into from
Mar 3, 2023

Conversation

b-cooper
Copy link
Contributor

@b-cooper b-cooper commented Feb 17, 2023

Overview

Rewire and fix the CLI and Jupyter labware offset snippets to their three
new locations in the app.

Closes RLAB-300, and RLAB-196.

Screen Shot 2023-03-02 at 4 09 16 PM

Review requests

  • with the advanced setting to show offsets for usage in Jupyter and CLI, access snippets and confirm that they are valid and accurate.

Risk assessment

low, this is only available behind an advanced setting

Closes RLAB-300 by rewiring and fixing the cli and Jupyter labware offset snippets to their three
new locations in the app.

Closes RLAB-300
@b-cooper b-cooper requested review from a team, brenthagen and koji and removed request for a team, brenthagen and koji February 17, 2023 22:46
@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Merging #12180 (829ca03) into edge (a7b5fce) will decrease coverage by 0.09%.
The diff coverage is 59.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #12180      +/-   ##
==========================================
- Coverage   74.03%   73.95%   -0.09%     
==========================================
  Files        2172     2156      -16     
  Lines       59836    59327     -509     
  Branches     6145     6453     +308     
==========================================
- Hits        44302    43873     -429     
+ Misses      14151    13983     -168     
- Partials     1383     1471      +88     
Flag Coverage Δ
app 72.33% <59.70%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...src/molecules/PythonLabwareOffsetSnippet/index.tsx 14.28% <0.00%> (ø)
...ganisms/ChooseRobotToRunProtocolSlideout/index.tsx 67.56% <0.00%> (-5.97%) ⬇️
...colRun/SetupLabware/LaunchLabwarePositionCheck.tsx 63.33% <0.00%> (ø)
.../organisms/LabwarePositionCheck/ResultsSummary.tsx 73.17% <0.00%> (-12.55%) ⬇️
app/src/pages/AppSettings/AdvancedSettings.tsx 69.13% <ø> (ø)
...s/ProtocolRun/SetupLabware/CurrentOffsetsModal.tsx 68.00% <33.33%> (-22.00%) ⬇️
...ecules/PythonLabwareOffsetSnippet/createSnippet.ts 85.10% <81.57%> (-2.40%) ⬇️
app/src/organisms/ApplyHistoricOffsets/index.tsx 94.11% <100.00%> (+0.78%) ⬆️
app/src/organisms/ChooseProtocolSlideout/index.tsx 67.39% <100.00%> (+2.27%) ⬆️
...src/organisms/PipetteWizardFlows/ChoosePipette.tsx 94.00% <0.00%> (-6.00%) ⬇️
... and 65 more

@b-cooper b-cooper requested a review from a team as a code owner February 21, 2023 15:33
@b-cooper b-cooper requested review from mcous and removed request for a team February 21, 2023 15:33
Copy link

@emilywools emilywools left a comment

Choose a reason for hiding this comment

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

LGTM and @ecormany agrees

@b-cooper b-cooper requested review from SyntaxColoring and removed request for mcous March 2, 2023 21:40
@SyntaxColoring
Copy link
Contributor

The generated snippets look correct.

I tested by doing a run with this protocol:

metadata = {
    "apiLevel": "2.14"
}


def run(protocol):
    temperature_module = protocol.load_module("temperature module gen2", 4)

    tip_rack = protocol.load_labware("opentrons_96_tiprack_300ul", 6)
    pcr_strips = temperature_module.load_labware("opentrons_96_aluminumblock_generic_pcr_strip_200ul")

    pipette = protocol.load_instrument("p300_single_gen2", mount="left", tip_racks=[tip_rack])

    pipette.pick_up_tip()
    pipette.aspirate(25, pcr_strips["A2"].bottom(z=1))
    pipette.dispense(25, pcr_strips["H11"].bottom(z=0.8))
    pipette.return_tip()

The app generated this snippet:

import opentrons.execute
protocol = opentrons.execute.get_protocol_api("2.13")


module_1 = protocol.load_module("temperatureModuleV2", location="4")

labware_1 = protocol.load_labware("opentrons_96_tiprack_300ul", location="6")
labware_1.set_offset(x=0.00, y=1.20, z=2.00)

labware_2 = module_1.load_labware("opentrons_96_aluminumblock_generic_pcr_strip_200ul")
labware_2.set_offset(x=1.10, y=0.50, z=-10.50)

@b-cooper b-cooper merged commit 6147fb9 into edge Mar 3, 2023
@b-cooper b-cooper deleted the app_fix-create-snippet branch March 3, 2023 18:23
y3rsh added a commit that referenced this pull request Mar 6, 2023
* edge:
  refactor(protocol-engine): Shorten error docstrings (#12230)
  chore(app): update electron-builder version from v24 alpha to v24 (#12233)
  chore(app): add new icons for ODD hi-fi (#12231)
  docs: more release docs (#12226)
  fix(app, odd): check isOnDevice true instead of if it is null (#12228)
  docs: remove references to make bump in releasing (#12222)
  refactor(app): scroll to current split from jump to tick, qol tweaks to run preview (#12218)
  fix(app): rewire cli and jupyter snippets to offsets modals  (#12180)
  feat(app): handle non-deterministic protocols (#12173)
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.

None yet

3 participants