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

test(shared-data): add pressFit pickUpTipConfigurations validation test #14587

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

sanni-t
Copy link
Member

@sanni-t sanni-t commented Mar 4, 2024

Overview

I started working towards RSS-496 and as I was updating the definitions to use configsByTipCount, I realized that that schema was more prone to human errors and was too verbose. Even though the current schema looks a bit redundant with three properties keyed by tip count, having a property written as:

currentByTipCount: {"1": 0.1, "2": 0.2, "3": 0.3....}

as opposed to

configByTipCount: { "1": { "current": 0.1, "speed": 12, "distance": 22}, "2": {.....}}

is much more readable, easy to peruse at a quick glance and less prone to human errors because you can spot an anomaly in the pattern right away.

Now the present and easily readable schema still has the problem of tip count keys being missed or out of sync. So this PR adds a test that scans all pipette definitions to verify that each definition has identical keys for speedByTipCount, distanceByTipCount & currentByTipCount.

Test Plan

Checked that removing a key from any definition raises error in the added test.

Review requests

Any opposition to not changing the schema?

Risk assessment

None. Just a test

@sanni-t sanni-t requested a review from a team as a code owner March 4, 2024 13:57
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.71%. Comparing base (4c75aaf) to head (c4d1369).
Report is 2 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #14587   +/-   ##
=======================================
  Coverage   67.71%   67.71%           
=======================================
  Files        2510     2510           
  Lines       72245    72245           
  Branches     9287     9287           
=======================================
  Hits        48921    48921           
  Misses      21096    21096           
  Partials     2228     2228           
Flag Coverage Δ
app 64.68% <ø> (ø)
protocol-designer 37.90% <ø> (ø)
shared-data 75.24% <ø> (ø)
step-generation 86.88% <ø> (ø)

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

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

Cool, TY!

@sanni-t sanni-t merged commit dd330c9 into edge Mar 4, 2024
54 checks passed
@sanni-t sanni-t deleted the shared-data-add_pipette_definition_verification_test branch March 4, 2024 16:04
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