-
Notifications
You must be signed in to change notification settings - Fork 179
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(api): redefine well geometry structure #16392
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with Seth on avoiding Any
.
Other than that, looks correct. Thank you! Here are some questions and comments on the underlying data shapes.
# A truncated circle is a square that is trimmed at the corners by a smaller circle | ||
# that is concentric with the square. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest centralizing documentation like this inside the JSON schema, and thinking of the Python bindings as dumb references to it. Basically just for single-source-of-truth reasons.
I would even go as far as to delete the pydantic.Field
description
s in labware_definition.py
, though others have disagreed with me on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline changes.
I also don't quite get the point of taking this data from a labware definition, to a pydantic model, and then out to a typed dict. What does the typed dict give us that the pydantic model doesn't? It kind of seems like it just makes us define everything twice.
2396daa
to
965ccb4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #16392 +/- ##
===========================================
+ Coverage 63.28% 81.14% +17.85%
===========================================
Files 300 106 -194
Lines 15786 3786 -12000
===========================================
- Hits 9990 3072 -6918
+ Misses 5796 714 -5082
Flags with carried forward coverage won't be shown. Click here to find out more.
|
2aa5b9b
to
59e4130
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shapes look great to me, thanks!
I haven't reviewed the processing part of this because it seems like @sfoster1 has already looked at it, but I'm happy to if you want more eyes.
"properties": { | ||
"shape": { | ||
"type": "string", | ||
"enum": ["squaredcone"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, doesn't block merging: camelCase
squaredCone
and roundedCuboid
, if possible.
Unless these are matching a convention elsewhere in the labware definitions that I'm missing.
@@ -350,7 +350,7 @@ class SquaredConeSegment(BaseModel): | |||
|
|||
|
|||
""" | |||
module filitedPyramidSquare(bottom_shape, diameter, width, length, height, steps) { | |||
module filitedCuboidSquare(bottom_shape, diameter, width, length, height, steps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit for these OpenSCAD snippets, doesn't block merging: filleted
instead of filited
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! Looks great to me.
Overview
After discovering some new shapes and generally interacting with the new well geometry data structures, I think it would be better to reshape the geometry data a little bit. Rather than having each section of a well be represented by its top cross-section and top height, let's just represent a section in its entirety, with bottom and top cross-sections and bottom and top heights being present in every shape that is not a
SphericalSegment
.Changelog
RoundedRectangle
classTruncatedCircle
classCircularFrustum
andRectangularFrustum
classesfrustum_helpers
and tests to use the new data structureTODO