aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-05-28 15:25:31 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-05-28 15:32:04 +0200
commit4c2c0ea503bd38cc637e0c3279cb0d508d831594 (patch)
treeaa249472211edd34202cac2a4f5034b466d5adce /src/ee/tools
parent79ee5e3c64c0140a61324914d24049478a9cf7f5 (diff)
downloadee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.tar.gz
ee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.tar.bz2
ee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.tar.xz
ee-python-4c2c0ea503bd38cc637e0c3279cb0d508d831594.zip
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.
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