From 038152393727bfafc26f25e3e5c14e6f1219e07a Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 16 Oct 2019 06:12:09 +0200 Subject: part: Adding category concept. Useful for later classifiying components. --- src/ee/tools/part_apply_souffle_post.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ee/tools') diff --git a/src/ee/tools/part_apply_souffle_post.py b/src/ee/tools/part_apply_souffle_post.py index 8630603..8ef7c6a 100644 --- a/src/ee/tools/part_apply_souffle_post.py +++ b/src/ee/tools/part_apply_souffle_post.py @@ -15,10 +15,12 @@ def work(in_path: Path, out_path: Path, work_dir: Path): in_parts: ObjDb[Part] = ObjDb[Part]() uri_idx = in_parts.add_unique_index("uri", lambda p: p.uri) - for entry in load_db(in_path).parts: + in_db = load_db(in_path) + for entry in in_db.parts: in_parts.add(Part(entry.part)) out_parts = PartDb() + out_parts.categories.extend(in_db.categories) for part in in_parts: out_parts.add_entry(part, False) -- cgit v1.2.3