Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
56da7e8
Initial plan
Copilot Feb 11, 2026
7a02f51
Fix tag type definition URL and improve error handling
Copilot Feb 11, 2026
a6ce395
Update fallback tag type definitions with complete data from OpenEPap…
Copilot Feb 11, 2026
00c48b0
Remove unnecessary bpp and rotatebuffer fields from fallback definitions
Copilot Feb 11, 2026
e793090
Add workflow to sync tag type definitions weekly from OpenEPaperLink
Copilot Feb 11, 2026
06efa7e
Merge pull request #3 from Misiu/copilot/fix-config-flow-error
Misiu Feb 11, 2026
30e0bab
test
Misiu Feb 11, 2026
bf4e8d5
Initial plan
Copilot Feb 11, 2026
2fa8481
Extract inline Python from workflow into scripts with tests and fix bugs
Copilot Feb 11, 2026
c5c6e52
Address code review: fix list comprehension safety and tighten unicod…
Copilot Feb 11, 2026
0d5e1db
Fix test_overlapping_elements: regenerate reference image as JPEG
Copilot Feb 11, 2026
ca6c29e
Rename JPEG test reference images from .png to .jpg
Copilot Feb 11, 2026
f29436f
Merge pull request #4 from Misiu/copilot/fix-sync-tag-type-definition
Misiu Feb 11, 2026
9cde7ad
Initial plan
Copilot Feb 11, 2026
501edac
Fix sync-tag-definitions workflow: only commit tag_types.py and close…
Copilot Feb 11, 2026
b805a34
Merge pull request #7 from Misiu/copilot/fix-workflow-tag-checks
Misiu Feb 11, 2026
d7a5f0e
Initial plan
Copilot Feb 11, 2026
0921ce4
Revert non-test changes to match upstream state
Copilot Feb 11, 2026
be16f9f
Merge branch 'OpenDisplay-org:main' into copilot/fix-tests-and-rename…
Misiu Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/drawcustom/arc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def test_arc_basic(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(ARC_IMG_PATH, 'arc_basic.png'))
example_img = Image.open(os.path.join(ARC_IMG_PATH, 'arc_basic.jpg'))
assert images_equal(generated_img, example_img), "Basic arc rendering failed"

@pytest.mark.asyncio
Expand All @@ -56,5 +56,5 @@ async def test_pie_slice_basic(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(ARC_IMG_PATH, 'pie_slice_basic.png'))
example_img = Image.open(os.path.join(ARC_IMG_PATH, 'pie_slice_basic.jpg'))
assert images_equal(generated_img, example_img), "Basic pie slice rendering failed"
6 changes: 3 additions & 3 deletions tests/drawcustom/circle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def test_circle_filled(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_filled.png'))
example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_filled.jpg'))
assert images_equal(generated_img, example_img), "Basic filled circle rendering failed"

@pytest.mark.asyncio
Expand All @@ -55,7 +55,7 @@ async def test_circle_outline(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_outline.png'))
example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_outline.jpg'))
assert images_equal(generated_img, example_img), "Basic outline circle rendering failed"

@pytest.mark.asyncio
Expand All @@ -80,5 +80,5 @@ async def test_circle_percentage(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_percentage.png'))
example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_percentage.jpg'))
assert images_equal(generated_img, example_img), "Basic filled circle rendering failed"
10 changes: 5 additions & 5 deletions tests/drawcustom/common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def test_multiple_elements(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'multiple_elements.png'))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'multiple_elements.jpg'))
assert images_equal(generated_img, example_img), "Multiple elements drawing failed"

@pytest.mark.asyncio
Expand All @@ -56,7 +56,7 @@ async def test_rotation(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'rotated.png'))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'rotated.jpg'))
assert images_equal(generated_img, example_img), "rotated elements drawing failed"

@pytest.mark.asyncio
Expand All @@ -76,7 +76,7 @@ async def test_oversize_elements(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'oversize_elements.png'))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'oversize_elements.jpg'))
assert images_equal(generated_img, example_img), "Oversize elements drawing failed"

