-
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
feat(api): Add skeleton of new Labware class #2363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from typing import List, Tuple | ||
from collections import OrderedDict | ||
|
||
|
||
class Well: | ||
""" | ||
This class represents a well within a labware. It provides methods for | ||
specifying a location within a well. | ||
""" | ||
|
||
def __init__(self) -> None: | ||
pass | ||
|
||
def top(self) -> Tuple[float, float, float]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dumb question(s) about typing:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty sure that |
||
pass | ||
|
||
def bottom(self) -> Tuple[float, float, float]: | ||
pass | ||
|
||
def from_center(self) -> Tuple[float, float, float]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since this takes no args, should this be just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. named for backward-compatibility There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, and you're right that it should take args. I'll make a note in the implementation ticket |
||
pass | ||
|
||
|
||
class Labware: | ||
""" | ||
This class represents a labware, such as a PCR plate, a tube rack, trough, | ||
tip rack, etc. It defines the physical geometry of the labware, and | ||
provides methods for accessing wells within the labware. | ||
""" | ||
def __init__(self, defintion: dict) -> None: | ||
pass | ||
|
||
def wells(self) -> List[Well]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm guessing this gets its ordering from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct |
||
pass | ||
|
||
def wells_by_index(self) -> OrderedDict[str, Well]: | ||
pass | ||
|
||
def rows(self) -> List[List[Well]]: | ||
pass | ||
|
||
def rows_by_index(self) -> OrderedDict[str, List[Well]]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The index is a string -- it's a letter here right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct |
||
pass | ||
|
||
def columns(self) -> List[List[Well]]: | ||
pass | ||
|
||
def columns_by_index(self) -> OrderedDict[str, List[Well]]: | ||
pass | ||
|
||
|
||
def load(name: str) -> Labware: | ||
""" | ||
Load a labware definition by name. Definition must have been previously | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not directly related to this fn or over this Python PR, but important to define for the labware defs in general: in the updated schema, what is a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. I'll make a note in the ticket for implementing these methods |
||
stored locally on the robot. | ||
""" | ||
pass | ||
|
||
|
||
def load_from_definition(definition: dict) -> Labware: | ||
""" | ||
Create a labware object from a labware definition dict | ||
""" | ||
return Labware(definition) |
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.
🎉 💯 🎉