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(shared-data): labwareTools refactor for Labware Creator #3804

Merged
merged 2 commits into from
Aug 2, 2019

Conversation

IanLondon
Copy link
Contributor

overview

  1. Factor out fns createRegularLoadName and createDefaultDisplayName for use in Labware Creator
  2. For the purpose of displaying a labware as you fill out the fields of Labware Creator, it's useful to get a definition back in cases where the definition isn't totally valid (some fields missing, well height exceeds labware zDimension, etc). So I added a strict parameter to the labware creation and validation fns that only throws when strict is true, so that I can get the imperfect "work in progess" labware definition for rendering in LC.

changelog

review requests

This should not change the behavior of createRegularLabware fn, just a refactor

factor out fns createRegularLoadName and createDefaultDisplayName for use in Labware Creator
@IanLondon IanLondon added ready for review refactor shared data Affects the `shared-data` project labels Jul 31, 2019
@IanLondon IanLondon requested review from Laura-Danielle and a team July 31, 2019 15:49
@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

7 similar comments
@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by 0.05%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.21%   -0.06%     
==========================================
  Files         817      823       +6     
  Lines       22759    23387     +628     
==========================================
+ Hits        13035    13381     +346     
- Misses       9724    10006     +282
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️
app/src/robot/selectors.js 79.67% <0%> (-1.97%) ⬇️
app/src/shell/buildroot/update-epics.js 80.66% <0%> (-1.69%) ⬇️
app/src/shell/buildroot/actions.js 93.33% <0%> (-1.67%) ⬇️
opentrons/protocol_api/labware.py 88.91% <0%> (-0.78%) ⬇️
app/src/shell/buildroot/selectors.js 45.31% <0%> (-0.64%) ⬇️
opentrons/protocol_api/contexts.py 85.2% <0%> (-0.39%) ⬇️
app/src/index.js 0% <0%> (ø) ⬆️
app-shell/src/buildroot/update.js 0% <0%> (ø) ⬆️
.../src/components/RobotSettings/UploadRobotUpdate.js 0% <0%> (ø) ⬆️
... and 19 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 b3ef99c...f844be2. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #3804 into edge will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #3804      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         817      817              
  Lines       22759    22772      +13     
==========================================
+ Hits        13035    13042       +7     
- Misses       9724     9730       +6
Impacted Files Coverage Δ
shared-data/js/labwareTools/index.js 86.84% <66.66%> (-6.81%) ⬇️

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 b3ef99c...b75aeff. 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.

🍨

@@ -311,6 +372,7 @@ export function createIrregularLabware(
args: IrregularLabwareProps
): Definition {
const { offset, dimensions, grid, spacing, well, gridStart, group } = args
const strict = args.strict || false
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick, but strict false by default changes existing behavior of this function

@IanLondon IanLondon merged commit 94b9780 into edge Aug 2, 2019
@IanLondon IanLondon deleted the shared-data_factor-out-labware-name-fn branch August 2, 2019 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor shared data Affects the `shared-data` project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants