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

Better additional component BOM table #226

Draft
wants to merge 38 commits into
base: dev
Choose a base branch
from
Draft

Commits on Dec 30, 2020

  1. Configuration menu
    Copy the full SHA
    0f3b5e9 View commit details
    Browse the repository at this point in the history
  2. Simplify get_bom_index() parameters

    - Use the actual BOM as first parameter instead of the whole harness.
    - Use a whole AdditionalComponent as second parameter instead of each
      attribute separately.
    kvid committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    6525537 View commit details
    Browse the repository at this point in the history
  3. Use the same lambda in get_bom_index() as for deduplicating BOM

    Move the lambda declaration out of the function scope for common
    access from two different functions.
    kvid committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    45b13ef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    da453db View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    347f1e3 View commit details
    Browse the repository at this point in the history
  6. Simplify BOM header row logic

    kvid committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    6378b96 View commit details
    Browse the repository at this point in the history
  7. Simplify collecting designators for a joined BOM entry

    Assign input designators once to a temporary variable for easy reusage.
    kvid committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    d2f8034 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e1d7bab View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    74462cd View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    10b1198 View commit details
    Browse the repository at this point in the history
  11. Move BOM sorting above grouping to use groupby()

    - Use one common entry loop to consume iterator only once.
    - Use same key function for sort() and groupby(),
      except replace None with empty string when sorting.
    kvid committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    cdca708 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f13f8a7 View commit details
    Browse the repository at this point in the history
  13. Use a generator expressions and raise exception if failing

    Seems to be the most popular search alternative:
     https://stackoverflow.com/questions/8653516/python-list-of-dictionaries-search
    
    Raising StopIteration if not found is better than returning None
    to detect such an internal error more easily.
    kvid committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    96d393d View commit details
    Browse the repository at this point in the history
  14. Replace accumulation loop with sum expressions

    Make a list from the group iterator for reusage in sum expressions
    and to pick first group entry. The expected group sizes are very small,
    so performance loss by creating a temporary list should be neglectable.
    
    Alternativly, itertools.tee(group, 3) could be called to triplicate
    the iterator, but it was not chosen for readability reasons.
    kvid committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    1d653c4 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2021

  1. Configuration menu
    Copy the full SHA
    12e570f View commit details
    Browse the repository at this point in the history
  2. Add BOMEntry type alias

    This type alias describes the possible types of keys and values in
    the dict representing a BOM entry.
    kvid committed Jan 3, 2021
    Configuration menu
    Copy the full SHA
    c22c42e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d6d0d2a View commit details
    Browse the repository at this point in the history
  4. Build output string in one big expression

    Build output string in component_table_entry() as the similar strings
    in generate_bom(). Repeating a couple of minor if-expressions is small
    cost to obtain a more compact and readable main expression.
    kvid committed Jan 3, 2021
    Configuration menu
    Copy the full SHA
    d15eeb1 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2021

  1. Configuration menu
    Copy the full SHA
    2e24498 View commit details
    Browse the repository at this point in the history
  2. Eliminate local variable

    kvid committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    8e7c48d View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2021

  1. Rename the 'item' key to 'description' in all BOMEntry dicts

    This way, both BOM and harness.additional_bom_items uses the same
    set of keys in their dict entries. This was originally suggested
    in a #115 review, but had too many issues to be implemented then.
    kvid committed Jan 6, 2021
    Configuration menu
    Copy the full SHA
    30dbd95 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2021

  1. Configuration menu
    Copy the full SHA
    183a943 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2021

  1. Configuration menu
    Copy the full SHA
    523d0c6 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2021

  1. Configuration menu
    Copy the full SHA
    8c26c8f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e61d14b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    53fefa8 View commit details
    Browse the repository at this point in the history
  4. Correctly determine qty

    formatc1702 committed Mar 23, 2021
    Configuration menu
    Copy the full SHA
    0dc02fe View commit details
    Browse the repository at this point in the history
  5. remove component_table_entry() as separate func.

    to simplyfy code
    formatc1702 committed Mar 23, 2021
    Configuration menu
    Copy the full SHA
    9a93d86 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4338b7a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7e168ea View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f928bc7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    aaf88d7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6aa53f6 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    09d5496 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1f86c97 View commit details
    Browse the repository at this point in the history
  13. Implement additional parameter table

    as proposed in #222
    formatc1702 committed Mar 23, 2021
    Configuration menu
    Copy the full SHA
    b4a0ae5 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    37bf530 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9821ca3 View commit details
    Browse the repository at this point in the history