Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Multiple suppliers per connector/cable? #302

Open
nyq opened this issue Jan 17, 2023 · 3 comments
Open

[feature] Multiple suppliers per connector/cable? #302

nyq opened this issue Jan 17, 2023 · 3 comments

Comments

@nyq
Copy link

nyq commented Jan 17, 2023

Is there a way to specify multiple suppliers for the same connector/cable? I tried to specify more than one pair of supplier/spn keys, but all it does is simply overrides all previous pair values and just uses the last pair specified.

What I mean is this:

connectors:
  X1:
    manufacturer: Lolex
    mpn: 12345
    supplier: MousiKey
    spn: MK-12345
    supplier: ArroArk
    spn: AA-12345

Any other syntax that achieves the same would be fine too.

This feature is often needed in production environments, as it is typical to maintain several suppliers for the same part to ensure the ability to purchase from alternative sources if there are stocking issues with the primary supplier.

P.S. As a matter of fact, sometimes it is also needed to maintain multiple manufacturers and mpn's of functionally equivalent versions of the same component, with each such equivalent possibly having its own multiple suppliers. So, the code would look something like this:

connectors:
  X1:
    manufacturer: Lolex
    mpn: 12345
      supplier: MousiKey
      spn: MK-12345
      supplier: ArroArk
      spn: AA-12345
    manufacturer: ET Connection
    mpn: 54321
      supplier: MousiKey
      spn: MK-54321
      supplier: ArroArk
      spn: AA-54321

Notice supplier/spn pairs have now become subordinate to their corresponding manufacturer/mpn pairs.

Perhaps having two pairs as a root for subordinate pairs is against YAML rules, so maybe this syntax would be more systematic:

connectors:
  X1:
    manufacturer:
      name: Lolex
      pn: 12345
      supplier:
        name: MousiKey
        pn: MK-12345
      supplier:
        name: ArroArk
        pn: AA-12345
    manufacturer:
      name: ET Connection
      pn: 54321
      supplier:
        name: MousiKey
        pn: MK-54321
      supplier:
        name: ArroArk
        pn: AA-54321
@kvid
Copy link
Collaborator

kvid commented Feb 11, 2023

Thank you for your use case description. Currently, it's not possible to specify more than one mpn or more than one spn for any component. To enable something like that, it must be defined a clear and unambiguous way to display a component with many such values in a diagram, and in the BOM. Please suggest. My suggestion for the diagram is something similar to this:
issue302

In addition, your suggested input syntax is not valid YAML, as all keys in a mapping must be unique. However, maybe a variation like this, might be possible:

connectors:
  X1:
    pn: 33
    manufacturer:
      Lolex:
        mpn: 12345
        supplier:
          MousiKey: MK-12345
          ArroArk: AA-12345
      ET Connection:
        mpn: 54321
        supplier:
          MousiKey: MK-54321
          ArroArk: AA-54321
  • manufacturer should then accept a string when only one is needed (as now), or a list of strings if not needing supplier(s), or a mapping with each manufacturer as key to:
    • a string with the belonging mpn value, or
    • a list of suppliers, or
    • a mapping with mpn and supplier for each manufacturer.
  • supplier should accept a string when only one is needed (as now), or a list of suppliers, or a mapping with each supplier as key to the belonging spn value.
  • mpn and spn should accept a string when only one is needed (as now), or a list of strings when in a dict where also he belonging manufacturer/supplier accept a string or list of strings.
  • This way, the original syntax will still work, and this alternative syntax can be used for those components that need them.
  • Maybe this is too flexible, and some simplifications would make it better?

@kvid kvid changed the title Multiple suppliers per connector/cable? [feature] Multiple suppliers per connector/cable? Jul 18, 2023
@kvid
Copy link
Collaborator

kvid commented Sep 2, 2023

I've not yet seen any suggestion describing how such multiple manufacturers and suppliers could be listed in the BOM. How is this done in other systems or documents?

@nyq
Copy link
Author

nyq commented Sep 4, 2023

We are currently using a semi-automated BOM based on protected Word document with VBA code to handle addition/removal of the parts as well as their distribution to procedure documents. Given such limited non-database platform we decided that implementing arbitrarily long list of suppliers for a given part is not realistic and opted for two fixed fields, Vendor1 and Vendor2, which gives us the ability to specify at least one alternative supplier. Not the prettiest solution, but it is better than having no alternative suppliers at all. As far as alternative manufacturers are concerned, we have not implemented that yet as there was no pressing need. But in principle it could be done in form of fixed fields too, basically Factory1, Factory1.Vendor1, Factory1.Vendor2, Factory2, Factory2.Vendor1, Factory2.Vendor2. Not pretty, but better than nothing.

A true arbitrary length list of vendors would require a database (of any form, including YAML) and rendering in tabular form will never be great, as these multiple values will need to be crammed into the same column, but such is life. I think the rendering sample that you have provided above is the best I have seen so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants