Skip to content

Commit 9eac7c2

Browse files
committed
fix: debug
1 parent f0f697c commit 9eac7c2

6 files changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- .devcontainer/Dockerfile
99
pull_request:
1010
branches: [master]
11+
paths:
12+
- Dockerfile
13+
- .devcontainer/Dockerfile
1114

1215
jobs:
1316
lint:

.github/workflows/pyright.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- "*.toml"
99
pull_request:
1010
branches: [master]
11+
paths:
12+
- "**/*.py"
13+
- "*.toml"
1114

1215
jobs:
1316
type-check:

.github/workflows/ruff.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- "*.toml"
99
pull_request:
1010
branches: [master]
11+
paths:
12+
- "**/*.py"
13+
- "*.toml"
1114

1215
jobs:
1316
lint:

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- "tests/**/*.py"
99
pull_request:
1010
branches: [master]
11+
paths:
12+
- "src/**/*.py"
13+
- "tests/**/*.py"
1114

1215
jobs:
1316
test-and-coverage:

src/algorithm/template/alignment/template_alignment.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def apply_template_alignment(gray_image, colored_image, template: Template, conf
3737
# TODO: wrap this loop body into a function and generalize into passing *any* scanZone in this.
3838
for field_block in template.field_blocks:
3939
field_block_name = field_block.name
40+
field_block.shifts = [0, 0]
4041
bounding_box_origin = field_block.bounding_box_origin
4142
bounding_box_dimensions = field_block.bounding_box_dimensions
4243
field_block_alignment = field_block.alignment
@@ -61,7 +62,15 @@ def apply_template_alignment(gray_image, colored_image, template: Template, conf
6162
bounding_box_origin[1] + margins["bottom"] + bounding_box_dimensions[1]
6263
),
6364
]
64-
65+
logger.debug(
66+
field_block.name,
67+
field_block.to_json(),
68+
zone_start,
69+
zone_end,
70+
bounding_box_origin,
71+
bounding_box_dimensions,
72+
gray_image.shape,
73+
)
6574
block_gray_image, _block_colored_image, block_gray_alignment_image = (
6675
(
6776
None

src/algorithm/template/layout/field_block/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def to_json(self):
5252
key: default_dump(getattr(self, key))
5353
for key in [
5454
"bubble_dimensions",
55-
"dimensions",
55+
"bounding_box_dimensions",
5656
"empty_value",
5757
"fields",
5858
"name",
59-
"origin",
59+
"bounding_box_origin",
6060
# "shifted_origin",
6161
# "plot_bin_name",
6262
]

0 commit comments

Comments
 (0)