sparkmicro / Ki-nTree

Fast part creation for KiCad and InvenTree
GNU General Public License v3.0
171 stars 31 forks source link

Can't change category names in supplier_parameters.yaml #195

Closed Fivefold closed 5 months ago

Fivefold commented 6 months ago

According to documentation the supplier_parameters.yaml follows this structure:

CATEGORY_NAME:
  INVENTREE_PARAMETER_NAME:
    - SUPPLIER_1_PARAMETER_NAME_1
    - SUPPLIER_1_PARAMETER_NAME_2
    - SUPPLIER_2_PARAMETER_NAME_1

I use a custom categories.yaml, here is part of it:

CATEGORIES:
  Active Components:
    Integrated Circuits:
      Voltage Regulators: null

Now in supplier_parameters.yaml I tried to change line 202 in the following code block from Power Management to Voltage Regulators: https://github.com/sparkmicro/Ki-nTree/blob/7f894dd5f1d89bce128e022bcd39fa7fb603d890/kintree/config/inventree/supplier_parameters.yaml#L202-L208

As soon as I start Ki-nTree or try to create a part, this line gets changed back to Power Management, even though I have no Power Management category in InvenTree or categories.yaml.

I can change supplier parameters or add InvenTree parameters in supplier_parameters.yaml just fine, but I can't seem to change the category names.

Am I doing something wrong?

T0jan commented 6 months ago

I am not quite sure why but during start-up Ki-nTree always puts the default categories back into the supplier_parameters.yaml, my personal workaround was to just create additional entries for my categories instead of modifying the default ones.