Skip to content

Commit

Permalink
[DOCs][Added] Check_Fields preflight
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Jul 12, 2024
1 parent 8f00276 commit 2a17b8a
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.7.1] - UNRELEASED
### Added
- Experimental Altium PCB conversion (#625)
- Preflights:
- check_fields: used to ensure conditions on desired fields (#643)
- BoM: logo file name can contain env vars and/or ~ (#620)
- Datasheet: option to classify the datasheets by reference.
- KiCost: option to specify a configuration file (#615)
Expand Down
9 changes: 9 additions & 0 deletions docs/samples/generic_plot.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ preflight:
# This preflight modifies the schematic, use it only in revision control environments.
# Used to solve ERC problems when using filters that remove power reference numbers.
annotate_power: true
# [dict|list(dict)=[]] Checks to apply to the schematic fields.
# You can define conditions that must be met by the fields.
# One use is to check that all components are suitable for a temperature range.
# In this case a field must declare the temperature range.
check_fields:
- field: 'temperature'
regex: '(-?\d+).+?(?:-?\d+).*'
numeric_condition: '<='
numeric_reference: -10
# [boolean] Zones are filled before doing any operation involving PCB layers.
# The original PCB remains unchanged. If you need to abort when the zone fill
# creates significant changes to a layer use the CheckZoneFill internal template.
Expand Down
4 changes: 4 additions & 0 deletions docs/source/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Added
~~~~~

- Experimental Altium PCB conversion (#625)
- Preflights:

- check_fields: used to ensure conditions on desired fields (#643)

- BoM: logo file name can contain env vars and/or ~ (#620)
- Datasheet: option to classify the datasheets by reference.
- KiCost: option to specify a configuration file (#615)
Expand Down
18 changes: 18 additions & 0 deletions docs/source/configuration/sup_preflights.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@ Supported preflights
This preflight modifies the schematic, use it only in revision control environments.
Used to solve ERC problems when using filters that remove power reference numbers.

- **check_fields** :index:`: <pair: preflight - check_fields; check_fields>` [:ref:`dict <dict>` | :ref:`list(dict) <list(dict)>`] (default: ``[]``) Checks to apply to the schematic fields.
You can define conditions that must be met by the fields.
One use is to check that all components are suitable for a temperature range.
In this case a field must declare the temperature range.

- Valid keys:

- **field** :index:`: <pair: preflight - check_fields - check_fields; field>` [:ref:`string <string>`] (default: ``''``) Name of field to check.
- **regex** :index:`: <pair: preflight - check_fields - check_fields; regex>` [:ref:`string <string>`] (default: ``''``) Regular expression to match the field content.
- *regexp* :index:`: <pair: preflight - check_fields - check_fields; regexp>` Alias for regex.
- ``numeric_condition`` :index:`: <pair: preflight - check_fields - check_fields; numeric_condition>` [:ref:`string <string>`] (default: ``'none'``) (choices: ">", ">=", "<", "<=", "=", "none") Convert the group 1 of the regular expression to a number and apply this operation
to the *numeric_reference* value.
- ``numeric_reference`` :index:`: <pair: preflight - check_fields - check_fields; numeric_reference>` [:ref:`number <number>`] (default: ``0``) Value to compare using *numeric_condition*.
- ``severity`` :index:`: <pair: preflight - check_fields - check_fields; severity>` [:ref:`string <string>`] (default: ``'error'``) (choices: "error", "warning", "info", "skip") If the regex matches what we do.
The *error* will stop execution.
- ``skip_if_missing`` :index:`: <pair: preflight - check_fields - check_fields; skip_if_missing>` [:ref:`boolean <boolean>`] (default: ``true``) If the field is missing we just continue. Otherwise we apply the *severity*.


- **check_zone_fills** :index:`: <pair: preflight - check_zone_fills; check_zone_fills>` [:ref:`boolean <boolean>`] Zones are filled before doing any operation involving PCB layers.
The original PCB remains unchanged. If you need to abort when the zone fill
creates significant changes to a layer use the CheckZoneFill internal template.
Expand Down
1 change: 1 addition & 0 deletions docs/source/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ Supported error levels
- 34: CORRUPTED_PRO
- 35: BLENDER_ERROR
- 36: WARN_AS_ERROR
- 37: CHECK_FIELD

0 comments on commit 2a17b8a

Please sign in to comment.