Open michael-betz opened 3 years ago
I've found some more potential issues in the original code and in the patch above but I'm not 100% sure about the DNC stuff because I've never come across that property before. I've already committed fixes and a new feature to a fork of your repo but would like to discuss this before submitting a PR to make sure my understanding is correct.
For what I understand so far, a part marked DNC is considered to never change in any variant, effectively meaning, 'always populate.' In that case, and according to the function name, isFixed()
should return True
whenever a part is indeed fixed, i.e.
Is that correct?
The meaning is different: parts marked as DNC shouldn't be replaced by generic equivalents.
Is just a special mark in the BoM list to inform that this component is critical.
Look PR #106 for the correct implementation.
I introduced it in PR #84 but it got broken when self.prefs.pcbConfig
changed from string to list.
It also contained stuff related with variants just because I used isFitted
as template.
To make things worst the meaning is inverted isFixed
was returning False for DNC components. It worked because the code used dnc=" (DNC)" if not self.isFixed() else "")
(not)
@t3hcatpaw has this been fixed for you now with the update in #106 ?
This should be fixed by #105 The exception was in isFixed:
File "/home/michael/kicad/KiBoM/kibom/component.py", line 117, in __eq__
if self.isFixed() != other.isFixed():
File "/home/michael/kicad/KiBoM/kibom/component.py", line 354, in isFixed
if opt[1:].lower() == self.prefs.pcbConfig.lower():
This comparisson was removed by #105
I'm getting an exception when running KiBoM, using the
+<VARIANT>
and-<VARIANT>
syntax in the config field:this patch fixes it