aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/tools')
-rw-r--r--src/ee/tools/part_validate_parts.py6
-rw-r--r--src/ee/tools/templates/build.ninja.j22
2 files changed, 5 insertions, 3 deletions
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