Ki-nTree - Fast part creation for KiCad and InvenTree

Thanks @Kedarius for your appreciation and feedback, I went over it and here are my comments:

This is all good! Unfortunately yes the dropdown list is a bit of legacy code and gets overwritten with Digi-Key categories as at first it was the only supplier supported by Ki-nTree. Since then I added many more suppliers and this part of the code needs a good refresh, which I was planning to do when integrating hierarchical categories selection pulled directly from InvenTree.

Also the first time, you will get all the subcategories showing up when you click the “Confirm” button next to it. However the next time around, only one will show up… The workaround is to add this in your digikey_categories.yaml file:

Component:
  Resistor: null
  Logic: null
  Capacitor: null
  Button: null

Then it should work every time.

Lastly, you still have the option to overwrite the default configuration files in your Ki-nTree installation path:

Even if I don’t recommend it as it will be overwritten when updating :laughing:

Anyway as I said, big refactoring of part of the software is needed!

Fixed in 0.6.5, thanks for reporting it. Do you have a Github account? I would prefer those issue reported there (easier to track): Issues · sparkmicro/Ki-nTree · GitHub

Try 0.6.5 as I propagated the manufacturer name match method to the main part creation flow (it was reserved to alternate part until now).
I have tested it with my local work database and should work fine.

I finally managed to get the component categories working via inserting them to the digikey_categories.yaml file. Also the company matching now is case insensitive which is great.

I will report future bugs in GitHub.

1 Like

For anybody interested in the project, I am currently migrating Ki-nTree to a newer, nicer looking GUI framework called Flet: https://flet.dev/

I have released the first version (1.0.0 alpha1) :partying_face:




To try it out:

pip install -U kintree --pre

Let me know what you think!

8 Likes

Hello everyone,
I’m trying to install Ki-nTree but I’m stuck with the error message “Microsoft Visual C++ 14.0 is required”.

 × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.8
      creating build\lib.win-amd64-3.8\Levenshtein
      copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.8\Levenshtein
      copying Levenshtein\__init__.py -> build\lib.win-amd64-3.8\Levenshtein
      running egg_info
      writing python_Levenshtein.egg-info\PKG-INFO
      writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
      writing entry points to python_Levenshtein.egg-info\entry_points.txt
      writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
      writing requirements to python_Levenshtein.egg-info\requires.txt
      writing top-level names to python_Levenshtein.egg-info\top_level.txt
      reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*pyc' found anywhere in distribution
      warning: no previously-included files matching '*so' found anywhere in distribution
      warning: no previously-included files matching '.project' found anywhere in distribution
      warning: no previously-included files matching '.pydevproject' found anywhere in distribution
      writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
      copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.8\Levenshtein
      copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.8\Levenshtein
      running build_ext
      building 'Levenshtein._levenshtein' extension
      error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

I have installed Visual Studio Build Tools 2022. Is there anything else I should install?

Hello @Insanoff and sorry for your trouble.

Do you mind opening an issue here and I can follow-up there? Thanks!

The new UI looks very nice and works great.

1 Like

I’m glad you like it!

I have just released beta1 which offers much more user customization for the part creation flow (most were previously hidden in the background…), check it out and let me know what you think :wink:

The 1.0.0 release is finally out! :tada:
Checkout the README for an updated demo video and info: GitHub - sparkmicro/Ki-nTree: Fast part creation for KiCad and InvenTree

You can update with: pip install -U kintree

I hope you’ll enjoy the new GUI and features!

4 Likes

It’s pretty cool. I’m liking it so far! Setting it and Inventree up were mostly painless - thanks for the help on Github. Got the first few parts in the db already.

A minor quibble is around part search on Digikey - would it be possible to search on a smaller fragment of the part number? It seems it needs the search to return only one result to be successful, which I totally get from a programming standpoint but is a mild pain point when bulk-adding existing stocked parts.

The option to set stock level when adding a new part would also be nice. Just a ‘quantity’ text box, and then have ki-ntree create a stock item after part creation.

All in all, I’m looking forward to using it :slight_smile:

2 Likes

Hello @ScoPi

Glad to hear you like it!

Regarding multiple search results, that is something that could be done but never were asked for.
I’m thinking a pop-up window with a list of the parts from the search result where you could select one.
I’m not sure I understand your use-case though, do you want to add multiple parts at the same time?

Stock item option could be added to the InvenTree view yes, this is doable.

Do you mind opening separate issues on the Github repository to discuss further?

Thanks!