Resolve passives from catalog, BOM value, and Murata LQW18AN without an LLM.

Skip the model (and the credit gate) when LCSC/DigiKey already list C/V/Z, when the BOM value is a single R/C/L/FB token, or when the MPN is an LQW18AN inductor. Ferrite beads keep impedance, not invented henries; value-only specs stay out of the shared library.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-28 20:25:34 +02:00
co-authored by Cursor
parent 2113e3975e
commit edbb47a08b
14 changed files with 596 additions and 88 deletions
+21 -1
View File
@@ -38,7 +38,27 @@ def test_chip_resistor_from_mpn():
assert abs(model.specs.value_ohms - 2200) < 0.1
def test_skips_murata_and_bare_value():
def test_murata_lqw18an():
model = specs_from_mpn("LQW18AN12NG00D")
assert model is not None
assert model.specs.specs_type == "inductor"
assert abs(model.specs.value_henries - 12e-9) < 1e-15
assert model.specs.package == "0603"
assert model.specs.tolerance == "±2%"
model = specs_from_mpn("LQW18AN18NJ00D")
assert abs(model.specs.value_henries - 18e-9) < 1e-15
assert model.specs.tolerance == "±5%"
model = specs_from_mpn("LQW18AN2N2D00D")
assert abs(model.specs.value_henries - 2.2e-9) < 1e-15
assert model.specs.tolerance == "±0.5nH"
model = specs_from_mpn("LQW18ANR10G00D")
assert abs(model.specs.value_henries - 100e-9) < 1e-15
def test_skips_opaque_murata_and_bare_value():
assert specs_from_mpn("GRM21A5C2J200JA01") is None
assert specs_from_mpn("18pF") is None
assert specs_from_mpn("CH340E") is None