Made more clear which preflight options modifies files
- Also unified to "preflight" (more common than pre-flight) Related to #165
This commit is contained in:
parent
788b7d6b83
commit
b5d5bea324
|
|
@ -118,7 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [0.11.0] - 2021-04-25
|
||||
### Added
|
||||
- `erc_warnings` pre-flight option to consider ERC warnings as errors.
|
||||
- `erc_warnings` preflight option to consider ERC warnings as errors.
|
||||
- Pattern expansion in the `dir` option for outputs (#58)
|
||||
- New filter types:
|
||||
- `suparts`: Adds support for KiCost's subparts feature.
|
||||
|
|
@ -436,7 +436,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## [0.2.2] - 2020-04-20
|
||||
### Fixed
|
||||
- KiBoM temporal files, now removed
|
||||
- pre-flight tasks that didn't honor --out-dir
|
||||
- preflight tasks that didn't honor --out-dir
|
||||
|
||||
## [0.2.1] - 2020-04-18
|
||||
### Fixed
|
||||
|
|
@ -452,7 +452,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- KiBoM and InteractiveHtmlBoM support
|
||||
- Pre-flight: generation of the BoM in XML format
|
||||
- Pre-flight: DRC and ERC
|
||||
- Option to skip pre-flight actions
|
||||
- Option to skip preflight actions
|
||||
- Option to select which outputs will be generated
|
||||
- Progress information
|
||||
- --version option
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ This section is used to specify tasks that will be executed before generating an
|
|||
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_zone_fills`: [boolean=false] Zones are filled before doing any operation involving PCB layers.
|
||||
The original PCB remains unchanged.
|
||||
- `erc_warnings`: [boolean=false] Option for `run_erc`. ERC warnings are considered errors.
|
||||
- `filters`: [list(dict)] A list of entries to filter out ERC/DRC messages.
|
||||
* Valid keys:
|
||||
|
|
@ -128,7 +129,7 @@ This section is used to specify tasks that will be executed before generating an
|
|||
- `regex`: [string='None'] Regular expression to match the text for the error we want to exclude.
|
||||
- *regexp*: Alias for regex.
|
||||
- `ignore_unconnected`: [boolean=false] Option for `run_drc`. Ignores the unconnected nets. Useful if you didn't finish the routing.
|
||||
- `pcb_replace`: [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date.
|
||||
- `pcb_replace`: [dict] Replaces tags in the PCB. I.e. to insert the git hash or last revision date.
|
||||
This is useful for KiCad 5, use `set_text_variables` when using KiCad 6.
|
||||
This pre-flight modifies the PCB. Even when a back-up is done use it carefully.
|
||||
* Valid keys:
|
||||
|
|
@ -178,6 +179,7 @@ This section is used to specify tasks that will be executed before generating an
|
|||
- `set_text_variables`: [dict|list(dict)] Defines KiCad 6 variables.
|
||||
They are expanded using ${VARIABLE}, and stored in the project file.
|
||||
This preflight replaces `pcb_replace` and `sch_replace` when using KiCad 6.
|
||||
This pre-flight modifies the KiCad project file.
|
||||
- `update_qr`: [boolean=false] Update the QR codes.
|
||||
Complements the `qr_lib` output.
|
||||
The KiCad 6 files and the KiCad 5 PCB needs manual update, generating a new library isn't enough.
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ kiplot.inti-cmnb (0.2.3-1) stable; urgency=medium
|
|||
kiplot.inti-cmnb (0.2.2-1) stable; urgency=medium
|
||||
|
||||
* Removed KiBoM temporal files
|
||||
* Fixed pre-flight tasks that didn't honor --out-dir
|
||||
* Fixed preflight tasks that didn't honor --out-dir
|
||||
|
||||
-- Salvador E. Tropea <salvador@inti.gob.ar> Mon, 20 Apr 2020 18:35:00 -0300
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ preflight:
|
|||
# Used to solve ERC problems when using filters that remove power reference numbers.
|
||||
annotate_power: true
|
||||
# [boolean=false] Zones are filled before doing any operation involving PCB layers.
|
||||
# The original PCB remains unchanged.
|
||||
check_zone_fills: true
|
||||
# [boolean=false] Option for `run_erc`. ERC warnings are considered errors.
|
||||
erc_warnings: false
|
||||
|
|
@ -36,7 +37,7 @@ preflight:
|
|||
regex: 'Regular expression to match'
|
||||
# [boolean=false] Option for `run_drc`. Ignores the unconnected nets. Useful if you didn't finish the routing.
|
||||
ignore_unconnected: false
|
||||
# [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date.
|
||||
# [dict] Replaces tags in the PCB. I.e. to insert the git hash or last revision date.
|
||||
# This is useful for KiCad 5, use `set_text_variables` when using KiCad 6.
|
||||
# This pre-flight modifies the PCB. Even when a back-up is done use it carefully.
|
||||
pcb_replace:
|
||||
|
|
@ -65,6 +66,7 @@ preflight:
|
|||
# [dict|list(dict)] Defines KiCad 6 variables.
|
||||
# They are expanded using ${VARIABLE}, and stored in the project file.
|
||||
# This preflight replaces `pcb_replace` and `sch_replace` when using KiCad 6.
|
||||
# This pre-flight modifies the KiCad project file.
|
||||
set_text_variables:
|
||||
- name: 'git_hash'
|
||||
command: 'git log -1 --format="%h" $KIBOT_PCB_NAME'
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ def main():
|
|||
# Only create a makefile
|
||||
generate_makefile(args.makefile, plot_config, outputs)
|
||||
else:
|
||||
# Do all the job (pre-flight + outputs)
|
||||
# Do all the job (preflight + outputs)
|
||||
generate_outputs(outputs, args.target, args.invert_sel, args.skip_pre, args.cli_order)
|
||||
# Print total warnings
|
||||
logger.log_totals()
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ def preflight_checks(skip_pre):
|
|||
|
||||
if skip_pre is not None:
|
||||
if skip_pre == 'all':
|
||||
logger.debug("Skipping all pre-flight actions")
|
||||
logger.debug("Skipping all preflight actions")
|
||||
return
|
||||
else:
|
||||
skip_list = skip_pre.split(',')
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class KiCostOptions(VariantOptions):
|
|||
netlist = GS.sch_no_ext+'.xml'
|
||||
if not isfile(netlist):
|
||||
logger.error('Missing netlist in XML format `{}`'.format(netlist))
|
||||
logger.error('You can generate it using the `update_xml` pre-flight')
|
||||
logger.error('You can generate it using the `update_xml` preflight')
|
||||
exit(BOM_ERROR)
|
||||
# Check KiCost is available
|
||||
cmd_kicost = abspath(join(dirname(__file__), KICOST_SUBMODULE))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020 Salvador E. Tropea
|
||||
# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial
|
||||
# Copyright (c) 2020-2022 Salvador E. Tropea
|
||||
# Copyright (c) 2020-2022 Instituto Nacional de Tecnología Industrial
|
||||
# License: GPL-3.0
|
||||
# Project: KiBot (formerly KiPlot)
|
||||
from .error import (KiPlotConfigurationError)
|
||||
|
|
@ -9,7 +9,8 @@ from .macros import macros, pre_class # noqa: F401
|
|||
|
||||
@pre_class
|
||||
class Check_Zone_Fills(BasePreFlight): # noqa: F821
|
||||
""" [boolean=false] Zones are filled before doing any operation involving PCB layers """
|
||||
""" [boolean=false] Zones are filled before doing any operation involving PCB layers.
|
||||
The original PCB remains unchanged """
|
||||
def __init__(self, name, value):
|
||||
super().__init__(name, value)
|
||||
if not isinstance(value, bool):
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ class PCB_ReplaceOptions(Base_ReplaceOptions):
|
|||
|
||||
@pre_class
|
||||
class PCB_Replace(Base_Replace): # noqa: F821
|
||||
""" [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date.
|
||||
""" [dict] Replaces tags in the PCB. I.e. to insert the git hash or last revision date.
|
||||
This is useful for KiCad 5, use `set_text_variables` when using KiCad 6.
|
||||
This pre-flight modifies the PCB. Even when a back-up is done use it carefully """
|
||||
This preflight modifies the PCB. Even when a back-up is done use it carefully """
|
||||
_context = 'PCB'
|
||||
|
||||
def __init__(self, name, value):
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class SCH_ReplaceOptions(Base_ReplaceOptions):
|
|||
class SCH_Replace(Base_Replace): # noqa: F821
|
||||
""" [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date.
|
||||
This is useful for KiCad 5, use `set_text_variables` when using KiCad 6.
|
||||
This pre-flight modifies the schematics. Even when a back-up is done use it carefully """
|
||||
This preflight modifies the schematics. Even when a back-up is done use it carefully """
|
||||
_context = 'SCH'
|
||||
|
||||
def __init__(self, name, value):
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ class Set_Text_VariablesOptions(Optionable):
|
|||
class Set_Text_Variables(BasePreFlight): # noqa: F821
|
||||
""" [dict|list(dict)] Defines KiCad 6 variables.
|
||||
They are expanded using ${VARIABLE}, and stored in the project file.
|
||||
This preflight replaces `pcb_replace` and `sch_replace` when using KiCad 6 """
|
||||
This preflight replaces `pcb_replace` and `sch_replace` when using KiCad 6.
|
||||
The KiCad project file is modified """
|
||||
def __init__(self, name, value):
|
||||
f = Set_Text_VariablesOptions()
|
||||
f.set_tree({'variables': value})
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ def test_skip_pre_and_outputs(test_dir):
|
|||
ctx.run(extra=['-s', 'all', '-i'])
|
||||
|
||||
ctx.dont_expect_out_file(ctx.get_pos_both_csv_filename())
|
||||
assert ctx.search_err('Skipping all pre-flight actions')
|
||||
assert ctx.search_err('Skipping all preflight actions')
|
||||
assert ctx.search_err('Skipping all outputs')
|
||||
|
||||
ctx.clean_up()
|
||||
|
|
|
|||
Loading…
Reference in New Issue