diff --git a/CHANGELOG.md b/CHANGELOG.md index c1836bd9..0c2da6bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 9df2e0a2..13508df5 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/debian/changelog b/debian/changelog index 3c3e4583..8898c667 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 20 Apr 2020 18:35:00 -0300 diff --git a/docs/samples/generic_plot.kibot.yaml b/docs/samples/generic_plot.kibot.yaml index 7b8680a3..145ab9c5 100644 --- a/docs/samples/generic_plot.kibot.yaml +++ b/docs/samples/generic_plot.kibot.yaml @@ -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' diff --git a/kibot/__main__.py b/kibot/__main__.py index 368c49a4..727d0327 100644 --- a/kibot/__main__.py +++ b/kibot/__main__.py @@ -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() diff --git a/kibot/kiplot.py b/kibot/kiplot.py index b7f58604..c8f8bcd0 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -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(',') diff --git a/kibot/out_kicost.py b/kibot/out_kicost.py index 6f357c19..c7b12dba 100644 --- a/kibot/out_kicost.py +++ b/kibot/out_kicost.py @@ -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)) diff --git a/kibot/pre_check_zone_fills.py b/kibot/pre_check_zone_fills.py index 41b9d969..c2932511 100644 --- a/kibot/pre_check_zone_fills.py +++ b/kibot/pre_check_zone_fills.py @@ -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): diff --git a/kibot/pre_pcb_replace.py b/kibot/pre_pcb_replace.py index dd0c256a..77160070 100644 --- a/kibot/pre_pcb_replace.py +++ b/kibot/pre_pcb_replace.py @@ -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): diff --git a/kibot/pre_sch_replace.py b/kibot/pre_sch_replace.py index 3824c933..36538abd 100644 --- a/kibot/pre_sch_replace.py +++ b/kibot/pre_sch_replace.py @@ -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): diff --git a/kibot/pre_set_text_variables.py b/kibot/pre_set_text_variables.py index d13d825e..fd70cede 100644 --- a/kibot/pre_set_text_variables.py +++ b/kibot/pre_set_text_variables.py @@ -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}) diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index e6075eb8..f09d6d01 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -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()