-
Notifications
You must be signed in to change notification settings - Fork 11
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
Naming of Primitives #176
Comments
I agree that verbs tend to make more sense. This may be an artifact of how we started with Autoprotocol primitives and augmented them with additional primitives that we needed. I think that majority of primitives corresponding to physical operations are verbs, but information-related primitives such as PlateCoordinates are not.
This suggests that the standard needs a convention for naming primitives, which is certainly valid.
… On Nov 4, 2022, at 1:16 AM, mszulcz-mitre ***@***.***> wrote:
From the Python source files in labop/labop/lib/, it seems like some Primitives have names that are verb phrases (e.g. PickColonies, Dilute, Incubate, HoldOnIce) and some have names that are noun phrases (e.g. SerialDilution, PlateCoordinates, Rows). To me, the classes named with verb phrases are more clear and easier to use since I think of a primitive step in a protocol as an action. The classes named with noun phrases, however, are sometimes not clear how to use, and as a result, I end up re-reading their descriptions in labop/labop/lib/ to understand what action they represent. For example, the Primitive PlateCoordinates represents the action Select only the samples with specified row/column combination from a sample collection.
For me, it would clarify how to use Primitives if they were named with verb phrases when possible. For example, PlateCoordinates could be named SelectSamplesByPlateCoordinates. Maybe it's a bit verbose, but the added clarity seems worth it. CulturePlates could become CreateCulturePlates. EmptyContainer could become AllocateEmptyContainer (this naming would also emphasize that 'Empty' is an adjective, not a verb).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
I agree that a naming convention would be useful. You mention information-related primitives. I don't mean to beat a dead horse, but maybe you'd accept a few more comments? For me, it's difficult to reconcile information primitives with the ontology. In the ontology, In the case of labop/labop/lib/sample_arrays.py Lines 22 to 26 in 9ea0789
Is that correct? |
I agree. The "EmptyContainer" |
I support the renamings suggested by @mszulcz-mitre |
Short term: rename to use verbs |
As part of the renaming effort, it might also be useful to rename one of the libraries. Currently, there's a library of primitives named labop/labop/lib/sample_arrays.py Lines 4 to 7 in 9ea0789
There's also a non-primitive class named paml:SampleArray . Renaming the library might help new users avoid confusing them.
I'm not sure I have a good suggestion for a different name right now. Does anyone have any ideas? For me, the challenge is that the library seems to contain a variety of primitives that are difficult to summarize in a single word or phase. For example, while most of its primitives have a labop/labop/lib/sample_arrays.py Lines 114 to 124 in 9ea0789
labop/labop/lib/sample_arrays.py Lines 78 to 81 in 9ea0789
The code for EmbeddedImage notes that it should be moved to a different library. Maybe I'm not seeing the unifying idea for the library, but does it make sense to consider separating more of the primitives until there's sufficient similarities that a good name becomes obvious?
|
Is there an alphabetized or ordered list of all the primitives in a notebook somewhere with notes on the parameters? I want to implement some sort and search functions for the lay researcher to understand the parameters. It would be helpful to see all of the primitives (A-Z) if they are specified someplace. |
From the Python source files in
labop/labop/lib/
, it seems like some Primitives have names that are verb phrases (e.g.PickColonies
,Dilute
,Incubate
,HoldOnIce
) and some have names that are noun phrases (e.g.SerialDilution
,PlateCoordinates
,Rows
). To me, the classes named with verb phrases are more clear and easier to use since I think of a primitive step in a protocol as an action. The classes named with noun phrases, however, are sometimes not clear how to use, and as a result, I end up re-reading their descriptions inlabop/labop/lib/
to understand what action they represent. For example, the PrimitivePlateCoordinates
represents the actionSelect only the samples with specified row/column combination from a sample collection
.For me, it would clarify how to use Primitives if they were named with verb phrases when possible. For example,
PlateCoordinates
could be namedSelectSamplesByPlateCoordinates
. Maybe it's a bit verbose, but the added clarity seems worth it.CulturePlates
could becomeCreateCulturePlates
.EmptyContainer
could becomeAllocateEmptyContainer
(this naming would also emphasize that 'Empty' is an adjective, not a verb).The text was updated successfully, but these errors were encountered: