Standardised PLR Command Prefix Proposal

I agree and really like this: get_ and request_ should have a clear distinction which this would give.

New version to discuss:

Command Types
├── 1. Physical Machine Commands
│   ├── 1.1 ACTION      → move_, aspirate_, dispense_, pickup_, shake_
│   ├── 1.2 MEASUREMENT → read_, capture_
│   ├── 1.3 MEM-READ    → request_
│   └── 1.4 MEM-WRITE   → set_
└── 2. RMS / Resource Modeling Commands
    ├── 2.1 QUERY       → get_
    └── 2.2 UPDATE      → update_, assign_, unassign_

I also think that “read_weight” works, and do agree that it does not work for images.
Images are ubiquitous though and need to be addressed: I can see in the Cytation backend it is called capture_ - which is intuitive to me and I added in the above proposal v2 as the second “measurement command” prefix.

I agree, I liked “query_” and “filter_” because they seem intuitive to me but ultimately sticking with “get_” and using maybe a filter argument as an argument for some get_<> functions is the way to go?

I use them a lot, e.g. (with updated name):

in addition to the usual culprits like lh.deck.get_resource() and lh.deck.get_location_wrt(), some convenience methods like…

def get_all_plates(deck: Deck, exclusion_filer: List = []):
  return [
    r for r in deck.get_all_children()
    if r.category == "plate" and all([excl_str not in r.name for excl_str in exclusion_filer])
  ]
1 Like