[Navigate_Results][Added] Option to skip outs with run_by_default: false

This commit is contained in:
Salvador E. Tropea 2023-06-14 07:01:43 -03:00
parent d19b9343bc
commit f486fb34b9
5 changed files with 18 additions and 6 deletions

View File

@ -52,11 +52,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
different (#431)
- Versions with stencil for Elecrow, FusionPCB, P-Ban and PCBWay.
- Render_3D:
- realistic: can be used to disable the realistic colors and get the GUI ones
- show_board_body: can be used to make the PCB core transparent (see inner)
- show_comments: to see the content of the User.Comments layer.
- show_eco: to see the content of the Eco1.User/Eco2.User layers.
- show_adhesive : to see the content of the *.Adhesive layers.
- `realistic`: can be used to disable the realistic colors and get the GUI ones
- `show_board_body`: can be used to make the PCB core transparent (see inner)
- `show_comments`: to see the content of the User.Comments layer.
- `show_eco`: to see the content of the Eco1.User/Eco2.User layers.
- `show_adhesive`: to see the content of the *.Adhesive layers.
- Navigate_Results:
- `skip_not_run`: used to skip outputs not generated in default runs.
### Changed
- Command line:

View File

@ -3165,6 +3165,7 @@ Notes:
* Valid keys:
- **`link_from_root`**: [string=''] The name of a file to create at the main output directory linking to the home page.
- **`output`**: [string='%f-%i%I%v.%x'] Filename for the output (%i=html, %x=navigate). Affected by global options.
- `skip_not_run`: [boolean=false] Skip outputs with `run_by_default: false`.
- `category`: [string|list(string)=''] The category for this output. If not specified an internally defined category is used.
Categories looks like file system paths, i.e. **PCB/fabrication/gerber**.
The categories are currently used for `navigate_results`.

View File

@ -1586,6 +1586,8 @@ outputs:
link_from_root: ''
# [string='%f-%i%I%v.%x'] Filename for the output (%i=html, %x=navigate). Affected by global options
output: '%f-%i%I%v.%x'
# [boolean=false] Skip outputs with `run_by_default: false`
skip_not_run: false
# Netlist:
# The netlist can be generated in the classic format and in IPC-D-356 format,
# useful for board testing

View File

@ -173,6 +173,8 @@ class Navigate_ResultsOptions(BaseOptions):
""" *Filename for the output (%i=html, %x=navigate) """
self.link_from_root = ''
""" *The name of a file to create at the main output directory linking to the home page """
self.skip_not_run = False
""" Skip outputs with `run_by_default: false` """
super().__init__()
self._expand_id = 'navigate'
self._expand_ext = 'html'
@ -468,6 +470,9 @@ class Navigate_ResultsOptions(BaseOptions):
def create_tree(self):
o_tree = {}
for o in RegOutput.get_outputs():
if not o.run_by_default and self.skip_not_run:
# Skip outputs that aren't generated in a regular run
continue
config_output(o)
cat = o.category
if cat is None:
@ -529,5 +534,5 @@ class Navigate_Results(BaseOutput): # noqa: F821
@staticmethod
def get_conf_examples(name, layers, templates):
outs = BaseOutput.simple_conf_examples(name, 'Web page to browse the results', 'Browse') # noqa: F821
outs[0]['options'] = {'link_from_root': 'index.html'}
outs[0]['options'] = {'link_from_root': 'index.html', 'skip_not_run': True}
return outs

View File

@ -51,6 +51,8 @@ outputs:
- name: 'navigate'
comment: "Browse the results"
type: navigate_results
options:
skip_not_run: true
- name: 'compress_page'
comment: "Compressed presentation page"