@pytest.mark.asyncio
Expand All @@ -97,7 +97,7 @@ async def test_overlapping_elements(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'overlapping_elements.png'))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'overlapping_elements.jpg'))
assert images_equal(generated_img, example_img), "Overlapping elements drawing failed"

@pytest.mark.asyncio
Expand All @@ -117,5 +117,5 @@ async def test_negative_coordinates(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'negative_coordinates.png'))
example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'negative_coordinates.jpg'))
assert images_equal(generated_img, example_img), "Negative coordinate elements drawing failed"
2 changes: 1 addition & 1 deletion tests/drawcustom/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def images_equal(img1, img2):

def save_image(image_bytes):
"""Save image for debugging."""
img_path = os.path.join(BASE_IMG_PATH, 'rename_me.png')
img_path = os.path.join(BASE_IMG_PATH, 'rename_me.jpg')
with open(img_path, 'wb') as f:
f.write(image_bytes)

Expand Down
8 changes: 4 additions & 4 deletions tests/drawcustom/debug_grid_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def test_debug_grid_basic(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_basic.png'))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_basic.jpg'))
assert images_equal(generated_img, example_img), "Basic debug grid rendering failed"

@pytest.mark.asyncio
Expand All @@ -47,7 +47,7 @@ async def test_debug_grid_custom_spacing(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_custom_spacing.png'))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_custom_spacing.jpg'))
assert images_equal(generated_img, example_img), "Custom spacing debug grid rendering failed"

@pytest.mark.asyncio
Expand All @@ -71,7 +71,7 @@ async def test_debug_grid_solid(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_solid.png'))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_solid.jpg'))
assert images_equal(generated_img, example_img), "Solid debug grid rendering failed"

@pytest.mark.asyncio
Expand All @@ -91,5 +91,5 @@ async def test_debug_grid_without_labels(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_without_labels.png'))
example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_without_labels.jpg'))
assert images_equal(generated_img, example_img), "Debug grid without labels rendering failed"
4 changes: 2 additions & 2 deletions tests/drawcustom/ellipse_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def test_circle_ellipse(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing.png'))
example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing.jpg'))
assert images_equal(generated_img, example_img), "Basic ellipse drawing failed"

@pytest.mark.asyncio
Expand All @@ -58,5 +58,5 @@ async def test_circle_ellipse_percentage(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing_percentage.png'))
example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing_percentage.jpg'))
assert images_equal(generated_img, example_img), "Basic ellipse drawing failed"
2 changes: 1 addition & 1 deletion tests/drawcustom/icon_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
#
# generated_img = Image.open(BytesIO(image_data))
# save_image(image_data)
# example_img = Image.open(os.path.join(ICON_IMG_PATH, 'icon_basic.png'))
# example_img = Image.open(os.path.join(ICON_IMG_PATH, 'icon_basic.jpg'))
# assert images_equal(generated_img, example_img), "Basic icon rendering failed"
12 changes: 6 additions & 6 deletions tests/drawcustom/line_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def test_line_basic(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_basic.png'))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_basic.jpg'))
assert images_equal(generated_img, example_img), "Basic line rendering failed"

@pytest.mark.asyncio
Expand All @@ -55,7 +55,7 @@ async def test_line_custom(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_custom.png'))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_custom.jpg'))
assert images_equal(generated_img, example_img), "Custom line rendering failed"

@pytest.mark.asyncio
Expand All @@ -80,7 +80,7 @@ async def test_dashed_line_basic(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_basic.png'))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_basic.jpg'))
assert images_equal(generated_img, example_img), "Basic dashed line rendering failed"

@pytest.mark.asyncio
Expand All @@ -107,7 +107,7 @@ async def test_dashed_line_custom_lengths(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_custom_lengths.png'))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_custom_lengths.jpg'))
assert images_equal(generated_img, example_img), "Custom dashed line rendering failed"

@pytest.mark.asyncio
Expand All @@ -131,7 +131,7 @@ async def test_dashed_line_basic_vertical(image_gen, mock_tag_info):
return_value=mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)
generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_vertical.png'))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_vertical.jpg'))
assert images_equal(generated_img, example_img), "Vertical dashed line rendering failed"

