Toml instead of .py files for labware

I’m integrating into a different system with plr compatibility, and it’d be great if labwares were in a file like toml instead of .py. Then you can parse in any language.

I personally like toml over yaml because its spec is 7x shorter.

[plate]
model = "Cor_96_wellplate_360ul_Fb"
size_x = 127.76
size_y = 85.48
size_z = 14.2

[plate.metadata]
brand = "Corning"
catalog_number = "3603"
material = "Polypropylene"
tc_treated = true
sterile = true
notes = [
"Well bottom is 60% thinner than conventional polystyrene microplates, resulting in lower background fluorescence & enabling readings down to 340 nm.",
  "Opaque walls prevent well-to-well cross-talk.",
]

[plate.well_grid]
num_items_x = 12
num_items_y = 8
dx = 10.87
dy = 7.77
dz = 3.03
item_dx = 9.0
item_dy = 9.0

[plate.well_grid.well]
size_x = 6.86
size_y = 6.86
size_z = 10.67
material_z_thickness = 0.5
bottom_type = "flat"
cross_section_type = "circle"
max_volume = 360

[plate.lid]
model = "Cor_96_wellplate_360ul_Fb_Lid"
size_x = 127.76
size_y = 85.48
size_z = 8.9
nesting_z_height = 7.6

somethin like this

2 Likes

yes a different format is nicer than py files

why is toml the best?

  • JSON doesn’t have comments.
  • YAML is real complicated and whitespace sensitive, errors can be hard to spot. However, much more expressive
  • TOML is much simpler + more typed, but lists can get a bit wonky.

I basically have PTSD from configuring kubernetes with yaml, so i kinda of hate it. Cargo.toml and pyproject.toml use toml for config for example, whereas k8s uses yaml.

Other config languages are way less used (for example, sometimes lua projects use lua files as config) or are XML (yucky)

1 Like

too bad April fools just passed lol

1 Like

we had some functions in the resource model, until @CamilloMoschner gave us a way out with Add `height_volume_data` attribute to `Container` with piecewise-linear interpolation by BioCam · Pull Request #938 · PyLabRobot/pylabrobot · GitHub

next year we can make plr sbol compliant https://sbolstandard.org/

2 Likes

How can we integrate “piss bowl” pySBOL: A Python Package for Genetic Design Automation and Standardization | The Synthetic Biology Open Language

As a synthetic biologist, I approve this message