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

Add utilities for BOM generation #173

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

JasperZP
Copy link
Contributor

@JasperZP JasperZP commented May 29, 2024

Add utilities for BOM generation

Description

Add util function to round float to least significant decimal Add util function to print a Parameter as a unit with tolerance (range center +- delta)
Add has_simple_value_representation_based_on_params trait, which is the same as as_simple_value_representation_based_on_param but with mulitple parameters and support for ranges
Add classmethods for Range to create a Range from a lower/upper bound or from center.
Add rated_power parameter to Resistor and accompanying set functions
Add util function to round float to least significant decimal Add util function to print a Parameter as a unit with tolerance (range center +- delta)
Add has_simple_value_representation_based_on_params trait, which is the same as as_simple_value_representation_based_on_param but with mulitple parameters and support for ranges
Add classmethods for Range to create a Range from a lower/upper bound or from center.
Add rated_power parameter to Resistor and accompanying set functions

Checklist

Please read and execute the following:

  • My code follows the coding guidelines of this project
  • My PR title is following the contribution guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I ran Black to format my code

Code of Conduct

By submitting this issue, you agree to follow our Code of Conduct:

Add util function to round float to least significant decimal
Add util function to print a Parameter as a unit with tolerance (range
center +- delta)
Add has_simple_value_representation_based_on_params trait, which is the
same as as_simple_value_representation_based_on_param but with mulitple
parameters and support for ranges
Add classmethods for Range to create a Range from a lower/upper bound or
from center.
Add rated_power parameter to Resistor and accompanying set functions
src/faebryk/core/util.py Outdated Show resolved Hide resolved
src/faebryk/core/util.py Outdated Show resolved Hide resolved
src/faebryk/core/util.py Outdated Show resolved Hide resolved
src/faebryk/core/util.py Outdated Show resolved Hide resolved
Move round_to_least_significant_decimal to util.py/round_str
Remove duplicate is_type_set_subclasses
Remove redundant braces
Merge string concat into one f-string
Just use type hinting of Sequence[Constant | Range], typevar is not necessary.
Copy link
Contributor

@IoannisP-ITENG IoannisP-ITENG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thanks!

@IoannisP-ITENG IoannisP-ITENG merged commit 2184fa2 into faebryk:main Jun 4, 2024
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 this pull request may close these issues.

None yet

2 participants