[Diff] Added option to skip pages with no diffs
This commit is contained in:
parent
fcc7575f99
commit
86a9c25949
|
|
@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Mechanism to compare using a variant (See #278)
|
- Mechanism to compare using a variant (See #278)
|
||||||
- Mechanism to specify the current PCB/Schematic in memory (See #295)
|
- Mechanism to specify the current PCB/Schematic in memory (See #295)
|
||||||
- Mechanism to compare with the last Nth tag (See #312)
|
- Mechanism to compare with the last Nth tag (See #312)
|
||||||
|
- Option to skip pages with no differences
|
||||||
- Sch Variant:
|
- Sch Variant:
|
||||||
- Option to copy the project. Needed for text variables.
|
- Option to copy the project. Needed for text variables.
|
||||||
- Option to change the title (similar to PCB Variant)
|
- Option to change the title (similar to PCB Variant)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
- The GitHub actions with KiCad 6 support are tagged as `v2_k6` (stable) and `v2_dk6` (development).
|
- The GitHub actions with KiCad 6 support are tagged as `v2_k6` (stable) and `v2_dk6` (development).
|
||||||
Consult: [Github Actions tags](#github-actions-tags)
|
Consult: [Github Actions tags](#github-actions-tags)
|
||||||
|
|
||||||
**Important note about PcbDraw 1.0.0
|
**Important note about PcbDraw 1.0.0**
|
||||||
- This release is incompatible with 0.9.0, I'm trying to fix some issues in the upstream package.
|
- This release is incompatible with 0.9.0, I'm trying to fix some issues in the upstream package.
|
||||||
|
|
||||||
**New on v1.3.0**
|
**New on v1.3.0**
|
||||||
|
|
@ -150,7 +150,7 @@ Notes:
|
||||||
[**KiBoM**](https://github.com/INTI-CMNB/KiBoM) v1.8.0 [](https://github.com/INTI-CMNB/KiBoM) 
|
[**KiBoM**](https://github.com/INTI-CMNB/KiBoM) v1.8.0 [](https://github.com/INTI-CMNB/KiBoM) 
|
||||||
- Mandatory for `kibom`
|
- Mandatory for `kibom`
|
||||||
|
|
||||||
[**KiCad PCB/SCH Diff**](https://github.com/INTI-CMNB/KiDiff) v2.4.1 [](https://github.com/INTI-CMNB/KiDiff) 
|
[**KiCad PCB/SCH Diff**](https://github.com/INTI-CMNB/KiDiff) v2.4.2 [](https://github.com/INTI-CMNB/KiDiff) 
|
||||||
- Mandatory for `diff`
|
- Mandatory for `diff`
|
||||||
|
|
||||||
[**LXML**](https://pypi.org/project/LXML/) [](https://pypi.org/project/LXML/) [](https://packages.debian.org/bullseye/python3-lxml) 
|
[**LXML**](https://pypi.org/project/LXML/) [](https://pypi.org/project/LXML/) [](https://packages.debian.org/bullseye/python3-lxml) 
|
||||||
|
|
@ -1737,6 +1737,8 @@ Notes:
|
||||||
- `old_type`: [string='git'] [git,file,output,multivar] How to interpret the `old` name. Use `git` for a git hash, branch, etc.
|
- `old_type`: [string='git'] [git,file,output,multivar] How to interpret the `old` name. Use `git` for a git hash, branch, etc.
|
||||||
Use `file` for a file name. Use `output` to specify the name of a `pcb_variant`/`sch_variant` output.
|
Use `file` for a file name. Use `output` to specify the name of a `pcb_variant`/`sch_variant` output.
|
||||||
Use `multivar` to specify a reference file when `new_type` is also `multivar`.
|
Use `multivar` to specify a reference file when `new_type` is also `multivar`.
|
||||||
|
- `only_different`: [boolean=false] Only include the pages with differences in the output PDF.
|
||||||
|
Note that when no differeces are found we get a page saying *No diff*.
|
||||||
- `pcb`: [boolean=true] Compare the PCB, otherwise compare the schematic.
|
- `pcb`: [boolean=true] Compare the PCB, otherwise compare the schematic.
|
||||||
- `threshold`: [number=0] [0,1000000] Error threshold for the `stats` mode, 0 is no error. When specified a
|
- `threshold`: [number=0] [0,1000000] Error threshold for the `stats` mode, 0 is no error. When specified a
|
||||||
difference bigger than the indicated value will make the diff fail.
|
difference bigger than the indicated value will make the diff fail.
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
- The GitHub actions with KiCad 6 support are tagged as `v2_k6` (stable) and `v2_dk6` (development).
|
- The GitHub actions with KiCad 6 support are tagged as `v2_k6` (stable) and `v2_dk6` (development).
|
||||||
Consult: [Github Actions tags](#github-actions-tags)
|
Consult: [Github Actions tags](#github-actions-tags)
|
||||||
|
|
||||||
**Important note about PcbDraw 1.0.0
|
**Important note about PcbDraw 1.0.0**
|
||||||
- This release is incompatible with 0.9.0, I'm trying to fix some issues in the upstream package.
|
- This release is incompatible with 0.9.0, I'm trying to fix some issues in the upstream package.
|
||||||
|
|
||||||
**New on v1.3.0**
|
**New on v1.3.0**
|
||||||
|
|
|
||||||
|
|
@ -524,6 +524,9 @@ outputs:
|
||||||
# Use `file` for a file name. Use `output` to specify the name of a `pcb_variant`/`sch_variant` output.
|
# Use `file` for a file name. Use `output` to specify the name of a `pcb_variant`/`sch_variant` output.
|
||||||
# Use `multivar` to specify a reference file when `new_type` is also `multivar`
|
# Use `multivar` to specify a reference file when `new_type` is also `multivar`
|
||||||
old_type: 'git'
|
old_type: 'git'
|
||||||
|
# [boolean=false] Only include the pages with differences in the output PDF.
|
||||||
|
# Note that when no differeces are found we get a page saying *No diff*
|
||||||
|
only_different: false
|
||||||
# [string='%f-%i%I%v.%x'] Filename for the output (%i=diff_pcb/diff_sch, %x=pdf). Affected by global options
|
# [string='%f-%i%I%v.%x'] Filename for the output (%i=diff_pcb/diff_sch, %x=pdf). Affected by global options
|
||||||
output: '%f-%i%I%v.%x'
|
output: '%f-%i%I%v.%x'
|
||||||
# [boolean=true] Compare the PCB, otherwise compare the schematic
|
# [boolean=true] Compare the PCB, otherwise compare the schematic
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"""
|
"""
|
||||||
Dependencies:
|
Dependencies:
|
||||||
- name: KiCad PCB/SCH Diff
|
- name: KiCad PCB/SCH Diff
|
||||||
version: 2.4.1
|
version: 2.4.2
|
||||||
role: mandatory
|
role: mandatory
|
||||||
github: INTI-CMNB/KiDiff
|
github: INTI-CMNB/KiDiff
|
||||||
command: kicad-diff.py
|
command: kicad-diff.py
|
||||||
|
|
@ -99,6 +99,9 @@ class DiffOptions(BaseOptions):
|
||||||
self.use_file_id = False
|
self.use_file_id = False
|
||||||
""" When creating the link name of an output file related to a variant use the variant
|
""" When creating the link name of an output file related to a variant use the variant
|
||||||
`file_id` instead of its name """
|
`file_id` instead of its name """
|
||||||
|
self.only_different = False
|
||||||
|
""" Only include the pages with differences in the output PDF.
|
||||||
|
Note that when no differeces are found we get a page saying *No diff* """
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._expand_id = 'diff'
|
self._expand_id = 'diff'
|
||||||
self._expand_ext = 'pdf'
|
self._expand_ext = 'pdf'
|
||||||
|
|
@ -403,6 +406,8 @@ class DiffOptions(BaseOptions):
|
||||||
cmd.extend(['--layers', self.incl_file])
|
cmd.extend(['--layers', self.incl_file])
|
||||||
if self.threshold:
|
if self.threshold:
|
||||||
cmd.extend(['--threshold', str(self.threshold)])
|
cmd.extend(['--threshold', str(self.threshold)])
|
||||||
|
if self.only_different:
|
||||||
|
cmd.append('--only_different')
|
||||||
cmd.extend([self.file_exist, self.file_exist])
|
cmd.extend([self.file_exist, self.file_exist])
|
||||||
if GS.debug_enabled:
|
if GS.debug_enabled:
|
||||||
cmd.insert(1, '-'+'v'*GS.debug_level)
|
cmd.insert(1, '-'+'v'*GS.debug_level)
|
||||||
|
|
|
||||||
|
|
@ -485,7 +485,7 @@ deps = '{\
|
||||||
"version": [\
|
"version": [\
|
||||||
2,\
|
2,\
|
||||||
4,\
|
4,\
|
||||||
1\
|
2\
|
||||||
]\
|
]\
|
||||||
}\
|
}\
|
||||||
],\
|
],\
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue