Skip to content

Commit ccfc0c2

Browse files
authored
docs: add contributing new resources guide (#576)
1 parent 0ea6a80 commit ccfc0c2

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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 | ![](img/vwr/VWRReagentReservoirs25mL.jpg) | `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!

docs/contributor_guide/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
:maxdepth: 2
55
66
contributing
7+
contributing-new-resources
78
how-to-open-source
89
```
910

0 commit comments

Comments
 (0)