values module#

Rendering a component value the way JLCPCB’s own examples spell it.

Their BOM page uses 10k and 470uF, so that is the target: compact SI, no space, ASCII only. This needs a hand-written formatter. jitx.units builds a bare pint registry with no formatter, so str() gives 1e-07 farad, to_compact() alone gives 99.99999999999999 nF, and pint’s short formats render ohm and micro as non-ASCII signs.

render(value)[source]#

A BOM Comment for a component value, or None when there is none.

A value that is already a string passes through untouched: Component.value is str | PlainQuantity | None.

Return type:

str | None

Parameters:

value (Any)