aquariumbio / aquarium

The Aquarium Lab Operating System
http://klavinslab.org/aquaverse/
MIT License
58 stars 15 forks source link

Discussion about best practices for preconditions #177

Open jvrana opened 7 years ago

jvrana commented 7 years ago

I just wanted to start a discussion about best practices with using preconditions.

I imagine this kind of messages would be useful for both the users and managers. I also imagine the manager getting a ton of emails if user's plans are stuck in "waiting" and they do not know why. We should probably instantiate a practice of notifying the plan of waiting status if a precondition is used.

jvrana commented 7 years ago

I also think that the precondition and the way we pick up errors is kind of closely related. It'd be useful if we moved a lot of the error checking code in our protocols to the precondition so that instead of erroring out, the protocol would be stuck in waiting and give the user a useful message instead and give them a chance to fix something with their plan submission before it actually is scheduled.

As an example, me as a user, may accidentally submit a PCR with a plasmid that doesn't have a length (easy thing to do). Instead of having the technician schedule it and the operation erroring out, maybe we should start placing all of that code in the precondition as well, so that the operations will not even move to "pending" if it doesn't have the necessary information to run the operations.

In fact, a best practice could be to use the precondition to filter out any protocol that can computed before the protocol is actually run (I guess analogous to compilation errors) and reserve operational errors for things that you have to run the protocol to find out (like a tech finds out that a tube is missing or something; analogous to run-time errors).