Fix Ruff errror, update node and fix buttton breakline
This commit is contained in:
parent
f267f6c183
commit
1edd0668d1
5 changed files with 12 additions and 8 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -- sanitized by DOMPurify -->
|
||||
<div class="markdown-viewer" v-html="rendered" />
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,17 @@
|
|||
class="toggle-btn"
|
||||
:class="{ active: mode === 'configurer' }"
|
||||
@click="mode = 'configurer'"
|
||||
>{{ t('studio.configure') }}</button>
|
||||
>
|
||||
{{ t('studio.configure') }}
|
||||
</button>
|
||||
<button
|
||||
class="toggle-btn"
|
||||
:class="{ active: mode === 'verifier' }"
|
||||
@click="mode = 'verifier'"
|
||||
:disabled="!analysisStore.currentAnalysis"
|
||||
>{{ t('studio.verify') }}</button>
|
||||
>
|
||||
{{ t('studio.verify') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
|
|
|
|||
Loading…
Reference in a new issue