@pytest.mark.asyncio
Expand All @@ -158,5 +158,5 @@ async def test_dashed_line_diagonal(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_diagonal.png'))
example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_diagonal.jpg'))
assert images_equal(generated_img, example_img), "Dashed line diagonal rendering failed"
4 changes: 2 additions & 2 deletions tests/drawcustom/polygon_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def test_polygon_basic(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_basic.png'))
example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_basic.jpg'))
assert images_equal(generated_img, example_img), "Basic polygon rendering failed"

@pytest.mark.asyncio
Expand All @@ -46,5 +46,5 @@ async def test_polygon_filled(image_gen, mock_tag_info):
return_value=mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)
generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_filled.png'))
example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_filled.jpg'))
assert images_equal(generated_img, example_img), "Filled polygon rendering failed"
12 changes: 6 additions & 6 deletions tests/drawcustom/progress_bar_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def test_basic_progress_bar(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar.jpg'))
assert images_equal(generated_img, example_img), "Basic progress bar drawing failed"

@pytest.mark.asyncio
Expand Down Expand Up @@ -62,7 +62,7 @@ async def test_progress_bar_zero_progress(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.jpg'))
assert images_equal(generated_img, example_img), "Basic progress bar drawing failed"

@pytest.mark.asyncio
Expand Down Expand Up @@ -91,7 +91,7 @@ async def test_progress_bar_full(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.jpg'))
assert images_equal(generated_img, example_img), "Full progress bar drawing failed"

@pytest.mark.asyncio
Expand Down Expand Up @@ -119,7 +119,7 @@ async def test_progress_bar_negative_progress(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.jpg'))
assert images_equal(generated_img, example_img), "Progress bar with negative percentage drawing failed"

@pytest.mark.asyncio
Expand Down Expand Up @@ -148,7 +148,7 @@ async def test_progress_bar_over_full(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.jpg'))
assert images_equal(generated_img, example_img), "Over full progress bar drawing failed"

@pytest.mark.asyncio
Expand All @@ -175,5 +175,5 @@ async def test_basic_progress_bar_percentage(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_percentage.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_percentage.jpg'))
assert images_equal(generated_img, example_img), "Basic progress bar with percentage drawing failed"
6 changes: 3 additions & 3 deletions tests/drawcustom/qr_code_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def test_basic_qr_code(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code.jpg'))
assert images_equal(generated_img, example_img), "Basic qr code drawing failed"

@pytest.mark.asyncio
Expand All @@ -59,7 +59,7 @@ async def test_long_qr_code(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_long.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_long.jpg'))
assert images_equal(generated_img, example_img), "Long qr code drawing failed"

@pytest.mark.asyncio
Expand All @@ -85,5 +85,5 @@ async def test_basic_qr_code_percentage(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_percentage.png'))
example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_percentage.jpg'))
assert images_equal(generated_img, example_img), "Basic qr code drawing with percentage failed"
6 changes: 3 additions & 3 deletions tests/drawcustom/rectangle_pattern_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def test_rectangle_pattern(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern.png'))
example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern.jpg'))
assert images_equal(generated_img, example_img), "Rectangle pattern rendering failed"

@pytest.mark.asyncio
Expand Down Expand Up @@ -68,7 +68,7 @@ async def test_rectangle_pattern_rounded_corners(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern_rounded_corners.png'))
example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern_rounded_corners.jpg'))
assert images_equal(generated_img, example_img), "Rounded corner rectangle pattern rendering failed"

@pytest.mark.asyncio
Expand Down Expand Up @@ -98,5 +98,5 @@ async def test_rectangle_pattern(image_gen, mock_tag_info):
image_data = await generate_test_image(image_gen, service_data)

generated_img = Image.open(BytesIO(image_data))
example_img = Image.open(os.path.join(BASE_IMG_PATH, 'blank.png'))
example_img = Image.open(os.path.join(BASE_IMG_PATH, 'blank.jpg'))
assert images_equal(generated_img, example_img), "Rounded corner rectangle pattern rendering failed"
Loading
Loading