Skip to content

Commit

Permalink
[DOCs][Added] Note to the KiBom variant
Browse files Browse the repository at this point in the history
See #737
  • Loading branch information
set-soft committed Dec 16, 2024
1 parent 158dc9e commit b476e4a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/source/configuration/variants/kibom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
-VARIANT excludes a component from VARIANT. |br|
+VARIANT includes the component only if we are using this variant

.. note::
Don't confuse this variant style with the `kibom` output. In fact variants
doesn't apply to `kibom` output because it just uses the internal mechanism of
KiBom. Use the `bom` output instead, in this case you can use this variant style to
get similar results to what you get from `kibom`
..
- ``comment`` :index:`: <pair: variant - kibom; comment>` [:ref:`string <string>`] (default: ``''``) A comment for documentation purposes.
- ``config_field`` :index:`: <pair: variant - kibom; config_field>` [:ref:`string <string>`] (default: ``'Config'``) Name of the field used to classify components.
- ``dnc_filter`` :index:`: <pair: variant - kibom; dnc_filter>` [:ref:`string <string>` | :ref:`list(string) <list(string)>`] (default: ``'_kibom_dnc_CONFIG_FIELD'``) Name of the filter to mark components as 'Do Not Change'.
Expand Down
6 changes: 5 additions & 1 deletion kibot/var_kibom.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class KiBoM(BaseVariant): # noqa: F821
""" KiBoM variant style
The Config field (configurable) contains a comma separated list of variant directives.
-VARIANT excludes a component from VARIANT.
+VARIANT includes the component only if we are using this variant """
+VARIANT includes the component only if we are using this variant
Important: Don't confuse this variant style with the `kibom` output. In fact variants
doesn't apply to `kibom` output because it just uses the internal mechanism of
KiBom. Use the `bom` output instead, in this case you can use this variant style to
get similar results to what you get from `kibom` """
def __init__(self):
super().__init__()
with document:
Expand Down
2 changes: 1 addition & 1 deletion tests/GUI/stats
Original file line number Diff line number Diff line change
Expand Up @@ -652,4 +652,4 @@ Used as single data type:
- Dict,Number: 2 ['pcbdraw.options.margin', 'svg.options.margin']
- Boolean,Choice: 1 ['ibom.options.highlight_pin1']
- String,StringDict: 1 ['pcbdraw.options.remap']
Found 3 unique warning/s (4 total)
Found 2 unique warning/s (3 total)

0 comments on commit b476e4a

Please sign in to comment.