Skip to content

Commit

Permalink
Stub documentation for DeckModules and Mixtures.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuffster committed Sep 14, 2015
1 parent 1658cf3 commit 8ef4de9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions labware/mixtures.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
def Mixture():
"""
You must define your ingredients and their locations before referring
to them within mixtures. Use the allocate method for this.
Allocations:
>>> wellA.allocate(red_food_coloring=100)
>>> wellB.allocate(water=100)
>>> wellC.allocate(blue_food_coloring=100)
Mixture Definitions:
>>> red = Mixture('red', water=98, red_food_coloring=2)
>>> blue = Mixture('blue', water=98, blue_food_coloring=2)
>>> purple = Mixture('purple', blue=50, red=50)
Then you can do:
>>> well.acquire(purple=10)
And the system can just figure out where to find 1ul red,
1ul blue, 9.8ul water and add it to that particular well.
"""

def __init__(self, name, **kwargs):
"""
Defines a mixture by proportions (in percentages as ints,
since floating points are a pain).
The name must be unique, and will be added to the global
registry of names for a given deck loadout.
"""

0 comments on commit 8ef4de9

Please sign in to comment.