aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-10-16 06:12:09 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-10-16 08:49:48 +0200
commit038152393727bfafc26f25e3e5c14e6f1219e07a (patch)
tree131c6ade35a4278eb40d787cb421bf74e4532026 /src/ee/tools
parent73f151ec1da4ca78d4b9326f7efc81e0fad05159 (diff)
downloadee-python-038152393727bfafc26f25e3e5c14e6f1219e07a.tar.gz
ee-python-038152393727bfafc26f25e3e5c14e6f1219e07a.tar.bz2
ee-python-038152393727bfafc26f25e3e5c14e6f1219e07a.tar.xz
ee-python-038152393727bfafc26f25e3e5c14e6f1219e07a.zip
part: Adding category concept.
Useful for later classifiying components.
Diffstat (limited to 'src/ee/tools')
-rw-r--r--src/ee/tools/part_apply_souffle_post.py4
1 files changed, 3 insertions, 1 deletions
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)