From 1edd0668d1ff494986f1c516f8b43beca3851fcb Mon Sep 17 00:00:00 2001 From: Pier-Jean Malandrino Date: Mon, 23 Mar 2026 10:13:24 +0100 Subject: [PATCH] Fix Ruff errror, update node and fix buttton breakline --- .github/workflows/ci.yml | 2 +- document-parser/domain/parsing.py | 2 +- document-parser/tests/test_bbox.py | 7 +++---- frontend/src/features/analysis/ui/MarkdownViewer.vue | 1 + frontend/src/pages/StudioPage.vue | 8 ++++++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a09f998..6877f38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: npm cache-dependency-path: frontend/package-lock.json diff --git a/document-parser/domain/parsing.py b/document-parser/domain/parsing.py index 8cdc943..7e7b4bb 100644 --- a/document-parser/domain/parsing.py +++ b/document-parser/domain/parsing.py @@ -208,7 +208,7 @@ def _process_content_item( # Docling edge case). US Letter dimensions are used as a safe default. # This may cause slight bbox misalignment on non-Letter pages (e.g. A4). logger.warning( - "Page %d not found in document metadata — using US Letter fallback (%s×%s pt)", + "Page %d not found in document metadata — using US Letter fallback (%sx%s pt)", page_no, _DEFAULT_PAGE_WIDTH, _DEFAULT_PAGE_HEIGHT, ) pages[page_no] = PageDetail(page_number=page_no, width=_DEFAULT_PAGE_WIDTH, height=_DEFAULT_PAGE_HEIGHT) diff --git a/document-parser/tests/test_bbox.py b/document-parser/tests/test_bbox.py index 27af6d3..9ffe67c 100644 --- a/document-parser/tests/test_bbox.py +++ b/document-parser/tests/test_bbox.py @@ -10,7 +10,6 @@ from docling_core.types.doc.base import BoundingBox, CoordOrigin from domain.bbox import EMPTY_BBOX, to_topleft_list - # --------------------------------------------------------------------------- # Standard conversions # --------------------------------------------------------------------------- @@ -65,7 +64,7 @@ class TestPageFormats: """Verify correct conversion across different page sizes.""" def test_a4_page(self): - """A4 page (595.28 × 841.89 pt) — most common non-US format.""" + """A4 page (595.28 x 841.89 pt) -- most common non-US format.""" page_height = 841.89 bbox = BoundingBox(l=72, t=769.89, r=523.28, b=72, coord_origin=CoordOrigin.BOTTOMLEFT) result = to_topleft_list(bbox, page_height=page_height) @@ -76,14 +75,14 @@ class TestPageFormats: assert result[3] == pytest.approx(page_height - 72) # ~769.89 def test_a3_page(self): - """A3 page (841.89 × 1190.55 pt).""" + """A3 page (841.89 x 1190.55 pt).""" page_height = 1190.55 bbox = BoundingBox(l=0, t=1190.55, r=841.89, b=0, coord_origin=CoordOrigin.BOTTOMLEFT) result = to_topleft_list(bbox, page_height=page_height) assert result == pytest.approx([0, 0, 841.89, 1190.55]) def test_legal_page(self): - """US Legal page (612 × 1008 pt).""" + """US Legal page (612 x 1008 pt).""" page_height = 1008.0 bbox = BoundingBox(l=50, t=50, r=562, b=958, coord_origin=CoordOrigin.TOPLEFT) result = to_topleft_list(bbox, page_height=page_height) diff --git a/frontend/src/features/analysis/ui/MarkdownViewer.vue b/frontend/src/features/analysis/ui/MarkdownViewer.vue index 9571c9e..3d75858 100644 --- a/frontend/src/features/analysis/ui/MarkdownViewer.vue +++ b/frontend/src/features/analysis/ui/MarkdownViewer.vue @@ -1,4 +1,5 @@ diff --git a/frontend/src/pages/StudioPage.vue b/frontend/src/pages/StudioPage.vue index cc13240..aedc9a4 100644 --- a/frontend/src/pages/StudioPage.vue +++ b/frontend/src/pages/StudioPage.vue @@ -26,13 +26,17 @@ class="toggle-btn" :class="{ active: mode === 'configurer' }" @click="mode = 'configurer'" - >{{ t('studio.configure') }} + > + {{ t('studio.configure') }} + + > + {{ t('studio.verify') }} +