hildogjr / KiCost

Build cost spreadsheet for a KiCad project.
MIT License
503 stars 98 forks source link

DigiKey part numbers target Digi-Reel #376

Closed romain145 closed 4 years ago

romain145 commented 4 years ago

The DigiKey part numbers returned are a mix between cut-tape and Digi-Reel. The difference is that Digi-Reel adds cost (typically $7.00) to each part number. Is there a way to specify a preference to KiCost or to the Partinfo/Octopart API?

hildogjr commented 4 years ago

Give us a file example to help track the issue and provide the KiCost version kicost --version / kicost --info.

romain145 commented 4 years ago
Z:\git\github\KiCost>kicost --version
KiCost v.1.1.3

See attached esc.zip

DigiKey references containing "HDKR" are Digi-Reel. DigiKey references containing "HCT" are Cut-Tape.

hildogjr commented 4 years ago

Could you be more specific? Which part are related to the problem? (Are all parts?) What the problem cause in the spreadsheet? (I image that change the price tiers in the balloon and the price function). I have little time between my jobs to catch the issues, specific descriptions could help.

romain145 commented 4 years ago

Sure! The part numbers are a mix of Cut-Tape and Digi-Reel as shown below:

image

When searching for the part on Octopart, it returns both options. not sure how Partinfo picks one and return it to KiCost?

image

ghost commented 4 years ago

I can confirm this issue and I also have a fix: #384

hildogjr commented 4 years ago

@romain145, I just tested the fix provided by @fri-sch, appear fine and without any collateral. Could you confirm that fix the reported case? I intend to release it.

I just concerned because it check by Stock numbers that ends with "DKR-ND", I am checking some user case to be sure that covers all Digikey Reels (it appear be the only information that tha API give us and differentiates the parts).

ghost commented 4 years ago

I just concerned because it check by Stock numbers that ends with "DKR-ND", I am checking some user case to be sure that covers all Digikey Reels (it appear be the only information that tha API give us and differentiates the parts).

Your concerns are justified. I just found out, that the 'DKR-ND' ending doesn't cover all DigiKey reels. It seems like only capacitors, resistors, etc. are named like this. Other components, like ICs have '-6-ND' for the reels and '-1-ND' for the cut-tape. I don't know if there are other schemes for other kinds of parts.

Here's another fix: #385

hildogjr commented 4 years ago

Thanks by check @fri-sch, I merged your solution, I just will improve to add this configuration at the Digikey profile of KiCost before the official release. I also had add your name to official contribution history https://github.com/xesscorp/KiCost/blob/master/kicost/AUTHORS.rst (this is displayed at the GUI interface and help page).

hildogjr commented 4 years ago

There still some inconsistencies about the link and stock code.