import ee.bom.doit import ee.digikey.doit import ee.doit import ee.kicad.doit # noinspection PyUnresolvedReferences from ee.bom.doit import * # noinspection PyUnresolvedReferences from ee.digikey.doit import * from ee.kicad.doit import * prj = "demo" sch = "{}.sch".format(prj) kicad_pcb = "{}.kicad_pcb".format(prj) DOIT_CONFIG = {'check_file_uptodate': 'timestamp'} ee.doit.configure_logging() dsm = DataSetManager("ee") kicad_footprint = "kicad-footprint" dsm.add_ds("csv", kicad_footprint, "kicad-footprint-mapping", path="ee/kicad-footprint.csv") ee.kicad.doit.change_data_sets_for_task(task_kicad_create_component_data_set, lambda ds: ds + [kicad_footprint]) ee.kicad.doit.init( data_set_manager=dsm, sch=sch, kicad_pcb=kicad_pcb, gerber_dir="gerber", ) ee.bom.doit.init( data_set_manager=dsm, ) ee.digikey.doit.doit_config.configure(data_set_manager=dsm) def task_orders(): data_sets = [ee.bom.doit.output_data_set_for_task(task_bom), ee.digikey.doit.doit_config.out_data_set_for(task_digikey_resolve_schematic_components)] yield create_task_order_csv( output_file="ee/order.csv", out_data_set="order", data_sets=data_sets) for size in [1, 100]: yield create_task_order_csv( output_file="ee/digikey-{}.csv".format(size) if size != 1 else "ee/digikey.csv", style="digikey", out_data_set="digikey-order-{}".format(size), data_sets=data_sets, count=size)