|
| 1 | +# Contributing new resources |
| 2 | + |
| 3 | +PyLabRobot ships with a growing library of resource definitions for common labware. |
| 4 | +If you define a new resource it helps the community when you contribute it back. |
| 5 | +This page describes the information to include and how to format it. |
| 6 | + |
| 7 | +## 1. Update the resource library |
| 8 | + |
| 9 | +Add an entry for your resource under the appropriate manufacturer page in |
| 10 | +{doc}`the resource library </resources/index>`. |
| 11 | +List the part number, name, a picture and a link to the manufacturer's website. |
| 12 | +Existing entries use a table format like this: |
| 13 | + |
| 14 | +``` |
| 15 | +| Description | Image | PLR definition | |
| 16 | +|-------------|-------|----------------| |
| 17 | +| 'VWRReagentReservoirs25mL'<br>Part no.: 89094<br>[manufacturer website](https://us.vwr.com/store/product/4694822/vwr-disposable-pipetting-reservoirs)<br>Polystyrene Reservoirs |  | `VWRReagentReservoirs25mL` | |
| 18 | +``` |
| 19 | + |
| 20 | +Use the same style and folder structure for images. |
| 21 | + |
| 22 | +## 2. Document attribute sources |
| 23 | + |
| 24 | +When writing a resource definition annotate each attribute with its origin. |
| 25 | +Link any technical drawings you consulted using an archived copy for |
| 26 | +permanence and mark those values with `# from spec`. |
| 27 | +If you measured a value yourself append `# measured`. |
| 28 | + |
| 29 | +````python |
| 30 | +# example |
| 31 | + |
| 32 | +def AGenBio_96_wellplate_Ub_2200ul(name: str, lid: Optional[Lid] = None) -> Plate: |
| 33 | + """ |
| 34 | + AGenBio Catalog No. P-2.2-SQG-96 |
| 35 | + - Material: Polypropylene |
| 36 | + - Max. volume: 2200 uL |
| 37 | + """ |
| 38 | + INNER_WELL_WIDTH = 8 # measured |
| 39 | + INNER_WELL_LENGTH = 8 # measured |
| 40 | + |
| 41 | + well_kwargs = { |
| 42 | + "size_x": INNER_WELL_WIDTH, # measured |
| 43 | + ... |
| 44 | + } |
| 45 | + |
| 46 | + return Plate( |
| 47 | + name=name, |
| 48 | + size_x=127.76, # from spec |
| 49 | + size_y=85.48, # from spec |
| 50 | + size_z=42.5, # from spec |
| 51 | + ... |
| 52 | + ) |
| 53 | +```` |
| 54 | + |
| 55 | +## 3. Add imports |
| 56 | + |
| 57 | +If you place your resource in a new module, remember to import it from the |
| 58 | +package's `__init__.py` so users can load it directly. |
| 59 | + |
| 60 | +Thank you for helping expand the resource library! |
0 commit comments