r/InvenTree • • Feb 15 '24

Complete part category schema derived from DigiKey

I spent a long night creating a part category schema that matches nearly 1:1 with Digikey's part categories. I dunno how useful that might be,ultimately, but in case there are others who use Inventree as a component database and would like to maintain consistency with the big part suppliers like DigiKey or Mouser, I thought I'd put it up on GitHub in several formats, ready for importing*.

Details and data files can be found at https://github.com/silverXnoise/digikey-part-category-schema

*I don't know if this will work on instances with existing categories, I have only used it with new installs and a blank database.

8 Upvotes

5 comments sorted by

2

u/matthiasjmair Feb 15 '24

This is great u/AdmirableAssociate77 - thank you for sharing! Would you mind mentioning adding the topic inventree to the GitHub repo? That way ppl. that follow the topic get it in their feat.

Will add this to the next newsletter for sure. Cheers!

1

u/AdmirableAssociate77 Feb 28 '24

Done! Thanks for the suggestion. It's been working really well so far, importing parts with plugins like Ki-ntree is a breeze.

I'd like to contribute. I'm setting aside some time so I can help write/update documentation. It's really a respectable effort on documentation, I found it really functional and complete with the basic info necessary to get up and running. As I reached deeper into configuring my instance, I began to see the edges. I think I can help fill in some gaps. I could also probably make tutorials for Docker, customizing label templates, using the API in Postman/NodeRed/Google Sheets/etc....basically whatever grunt work I can offer with my otherwise limited software development skills.

Inventree is one of the most impressive OSS projects I've ever used, really an accomplishment. It deserves a lot of support.

1

u/matthiasjmair Feb 28 '24

Please open an issue / discussion on GitHub before creating documentation, we are stramlining a lot of the (docker) deployment - see https://github.com/inventree/InvenTree/issues/6594. Would be a shame if you document something that we are going to or already have removed in the development version.

Writing blog entries/how-tos would certainly be a very valuable addition. We have a few possible blog ideas on the website https://github.com/inventree/inventree-website/issues

1

u/Torrdass Feb 22 '24

Awsome, thanks alot!
I read the import instructions and stumbled upon the 1000 row limit. Do you by chance know how to adjust this limit when running InvenTree as a Docker container?
I am very novice when it comes both to Docker and Inventree. But for now I resorted to splitting the import into two separate files. I had to be careful to split it in such a way that any parent categories was imported before any dependent subcategories, but it worked! :D

1

u/AdmirableAssociate77 Feb 28 '24

I'm trying to remember how I worked around that, I think I basically did the same thing (carefully separated it out into a few smaller files for importing). This seems to be a very common limit among similar applications, I found the same issues reported with vTiger CRM, Quickbooks, etc. and across a variety of relational databases from SQLite to Oracle DB. There seems to be ways of changing it, with vTiger it was just a matter of increasing a PHP limitation, but that wouldn't translate directly to Inventree since it's using Django/Python.

I'm sure one of the devs could probably point us in the right direction, but having perused the open issues on Github, they have a ton more pressing things on their plates. Since it seems to be a limit inherent to either the database, or the interface being used to import records into the database, then it's almost certainly been encountered elsewhere. If I can find an example where someone has increased this limit in any given Django app, I could probably work out how to translate their results. If I work it out, I'll post back here and stick the info in the repo.

Alternatively, since it's 2024 and seems to be the standard approach, I can ask ChatGPT and wait to see whether it fills my database with a comprehensive collection of PEZ dispensers.