Closed NightSkySK closed 4 months ago
Hi @NightSkySK,
As far as I am aware the category maps aren't really used anymore except for some publishing tests we are doing. If you want to map parameters you can do this in the supplier_parameters.yaml
only for now. The supplier specific mappings are not loaded or used rn, but feel free to add this function.
The "auto-match" supplier category feature is quite old and I didn't give it much love as the GUI now let's you find InvenTree categories quite easily, at least in my opinion. If you really wish to get that magic for another supplier, it should be quite easy to add the supplier
as an input parameter to the get_categories_from_supplier_data
function and load the category_map
accordingly. What you have in your file seems correct at first glance.
I will follow @T0jan recommendation to focus on supplier_parameters.yaml
first, as that will give more benefits. After I look closer to the "auto-match" supplier category feature it becomes obvious that choosing a category from drop-down list is quite user-friendly as is.
I would like to contribute to the project to help build categories and parametric mapping for other suppliers than Digikey. I've started with TME categories mapping. Can someone help to confirm if I'm going in the right direction with this mapping:
here is the sample of capacitor mapping in
tme_categories.yaml
so let's take as example https://www.tme.eu/pl/en/details/0805b104k500ct/mlcc-smd-capacitors/walsin/ it belong to the category: Passives/Capacitors/MLCC capacitors/MLCC SMD capacitors
Is it correctly mapped in the above yaml file?
As I checked the source code
kintree/database/inventree_interface.py
method isget_categories_from_supplier_data
is currently fixed to check only digikey categories mapping:category_map = config_interface.load_supplier_categories_inversed(supplier_config_path=settings.CONFIG_DIGIKEY_CATEGORIES)
so to make it work with some other supplier categories mapping there need to be made some more changes here, isn't it?