Restructure: Move grid_* + vocab_* into packages (klausur-service)
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 28s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m31s
CI / test-python-agent-core (push) Successful in 20s
CI / test-nodejs-website (push) Successful in 23s

grid/ package (16 files):
  grid/build/   — core, zones, cleanup, text_ops, cell_ops, finalize
  grid/editor/  — api, helpers, columns, filters, headers, zones

vocab/ package (10 files):
  vocab/worksheet/ — api, models, extraction, generation, ocr, upload, analysis, compare
  vocab/           — session_store, learn_bridge

26 backward-compat shims. Internal imports relative. RAG untouched.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 21:30:20 +02:00
parent 098a2ff092
commit 59c400b9aa
58 changed files with 8803 additions and 8659 deletions

View File

@@ -0,0 +1,58 @@
"""
Grid Editor helper functions — barrel re-export module.
This file re-exports all public symbols from the split sub-modules
so that existing ``from grid_editor_helpers import ...`` statements
continue to work without changes.
Sub-modules:
- columns — column detection, cross-column splitting, marker merging
- filters — word/zone filtering, border ghosts, decorative margins
- headers — header/heading detection, colspan detection
- zones — vertical dividers, zone splitting/merging, zone grid building
Lizenz: Apache 2.0 (kommerziell nutzbar)
DATENSCHUTZ: Alle Verarbeitung erfolgt lokal.
"""
# --- Re-export: columns ---------------------------------------------------
from .columns import ( # noqa: F401
_is_recognized_word,
_split_cross_column_words,
_cluster_columns_by_alignment,
_MARKER_CHARS,
_merge_inline_marker_columns,
)
# --- Re-export: filters ----------------------------------------------------
from .filters import ( # noqa: F401
_filter_border_strip_words,
_GRID_GHOST_CHARS,
_filter_border_ghosts,
_flatten_word_boxes,
_words_in_zone,
_get_content_bounds,
_filter_decorative_margin,
_filter_footer_words,
_filter_header_junk,
)
# --- Re-export: headers ----------------------------------------------------
from .headers import ( # noqa: F401
_detect_heading_rows_by_color,
_detect_heading_rows_by_single_cell,
_detect_header_rows,
_detect_colspan_cells,
)
# --- Re-export: zones -------------------------------------------------------
from .zones import ( # noqa: F401
_PIPE_RE_VSPLIT,
_detect_vertical_dividers,
_split_zone_at_vertical_dividers,
_merge_content_zones_across_boxes,
_build_zone_grid,
)
# --- Re-export from cv_words_first (used by cv_box_layout.py) ---------------
from cv_words_first import _cluster_rows # noqa: F401