From da10b35d0f2837293cbe2b7bc3f8b552f0fe72eb Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Thu, 11 Oct 2018 16:32:13 +0000 Subject: [PATCH 1/5] Don't fail it output dir doesn't exist. Signed-off-by: Tim 'mithro' Ansell --- fuzzers/074-dump_all/generate_after_dump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzzers/074-dump_all/generate_after_dump.sh b/fuzzers/074-dump_all/generate_after_dump.sh index 9b432dfd..4bfd0ccf 100755 --- a/fuzzers/074-dump_all/generate_after_dump.sh +++ b/fuzzers/074-dump_all/generate_after_dump.sh @@ -1,6 +1,6 @@ #!/bin/bash -xe -rm -r output +rm -rf output mkdir -p output python3 reduce_tile_types.py \ --root_dir specimen_001/ \ From 4a94337c7931b02f863e761d4fc043bc02f7ff2c Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Thu, 11 Oct 2018 20:12:48 +0000 Subject: [PATCH 2/5] Add target for a Python virtualenv. Signed-off-by: Tim 'mithro' Ansell --- .gitignore | 1 + Makefile | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1e7f24db..26ba6eed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/env/ /build/ .Xil # Ignore database directories _except_ for their settings diff --git a/Makefile b/Makefile index 2028b5d9..bd6f054c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ CLANG_FORMAT ?= clang-format -.PHONY: database format clean +.PHONY: database format clean env + +env: + virtualenv --python=python3 env + . env/bin/activate; pip install -r requirements.txt + ln -sf $(PWD)/prjxray env/lib/python3.*/site-packages/ build: git submodule update --init --recursive From ff56a96843e10ed99a21f8bcab9213f9eef3f4cd Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Thu, 11 Oct 2018 13:30:21 -0700 Subject: [PATCH 3/5] Fixes to dump all Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> Signed-off-by: Tim 'mithro' Ansell --- prjxray/lib.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/prjxray/lib.py b/prjxray/lib.py index 208c46b2..f0a9d774 100644 --- a/prjxray/lib.py +++ b/prjxray/lib.py @@ -188,16 +188,16 @@ def find_origin_coordinate(site_names): smallest coordinate to re-origin them all to be relative to the tile. """ - if len(site_names) == 0: + x_coords = [] + y_coords = [] + for site in site_names: + x_coord, y_coord = get_site_coordinate_from_name(site) + x_coords.append(x_coord) + y_coords.append(y_coord) + + if len(x_coords) == 0 or len(y_coords) == 0: return 0, 0 - def inner_(): - for site in site_names: - coordinate = get_site_coordinate_from_name(site) - - yield coordinate.x_coord, coordinate.y_coord - - x_coords, y_coords = zip(*inner_()) min_x_coord = min(x_coords) min_y_coord = min(y_coords) From f514e36c13cfe0e97c281b3c8992c02460728b96 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Thu, 11 Oct 2018 13:47:17 -0700 Subject: [PATCH 4/5] Really fix find_origin_coordinate Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> Signed-off-by: Tim 'mithro' Ansell --- prjxray/lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prjxray/lib.py b/prjxray/lib.py index f0a9d774..98874ccd 100644 --- a/prjxray/lib.py +++ b/prjxray/lib.py @@ -191,9 +191,9 @@ def find_origin_coordinate(site_names): x_coords = [] y_coords = [] for site in site_names: - x_coord, y_coord = get_site_coordinate_from_name(site) - x_coords.append(x_coord) - y_coords.append(y_coord) + coordinate = get_site_coordinate_from_name(site) + x_coords.append(coordinate.x_coord) + y_coords.append(coordinate.y_coord) if len(x_coords) == 0 or len(y_coords) == 0: return 0, 0 From 0a9e24373eccb22dfe41073f8a3a0fa72627e5c0 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Fri, 12 Oct 2018 13:45:42 +0000 Subject: [PATCH 5/5] Missing closing of if. Signed-off-by: Tim 'mithro' Ansell --- fuzzers/074-dump_all/generate_after_dump.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/fuzzers/074-dump_all/generate_after_dump.sh b/fuzzers/074-dump_all/generate_after_dump.sh index 4bfd0ccf..71e33627 100755 --- a/fuzzers/074-dump_all/generate_after_dump.sh +++ b/fuzzers/074-dump_all/generate_after_dump.sh @@ -21,3 +21,4 @@ if [ -f $BASE_TILEGRID ]; then --overlay_grid output/tilegrid_full.json.tmp \ --output_grid output/tilegrid.json \ --mark_roi +fi