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

V3a calibration nav panel #363

Merged
merged 12 commits into from
Oct 4, 2017
Merged

V3a calibration nav panel #363

merged 12 commits into from
Oct 4, 2017

Conversation

Kadee80
Copy link
Contributor

@Kadee80 Kadee80 commented Oct 3, 2017

overview

This PR implements a ConnectedSetupPanel container and SetupPanel for the calibration nav sidebar.

This PR includes:

  • Chore work
  • Bug fixes
  • Backwards-compatible feature additions
  • Breaking changes
  • Documentation updates
  • Test updates

Note: If you did not check "Documentation updates" and/or "Test updates" then your PR may not be ready!

changelog

Write descriptions for your changes. If a change is related to a GitHub issue, please tag the issue in the description.

  • (Feature) Calibration Nav Panel

Note: If your PR incorporates many changes, or many different types of changes, please consider splitting it up into smaller PRs.

review requests

@mcous this PR may just be for QC before moving on. As always, if theres a cleaner way to implement I'm all for suggestions.

@Kadee80 Kadee80 requested a review from mcous October 3, 2017 14:15
@codecov
Copy link

codecov bot commented Oct 3, 2017

Codecov Report

Merging #363 into app-3-0-alpha will decrease coverage by 0.38%.
The diff coverage is 0%.

Impacted file tree graph

@@                Coverage Diff                @@
##           app-3-0-alpha     #363      +/-   ##
=================================================
- Coverage          82.09%   81.71%   -0.39%     
=================================================
  Files                 86       88       +2     
  Lines               4877     4900      +23     
=================================================
  Hits                4004     4004              
- Misses               873      896      +23
Impacted Files Coverage Δ
app/ui/components/NavPanel.js 0% <ø> (ø) ⬆️
app/ui/containers/ConnectedSetupPanel.js 0% <0%> (ø)
app/ui/components/SetupPanel.js 0% <0%> (ø)
app/ui/components/TipProbe.js 0% <0%> (ø) ⬆️
app/ui/components/PipetteConfig.js 0% <0%> (ø) ⬆️

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 14e22ad...81a3a1d. Read the comment docs.

Copy link
Contributor

@mcous mcous left a comment

Choose a reason for hiding this comment

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

A little bit of feedback re: Array.map

}))
let tiprackList = []
let labwareList = []
labware.map((lab) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is kind of an incorrect use of an Array.map, due to the side-effects (pushing to arrays outside the map function). We could replace it with a reduce. If this is too confusing, just go ahead and replace your original map with a forEach (it's ok to side-effect in a forEach)

const {tiprackList, labwareList} = labware.reduce((result, lab) => {
  const links = LabwareLinks({...lab, isTipracksConfirmed})
  
  if (lab.isTiprack) {
    result.tiprackList.push(links)
  } else {
    result.labwareList.push(links)
  }

  return result
}
}, {tiprackList: [], labwareList: []})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Worked like a charm. Thank you

</section>

let labwareSetup
if (isInstrumentsConfirmed) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than skip these elements completely, would we want to disable (grey out + pointer-events: none) them with a tooltip instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call.

mcous
mcous previously approved these changes Oct 3, 2017
@mcous mcous dismissed their stale review October 3, 2017 18:13

Dismissing review because I noticed a necessary change

instruments: [
{
axis: 'left',
channels: 'single',
Copy link
Contributor

Choose a reason for hiding this comment

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

API returns a number (1 or 8) for this parameter. Can we change that here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind. Sticking with single and multi per RL discussion

@mcous mcous merged commit 594648d into app-3-0-alpha Oct 4, 2017
@mcous mcous deleted the v3a-calibration-nav-panel branch October 4, 2017 13:19
astaff added a commit that referenced this pull request Oct 24, 2017
* Add react-router (with redux bindings) to UI

* Reorganize container structure with routes

- Removes Root container in favor of more specific containers
- Adds ConnectedRunControls container for run controls
- Adds some basic routing to App.js (which is now top-level comp)

* implement run button in run button header, style updates

* Scaffold out routes for pipette and deck setup

* clean up run controls layout

* cleanup sidebar layout, fix run log scroll

* minor style fiddling

* fix linting errors

* Dispatch a successful connect response if already connected

* initial pipetteConfig component and styles

* static single pipette config component

* API work to enable calibration experience (#352)

* Implement `get_contaieners` and `get_instruments` and underlying code to accumulate and interpret command messages.

* Introduce `MainRouter` as a root client API object and make it contain `calibration_manager` and `session_manager`.

* Remove notification handling from `SessionManager` and `Session` and move it up to `MainRouter`, clean up tests.

* Add model data classes for labware and instruments to limit scope of client API surface.

* Add `location` to commands where appropriate and change `publish` to translate `self` to `location` if needed.

* Consolidate Client API related code under `opentrons.api`.

* wire up mock props pipette config container

* fix linting errors

* render pipettes toggle active pipette route in pipette config

* added tip probe messages as bottom panel

* shrink sidebar slightly, default tip probe state

* Fix API make install task and update client remote for MainRouter

* Fix resume and reconnect (#346)

* start task instead of await in websocket message handler loop to allow concurrent calls; add test for concurrent calls

* add test stub for concurrent connections

* fix crashes on disconnect, add tests for concurrent connections and disconnect

* send messages to different clients independently, test for simultaneous connects and disconnects

* refactor how send queues and tasks are being managed, improve tests

* Add run timer cleanup to client disconnect

* change levels for logging messages, change logging level in main.py handler, remove task from the queue once done

* make robot.smoothie_driver private

* move init of seen to top, to have it initiaized before we try to create remote objects in parallel for array

* Resolve array remotes serially to avoid type resolution race

* Calibration API Implementation (#366)

* add calibration API tests, make _simulate call exec instead of relying on run with no arguments

* add test for serializing class object attributes

* Harmonize shape of notifications, reduce state tree

* Make notification payload to be a copy of self across the board
* Remove Wells from Container data object to reduce Session state tree

* Refactor `placeable.get_container`

* Don't treat `WellSeries` as container
* Make `placeable.get_trace()` a generator
* Add functional test with full protocol to test session model

* V3a calibration nav panel (#363)

* separate container for SetupPanel
* list pipette links with optional axis params, list labware with optional params - only show once pipettes are probed
* setup panel layout updates, conditionally render labware links and run link
* layout cleanup
* conditionally disable non tipracks until tipracks have been confirmed
* add proptypes
* map -> reduce
* fix proptype
* always render laware list, disable until intruments are calibrated

* (v3 alpha, feature) Calibration API client state (#368)

* Add instrument and labware state translation to API client

* Add private ID field to RemoteObjects

* Add actions for CalibrationManager calls and responses

* Wire calibration actions and responses to API client

* Track calibration API request state in redux store

* V3a ui calibrate labware (#369)

* separate container for SetupPanel
* list pipette links with optional axis params, list labware with optional params - only show once pipettes are probed
* initial deckmap for rework
* confirm deck layout, styles
* separate deckmap function
* initial jod modal nested route, container, component. Remove position, replace with numerical slots, add ids for legacy slot names
* convert labware wrapper elements to links, add active container/link styling
* jog modal container, component, styling, and placeholder cotent and route
* cleanup labware labels
* jog modal button placeholder, general cleanup
* render default pipette imgs, reset mock state after demo, sync tip prob and labware calibration notifications to state

* (v3 alpha) Calibration UI MVP (#372)

* static jog buttons for wriring

* minor ui style updates, nav icons now router links, splash screen for upload page

* render placeholder images for bradford assay labware

* remove navlinks from sidebar, labware, pipettes in favor of current instrument and current labware

* Wire up instrument calibration and some of labware confirmation

* Wire some labware selectors to SetupPanel and DeckConfig

* Wire labware review state+button, simplify bool prop names

* update setup panel styles, default splash screen and route

* nest tip probe notifications within pipette config

* fix lint, troubleshoot Prepare for tip probe props

* Wire up labware confirmation for all Yes clicks (no jog)

* Wire up jog modal and confirmation button / reducers

* labware selected, disabled, active, confirmed styles

* Fix API calls for calibration and run (and unit tests)

* Fix lint errors in Labware.js and .css

* Driver, Pose Tracker and Calibration procedure (#374)

* driver started

* Implements working pipette probing

Create a script that serves as a functional version of pipette probing
which still needs to be logically placed into correct location in code base.
Begin implementation of Gantry and Base classes.

* Expand on Probe and Base classes

* enable OTtwo to run existing protocols

* set the slot and mount offsets

* Enable probing with both pipettes

Adjust offsets and probe position / dimensions to enable
probing for both pipettes. Also adds mounts to pipettes (this is a hack)
to enable offset values to be pulled from instruments so they can be used
in calibration. This update of the global dicts should also allow calibration
to persist between probing and running.

* corrects deck offset

* driver started

* Implements working pipette probing

Create a script that serves as a functional version of pipette probing
which still needs to be logically placed into correct location in code base.
Begin implementation of Gantry and Base classes.

* Expand on Probe and Base classes

* enable OTtwo to run existing protocols

* set the slot and mount offsets

* Enable probing with both pipettes

Adjust offsets and probe position / dimensions to enable
probing for both pipettes. Also adds mounts to pipettes (this is a hack)
to enable offset values to be pulled from instruments so they can be used
in calibration. This update of the global dicts should also allow calibration
to persist between probing and running.

* corrects deck offset

* driver and api integration work for the demo

* added axis to models.Instrument

* add jog functionality

* change jog function name

* remove robot from session, make it home before run

* use reset() instead of hard reset in robot test fixture

* Use driver.(dis)connect instead of toggling simulating flag directly

* Resin for app-3-0 (Chore) (#347)

* attempting image build

* attempting image build

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* refactor server start

* refactor server start

* refactor server start

* refactor server start

* refactor server start

* adding motion testing_script

* resin image build

* resin image build

* resin image build

* resin image build

* resin README added

* slight refactor for PR

* docs adjustment

* docs adjustment

* moved filed

* linting fix

* Change server port and fix life-testing script

* add TODOs to Dockerfile.template

* Resin for app-3-0 (Chore) (#347)

* atempting image build

* attempting image build

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* fixing Dockerfile.template

* refactor server start

* refactor server start

* refactor server start

* refactor server start

* refactor server start

* adding motion testing_script

* resin image build

* resin image build

* resin image build

* resin image build

* resin README added

* slight refactor for PR

* docs adjustment

* docs adjustment

* moved filed

* linting fix

* Change server port and fix life-testing script

* add TODOs to Dockerfile.template

* make ot_data live on USB on pi

* flip well positions for database migration

* Functional tests for API

- Added position tracking and position log for driver when running in
  simulate mode for testing purposes
- Re-wired calibration_manager.jog to call
  calibration_functions.jog_instrument properly
- Added API functional tests in api/test_functional.py consistent with
  common use cases.
- Added bradford assay edited to fit OT-2 deck

* rotate containers for ot-alpha and fix well offsets

* Make moving more consistent and tidy things up

Make instrument movement more consistent by using it's mover
instead of the driver. Also remove a few print statements and an
unused functionality in the driver.

* prevent homing of nonexistent pip

* fix tests

* modify target values for homing

* Add methods for updating z lenth of pipette in pose tracker instead of adding on the fly

* use correct variable in direct movement strategy

* adjust pipette position with tip offset

* fix ui calibration setting and track relative position

* Fixes for relative path access in posetracker, add all files starting with . to gitignore

* fix logical errors in relative position access

* adjust offsets for avagadro and toss probing deltas

* adjust offsets in prep for KV demo

* fix height of non-moving pipette during move

* functioning calibration cli

* output cleanup

* move pipette by applying transformation from deck branch of a posetracker bypassing instrument branch of pose-tracker, adjust container definitions based on real life tests, add smoke test to api/test_integration, change tip pickup move sequence and travel, change tip offset to be applied to move command instead of being tracked in posetracker

* functioning calibration cli

* output cleanup

* move pipette by applying transformation from deck branch of a posetracker bypassing instrument branch of pose-tracker, adjust container definitions based on real life tests, add smoke test to api/test_integration, change tip pickup move sequence and travel, change tip offset to be applied to move command instead of being tracked in posetracker

* refactorings after review with Ben

* integrate factory calibration with pose tracker, make changes in pose tracker to account for transformation alongside with translation, fix tests

* 1) Improved smoothie driver to not send duplicate commands if we are
already at the point for an axis
2) caching position so we don’t have to make serial calls every time we
need position, reduces the risk of error in serial comms which are shaky
3) Fix a bug that was introduced after we made `position` a tuple, after
which `+` operator did concatenation, not a vector sum
4) Improved `api/test_integration` to aggregate move logs by axis for
easier analysis
5) Added test to confirm trashbox is present in session containers when
drop_tip is called with no arguments in the protocol (cc @mike @jared)
6) Fixed api tests WRT to connect attempts being made to actual device -

* Add back in assert statement for test

* making smoke test work, refactoring calibration tests, refactoring tip probe

* fixes
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