[Quick-Start] Changes in variants use
- Avoid importing PCB/SCH stuff that isn't needed - We no longer use variants in Quick-Start, just filters
This commit is contained in:
parent
315a089300
commit
bda5c159ae
|
|
@ -853,16 +853,15 @@ def generate_one_example(dest_dir, types):
|
||||||
yaml_dump(f, {'global': glb})
|
yaml_dump(f, {'global': glb})
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
# A helper for the internal templates
|
# A helper for the internal templates
|
||||||
imports = [{'file': man} for man in ['Elecrow', 'FusionPCB', 'JLCPCB', 'PCBWay']]
|
needed_imports = []
|
||||||
yaml_dump(f, {'import': imports})
|
if GS.pcb_file:
|
||||||
f.write('\n')
|
needed_imports.extend(['Elecrow', 'FusionPCB', 'JLCPCB', 'PCBWay'])
|
||||||
# A helper for KiCost demo
|
if GS.sch_file and GS.pcb_file:
|
||||||
var = {'name': 'place_holder'}
|
needed_imports.append('MacroFab_XYRS')
|
||||||
var['comment'] = 'Just a place holder for pre_transform filters'
|
if needed_imports:
|
||||||
var['type'] = 'kicost'
|
imports = [{'file': man} for man in needed_imports]
|
||||||
var['pre_transform'] = ['_kicost_rename', '_rot_footprint']
|
yaml_dump(f, {'import': imports})
|
||||||
yaml_dump(f, {'variants': [var]})
|
f.write('\n')
|
||||||
f.write('\n')
|
|
||||||
# All the outputs
|
# All the outputs
|
||||||
outputs = []
|
outputs = []
|
||||||
for n, cls in OrderedDict(sorted(outs.items())).items():
|
for n, cls in OrderedDict(sorted(outs.items())).items():
|
||||||
|
|
|
||||||
|
|
@ -995,8 +995,6 @@ class BoM(BaseOutput): # noqa: F821
|
||||||
for tpl in templates:
|
for tpl in templates:
|
||||||
for out in tpl:
|
for out in tpl:
|
||||||
if out['type'] == 'bom':
|
if out['type'] == 'bom':
|
||||||
# Use the KiCost + rotate variant
|
|
||||||
out['options']['variant'] = 'place_holder'
|
|
||||||
columns = out['options'].get('columns', None)
|
columns = out['options'].get('columns', None)
|
||||||
if columns:
|
if columns:
|
||||||
# Rename MPN for something we have, or just remove it
|
# Rename MPN for something we have, or just remove it
|
||||||
|
|
@ -1085,7 +1083,9 @@ class BoM(BaseOutput): # noqa: F821
|
||||||
grp.append(d+'#')
|
grp.append(d+'#')
|
||||||
gb = BoM.create_bom('XLSX', 'Costs', grp, join_fields, fld_names)
|
gb = BoM.create_bom('XLSX', 'Costs', grp, join_fields, fld_names)
|
||||||
gb['options']['xlsx'] = {'style': 'modern-green', 'kicost': True, 'specs': True}
|
gb['options']['xlsx'] = {'style': 'modern-green', 'kicost': True, 'specs': True}
|
||||||
gb['options']['variant'] = 'place_holder'
|
# KitSpace seems to be failing all the time
|
||||||
|
gb['options']['xlsx']['kicost_api_disable'] = 'KitSpace'
|
||||||
|
gb['options']['pre_transform'] = '_kicost_rename'
|
||||||
# gb['options']['distributors'] = list(dists)
|
# gb['options']['distributors'] = list(dists)
|
||||||
outs.append(gb)
|
outs.append(gb)
|
||||||
# Add the list of layers to the templates
|
# Add the list of layers to the templates
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue