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

feat(app): Parse JSON protocols into state #2231

Merged
merged 2 commits into from
Sep 13, 2018
Merged

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Sep 12, 2018

overview

This is the second of three PRs for #2129.

This PR pulls protocol file reading out of the legacy RPC API client and into its own state module. It also adds actual JSON parsing to JSON protocols.

The next PR will add selectors for JSON protocol metadata to wire them into the File Info page.

changelog

  • feat(app): Parse JSON protocols into state

review requests

All tests can be run with virtual smoothie, but a real robot test would probably be helpful.

  • Python protocol upload is unchanged from current edge
  • JSON protocol upload is unchanged from current edge
    • JSON protocol is parsed into Redux state at state.protocol.data
  • Connecting to a robot with a Python protocol already loaded correctly fills out the File Info page
  • Connecting to a robot with a JSON protocol already loaded correctly fills out the File Info page
    • JSON protocol is parsed into Redux state at state.protocol.data
  • Robot disconnect clears state.protocol

@mcous mcous added feature Ticket is a feature request / PR introduces a feature app Affects the `app` project ready for review labels Sep 12, 2018
Copy link
Contributor

@Kadee80 Kadee80 left a comment

Choose a reason for hiding this comment

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

🎃 🍶 🌊 📛

@codecov
Copy link

codecov bot commented Sep 12, 2018

Codecov Report

Merging #2231 into edge will increase coverage by 0.24%.
The diff coverage is 70.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #2231      +/-   ##
==========================================
+ Coverage   29.67%   29.91%   +0.24%     
==========================================
  Files         497      499       +2     
  Lines        7962     7985      +23     
==========================================
+ Hits         2363     2389      +26     
+ Misses       5599     5596       -3
Impacted Files Coverage Δ
protocol-designer/src/file-types.js 0% <ø> (ø) ⬆️
app/src/analytics/make-event.js 85% <ø> (ø) ⬆️
app/src/robot/selectors.js 82.91% <ø> (-0.11%) ⬇️
app/src/components/UploadPanel/index.js 0% <0%> (ø) ⬆️
app/src/pages/Upload/index.js 0% <0%> (ø) ⬆️
app/src/reducer.js 0% <0%> (ø) ⬆️
app/src/components/SessionHeader/index.js 0% <0%> (ø) ⬆️
app/src/robot/api-client/client.js 90.05% <0%> (+1.84%) ⬆️
app/src/protocol/index.js 100% <100%> (ø)
app/src/robot/reducer/session.js 100% <100%> (ø) ⬆️
... and 6 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 d2982e1...e37a4ff. Read the comment docs.

Copy link
Contributor

@b-cooper b-cooper left a comment

Choose a reason for hiding this comment

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

🏒

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.

If I upload a bad JSON protocol, it swallows the error coming from RPC and shows the overview page with no pipettes or labware. (The warning is logged to the console but not visible to the user.) Calibrate is grayed out but I can click "Proceed to calibrate" button and get there anyway and it's all blank. Then if I go back to Protocol tab, I see the error page that I should have seen immediately after upload: "Your protocol could no be opened".

Working great for non-bad protocols!

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.

🕯️ 🍠 🍬

@mcous mcous merged commit b5f3666 into edge Sep 13, 2018
@mcous mcous deleted the app_parse-json-protocols branch September 13, 2018 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project feature Ticket is a feature request / PR introduces a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants