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

refactor(app): Use generic actions in /calibration API module #1819

Merged
merged 1 commit into from
Jul 6, 2018

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Jul 5, 2018

overview

This PR removes the calibration.js module specific api:CAL_REQUEST, etc actions in favor of
the new, generic api:REQUEST, etc actions. Making the calibration module more generic also meant moving the jog step size out of redux and into the state of the JogControls component, as had been discussed with @b-cooper.

This PR is prep work for a modules.js API client module for #1735 and continues work started in #1813.

changelog

  • refactor(app): Use generic actions in /calibration API module

review requests

The following peices of logic have been touched, and we should verify all is still well:

  • Token release clears /calibration/deck/start response state
    • Happens whenever you click "Exit" in Deck Calibration
  • Jogging in Deck Calibration
  • Jogging in runtime Labware Calibration

Removed the module specific api:CAL_REQUEST, etc actions in favor of
api:REQUEST, etc. Making the calibration module more generic also meant
moving the jog step size out of redux and into the state of the
JogControls component, as had been discussed with @b-cooper
@mcous mcous added app Affects the `app` project ready for review refactor labels Jul 5, 2018
@mcous mcous requested review from Kadee80, b-cooper and IanLondon July 5, 2018 16:45
@codecov
Copy link

codecov bot commented Jul 5, 2018

Codecov Report

Merging #1819 into edge will increase coverage by 0.03%.
The diff coverage is 68.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #1819      +/-   ##
==========================================
+ Coverage   34.22%   34.26%   +0.03%     
==========================================
  Files         370      370              
  Lines        6069     6074       +5     
==========================================
+ Hits         2077     2081       +4     
- Misses       3992     3993       +1
Impacted Files Coverage Δ
app/src/robot/actions.js 93.33% <ø> (-1.34%) ⬇️
app/src/http-api-client/settings.js 100% <ø> (ø) ⬆️
app/src/robot/reducer/calibration.js 100% <ø> (ø) ⬆️
app/src/http-api-client/index.js 100% <ø> (ø) ⬆️
app/src/robot/selectors.js 82.23% <ø> (-0.12%) ⬇️
...pp/src/components/CalibrateDeck/ConfirmPosition.js 0% <ø> (ø) ⬆️
app/src/components/JogControls/index.js 0% <0%> (ø) ⬆️
app/src/components/CalibrateDeck/index.js 0% <0%> (ø) ⬆️
...onents/CalibrateLabware/ConfirmPositionContents.js 0% <0%> (ø) ⬆️
app/src/robot/api-client/client.js 88.64% <100%> (ø) ⬆️
... and 3 more

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 0c803f1...b9fa4d0. Read the comment docs.

Copy link
Contributor

@IanLondon IanLondon left a comment

Choose a reason for hiding this comment

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

Couldn't test calibration token on VS (since VS has no pipettes attached, calibration won't start). But jogging looked good, VS logged correct axis and step size.

const DEFAULT_JOG_STEP = 0.1
// TODO(mc, 2018-07-05): flow helper until we have one reducer, since
// p === 'constant' checks but p === CONSTANT does not, even if
// CONSTANT is defined as `const CONSTANT: 'constant' = 'constant'`
Copy link
Contributor

Choose a reason for hiding this comment

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

yup I ran into the same thing

@mcous mcous merged commit 79fe236 into edge Jul 6, 2018
@mcous mcous deleted the app_refactor-http-calibrate-state branch July 6, 2018 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants