From 4c2c0ea503bd38cc637e0c3279cb0d508d831594 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 28 May 2019 15:25:31 +0200 Subject: part-validate-parts: Better output, yielding a message even if everything is ok. ninja: Include the digikey.dl as a dependency even if custom is used. digikey.dl: More rules. --- src/ee/tools/part_validate_parts.py | 6 ++++-- src/ee/tools/templates/build.ninja.j2 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ee/tools') diff --git a/src/ee/tools/part_validate_parts.py b/src/ee/tools/part_validate_parts.py index a9c5ba7..65477e5 100644 --- a/src/ee/tools/part_validate_parts.py +++ b/src/ee/tools/part_validate_parts.py @@ -80,7 +80,7 @@ def check_has_footprint(ctx: Context, bom: Part, sch: Part): return ms.warning("Part has footprint in schematic and a BOM part but their footprints do not match. " f"Footprints: part: {fp}, BOM: {supplier_fp}.") - ms.info("Part has footprint and BOM part. Their footprints matches.") + return ms.info("Part has footprint and BOM part. Their footprints matches.") def validate(f, ctx: Context, bom_part: Part, sch_part: Part): @@ -144,7 +144,7 @@ def work(bom_path: Path, sch_path: Path, report_path: Path, part_dbs: List[Path] print("Message index", file=f) print("=============", file=f) print("", file=f) - for message, messages_ in groupby(messages.messages, lambda m: m[2]): + for message, messages_ in groupby(sorted(messages.messages, key=lambda m: m[2]), lambda m: m[2]): messages = list(messages_) print(message, file=f) print("{}".format("-" * len(message)), file=f) @@ -152,6 +152,8 @@ def work(bom_path: Path, sch_path: Path, report_path: Path, part_dbs: List[Path] for m in messages: print(" * {}".format(m[0].printable_reference), file=f) + print("", file=f) + parser = argparse.ArgumentParser() ee.tools.add_default_argparse_group(parser) diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2 index 206a487..e8ce404 100644 --- a/src/ee/tools/templates/build.ninja.j2 +++ b/src/ee/tools/templates/build.ninja.j2 @@ -138,7 +138,7 @@ build ee/{{ s }}/souffle/facts.dl: part-apply-souffle-pre ee/{{ s }}/downloaded. {%- set main=souffle_ee_src + "/" + s + ".dl" %} {%- set alt="ee/custom/" + s + "-souffle.dl" %} -build ee/{{ s }}/souffle/out/fact.csv: souffle {{ alt if is_file(alt) else main }} | ee/{{ s }}/souffle/facts.dl +build ee/{{ s }}/souffle/out/fact.csv: souffle {{ alt if is_file(alt) else main }} | {{ main }} ee/{{ s }}/souffle/facts.dl work = ee/{{ s }}/souffle build ee/{{ s }}/parts.xml: part-apply-souffle-post ee/{{ s }}/souffle/out/fact.csv -- cgit v1.2.3