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

Simple BOM post-processing #154

Closed
Tracked by #153
shrik450 opened this issue Jul 1, 2024 · 1 comment · Fixed by #157
Closed
Tracked by #153

Simple BOM post-processing #154

shrik450 opened this issue Jul 1, 2024 · 1 comment · Fixed by #157
Assignees

Comments

@shrik450
Copy link
Collaborator

shrik450 commented Jul 1, 2024

There are a wide variety of operations that users might want to perform on the BOM rows/columns after they have been generated. Right now, the only way to do this is to generate the BOM via generate_bom and use python. Even that approach has a few issues:

  • You cannot sort the values of a grouped column (See Sort values of grouped columns in BOM #108)
  • You cannot perform any post-processing on the BOM plugin unless you operate on the CSV file itself, which is much more inconvenient.

If possible, we should at least support:

  • Sort orders for columns.
  • Sorting within columns for grouped columns.
  • Simple filter rules, such as TP
@shrik450 shrik450 changed the title BOM post-processing Simple BOM post-processing Jul 1, 2024
@shrik450
Copy link
Collaborator Author

shrik450 commented Jul 1, 2024

One idea I've had regarding this is that this could be part of the columns dict we accept. For example:

    columns = {
        "Part Number": {
            "attributes": ["Part", "MFN Part#"],
            "sort": "desc",
            "remove_matching": "TESTPOINT",
        },
        "Designator": {
            "attribute": "Designator",
            "sort": "asc",
            "grouped_values_sort": "asc",
            "grouped_values_separator": ", ",
        },
    }

The plugin can then use YAML to convert into this format.

Note that this can be done in a fully backwards-compatible way in py-allspice and the plugin by checking the types.

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

Successfully merging a pull request may close this issue.

1 participant