Cleanup: Delete ALL 242 shims, update ALL consumer imports
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 41s
CI / test-go-edu-search (push) Successful in 32s
CI / test-python-klausur (push) Failing after 2m41s
CI / test-python-agent-core (push) Successful in 34s
CI / test-nodejs-website (push) Successful in 39s
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 41s
CI / test-go-edu-search (push) Successful in 32s
CI / test-python-klausur (push) Failing after 2m41s
CI / test-python-agent-core (push) Successful in 34s
CI / test-nodejs-website (push) Successful in 39s
klausur-service: 183 shims deleted, 26 test files + 8 source files updated backend-lehrer: 59 shims deleted, main.py + 8 source files updated All imports now use the new package paths directly. Zero shims remaining in the entire codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to abitur/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("abitur.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to abitur/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("abitur.models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to abitur/recognition.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("abitur.recognition")
|
||||
@@ -158,7 +158,7 @@ def _analyze_with_openai(input_path: Path) -> Path:
|
||||
|
||||
def _analyze_with_claude(input_path: Path) -> Path:
|
||||
"""Strukturierte JSON-Analyse mit Claude Vision API."""
|
||||
from claude_vision import analyze_worksheet_with_claude
|
||||
from services.claude_vision import analyze_worksheet_with_claude
|
||||
|
||||
if not input_path.exists():
|
||||
raise FileNotFoundError(f"Eingabedatei nicht gefunden: {input_path}")
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to services/ai_processor.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("services.ai_processor")
|
||||
@@ -8,7 +8,7 @@ A modular AI-powered worksheet processing system for:
|
||||
- Mindmap visualization
|
||||
|
||||
Usage:
|
||||
from ai_processor import analyze_scan_structure_with_ai, generate_mc_from_analysis
|
||||
from services.ai_processor import analyze_scan_structure_with_ai, generate_mc_from_analysis
|
||||
"""
|
||||
|
||||
# Configuration
|
||||
|
||||
@@ -157,7 +157,7 @@ def _analyze_with_claude(input_path: Path) -> Path:
|
||||
|
||||
Uses Claude 3.5 Sonnet for better OCR and layout detection.
|
||||
"""
|
||||
from claude_vision import analyze_worksheet_with_claude
|
||||
from services.claude_vision import analyze_worksheet_with_claude
|
||||
|
||||
if not input_path.exists():
|
||||
raise FileNotFoundError(f"Eingabedatei nicht gefunden: {input_path}")
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to services/audio.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("services.audio")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to letters/certificates_api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("letters.certificates_api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to letters/certificates_models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("letters.certificates_models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to services/claude_vision.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("services.claude_vision")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to correction/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("correction.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to correction/endpoints.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("correction.endpoints")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to correction/helpers.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("correction.helpers")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to correction/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("correction.models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to services/email.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("services.email")
|
||||
@@ -7,7 +7,7 @@
|
||||
# - game_extended_routes.py (Phase 5: achievements, progress, parent, class)
|
||||
#
|
||||
# The `router` object is assembled here by including all sub-routers.
|
||||
# Importers that did `from game_api import router` continue to work.
|
||||
# Importers that did `from game.api import router` continue to work.
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to game/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("game.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to game/extended_routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("game.extended_routes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to game/game_models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("game.game_models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to game/routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("game.routes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to game/session_routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("game.session_routes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to api/klausur_proxy.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("api.klausur_proxy")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/learning.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.learning")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/learning_api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.learning_api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to letters/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("letters.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to letters/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("letters.models")
|
||||
@@ -50,7 +50,7 @@ async def lifespan(app: FastAPI):
|
||||
logger.info("Backend-Lehrer starting up (DB search_path=lehrer,core,public)")
|
||||
# Initialize vocabulary tables
|
||||
try:
|
||||
from vocabulary_db import init_vocabulary_tables
|
||||
from vocabulary.db import init_vocabulary_tables
|
||||
await init_vocabulary_tables()
|
||||
except Exception as e:
|
||||
logger.warning(f"Vocabulary tables init failed (non-critical): {e}")
|
||||
@@ -97,70 +97,70 @@ from classroom_api import router as classroom_router
|
||||
app.include_router(classroom_router, prefix="/api/classroom")
|
||||
|
||||
# --- 2. State Engine (Begleiter-Modus mit Phasen und Antizipation) ---
|
||||
from state_engine_api import router as state_engine_router
|
||||
from classroom.state_engine_api import router as state_engine_router
|
||||
app.include_router(state_engine_router, prefix="/api")
|
||||
|
||||
# --- 3. Worksheets & Corrections ---
|
||||
from worksheets_api import router as worksheets_router
|
||||
from worksheets.api import router as worksheets_router
|
||||
app.include_router(worksheets_router, prefix="/api")
|
||||
|
||||
from correction_api import router as correction_router
|
||||
from correction.api import router as correction_router
|
||||
app.include_router(correction_router, prefix="/api")
|
||||
|
||||
# --- 4. Learning Units ---
|
||||
from learning_units_api import router as learning_units_router
|
||||
from units.learning_api import router as learning_units_router
|
||||
app.include_router(learning_units_router, prefix="/api")
|
||||
|
||||
# --- 4b. Learning Progress ---
|
||||
from progress_api import router as progress_router
|
||||
from api.progress import router as progress_router
|
||||
app.include_router(progress_router, prefix="/api")
|
||||
|
||||
# --- 4c. Vocabulary Catalog ---
|
||||
from vocabulary_api import router as vocabulary_router
|
||||
from vocabulary.api import router as vocabulary_router
|
||||
app.include_router(vocabulary_router, prefix="/api")
|
||||
|
||||
# --- 4d. User Language Preferences ---
|
||||
from user_language_api import router as user_language_router
|
||||
from api.user_language import router as user_language_router
|
||||
app.include_router(user_language_router, prefix="/api")
|
||||
|
||||
from unit_api import router as unit_router
|
||||
from units.api import router as unit_router
|
||||
app.include_router(unit_router) # Already has /api/units prefix
|
||||
|
||||
from unit_analytics_api import router as unit_analytics_router
|
||||
from units.analytics_api import router as unit_analytics_router
|
||||
app.include_router(unit_analytics_router) # Already has /api/analytics prefix
|
||||
|
||||
|
||||
from recording_api import router as recording_api_router
|
||||
from recording.api import router as recording_api_router
|
||||
app.include_router(recording_api_router) # Already has /api/recordings prefix
|
||||
|
||||
|
||||
# --- 6. Messenger ---
|
||||
from messenger_api import router as messenger_router
|
||||
from messenger.api import router as messenger_router
|
||||
app.include_router(messenger_router) # Already has /api/messenger prefix
|
||||
|
||||
# --- 7. Klausur & School Proxies ---
|
||||
from klausur_service_proxy import router as klausur_service_router
|
||||
from api.klausur_proxy import router as klausur_service_router
|
||||
app.include_router(klausur_service_router, prefix="/api")
|
||||
|
||||
from school_api import router as school_api_router
|
||||
from api.school import router as school_api_router
|
||||
app.include_router(school_api_router, prefix="/api")
|
||||
|
||||
# --- 8. Teacher Dashboard & Abitur Docs ---
|
||||
from abitur_docs_api import router as abitur_docs_router
|
||||
from abitur.api import router as abitur_docs_router
|
||||
app.include_router(abitur_docs_router, prefix="/api")
|
||||
|
||||
from teacher_dashboard_api import router as teacher_dashboard_router
|
||||
from dashboard.api import router as teacher_dashboard_router
|
||||
app.include_router(teacher_dashboard_router) # Already has /api/teacher prefix
|
||||
|
||||
# --- 9. Certificates & Letters ---
|
||||
from certificates_api import router as certificates_router
|
||||
from letters.certificates_api import router as certificates_router
|
||||
app.include_router(certificates_router, prefix="/api")
|
||||
|
||||
from letters_api import router as letters_router
|
||||
from letters.api import router as letters_router
|
||||
app.include_router(letters_router, prefix="/api")
|
||||
|
||||
# --- 10. Game System ---
|
||||
from game_api import router as game_router
|
||||
from game.api import router as game_router
|
||||
app.include_router(game_router) # Already has /api/game prefix
|
||||
|
||||
# --- 11. AI Processor (OCR + Content generation) ---
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to messenger/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("messenger.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to messenger/contacts.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("messenger.contacts")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to messenger/conversations.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("messenger.conversations")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to messenger/helpers.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("messenger.helpers")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to messenger/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("messenger.models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to api/progress.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("api.progress")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to recording/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("recording.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to recording/helpers.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("recording.helpers")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to recording/minutes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("recording.minutes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to recording/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("recording.models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to recording/routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("recording.routes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to recording/transcription.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("recording.transcription")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to api/school.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("api.school")
|
||||
@@ -5,14 +5,14 @@ This file provides backward compatibility for code that imports from ai_processo
|
||||
All functionality has been moved to the ai_processor/ module.
|
||||
|
||||
Usage (new):
|
||||
from ai_processor import analyze_scan_structure_with_ai
|
||||
from services.ai_processor import analyze_scan_structure_with_ai
|
||||
|
||||
Usage (legacy, still works):
|
||||
from ai_processor import analyze_scan_structure_with_ai
|
||||
from services.ai_processor import analyze_scan_structure_with_ai
|
||||
"""
|
||||
|
||||
# Re-export everything from the new modular structure
|
||||
from ai_processor import (
|
||||
from services.ai_processor import (
|
||||
# Configuration
|
||||
BASE_DIR,
|
||||
EINGANG_DIR,
|
||||
@@ -46,7 +46,7 @@ from ai_processor import (
|
||||
)
|
||||
|
||||
# Legacy function alias
|
||||
from ai_processor import get_openai_api_key as _get_api_key
|
||||
from services.ai_processor import get_openai_api_key as _get_api_key
|
||||
|
||||
__all__ = [
|
||||
# Configuration
|
||||
|
||||
@@ -113,7 +113,7 @@ async def translate_and_store(
|
||||
|
||||
Returns count of newly translated words.
|
||||
"""
|
||||
from vocabulary_db import get_pool
|
||||
from vocabulary.db import get_pool
|
||||
|
||||
pool = await get_pool()
|
||||
async with pool.acquire() as conn:
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to classroom/state_engine_api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("classroom.state_engine_api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to classroom/state_engine_models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("classroom.state_engine_models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to services/story_generator.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("services.story_generator")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to dashboard/analytics.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("dashboard.analytics")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to dashboard/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("dashboard.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to dashboard/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("dashboard.models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to services/translation.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("services.translation")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/analytics_api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.analytics_api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/analytics_export.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.analytics_export")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/analytics_helpers.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.analytics_helpers")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/analytics_models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.analytics_models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/analytics_routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.analytics_routes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/content_routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.content_routes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/definition_routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.definition_routes")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/helpers.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.helpers")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to units/routes.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("units.routes")
|
||||
@@ -8,7 +8,7 @@
|
||||
# - unit_content_routes.py (H5P, worksheet, PDF routes)
|
||||
#
|
||||
# The `router` object is assembled here by including all sub-routers.
|
||||
# Importers that did `from unit_api import router` continue to work.
|
||||
# Importers that did `from units.api import router` continue to work.
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to api/user_language.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("api.user_language")
|
||||
@@ -121,7 +121,7 @@ async def api_get_word_audio(word_id: str, lang: str = "en"):
|
||||
if not text:
|
||||
raise HTTPException(status_code=400, detail=f"Kein Text fuer Sprache '{lang}'")
|
||||
|
||||
from audio_service import get_or_generate_audio
|
||||
from services.audio import get_or_generate_audio
|
||||
audio_bytes = await get_or_generate_audio(text, language=lang, word_id=word_id)
|
||||
|
||||
if not audio_bytes:
|
||||
@@ -151,7 +151,7 @@ async def api_get_syllable_audio(word_id: str, lang: str = "en"):
|
||||
# Join syllables with pauses (Piper handles "..." as pause)
|
||||
slow_text = " ... ".join(syllables)
|
||||
|
||||
from audio_service import get_or_generate_audio
|
||||
from services.audio import get_or_generate_audio
|
||||
cache_key = f"{word_id}_syl_{lang}"
|
||||
audio_bytes = await get_or_generate_audio(slow_text, language=lang, word_id=cache_key)
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to vocabulary/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("vocabulary.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to vocabulary/db.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("vocabulary.db")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to worksheets/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("worksheets.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to worksheets/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("worksheets.models")
|
||||
@@ -17,7 +17,7 @@ from nibis_ingestion import (
|
||||
DOCS_BASE_PATH,
|
||||
)
|
||||
from qdrant_service import QdrantService, search_nibis_eh, get_qdrant_client
|
||||
from eh_pipeline import generate_single_embedding
|
||||
from korrektur.eh_pipeline import generate_single_embedding
|
||||
|
||||
router = APIRouter(prefix="/api/v1/admin", tags=["Admin"])
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from pydantic import BaseModel
|
||||
from typing import Optional, List, Dict
|
||||
from datetime import datetime
|
||||
|
||||
from eh_pipeline import generate_single_embedding
|
||||
from korrektur.eh_pipeline import generate_single_embedding
|
||||
|
||||
# Import legal templates modules
|
||||
try:
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to admin/api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("admin.api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to admin/nibis.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("admin.nibis")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to admin/rag.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("admin.rag")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to admin/templates.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("admin.templates")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to compliance/extraction.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("compliance.extraction")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to compliance/models.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("compliance.models")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to compliance/pipeline.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("compliance.pipeline")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr/pipeline/crop_api.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.pipeline.crop_api")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/detect\/box_detect.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.detect.box_detect")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/detect\/box_layout.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.detect.box_layout")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/cell_grid\/cell_grid.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.cell_grid.cell_grid")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/cell_grid\/build.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.cell_grid.build")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/cell_grid\/helpers.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.cell_grid.helpers")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/cell_grid\/legacy.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.cell_grid.legacy")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/cell_grid\/merge.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.cell_grid.merge")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/cell_grid\/streaming.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.cell_grid.streaming")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/cell_grid\/vocab.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.cell_grid.vocab")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/detect\/color_detect.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.detect.color_detect")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/detect\/doclayout_detect.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.detect.doclayout_detect")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/detect\/graphic_detect.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.detect.graphic_detect")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/gutter\/repair.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.gutter.repair")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/gutter\/core.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.gutter.core")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/gutter\/grid.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.gutter.grid")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/ipa_german.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.ipa_german")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/layout\/layout.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.layout.layout")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/layout\/analyze.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.layout.analyze")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/layout\/classify.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.layout.classify")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/layout\/classify_position.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.layout.classify_position")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/layout\/column_refine.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.layout.column_refine")
|
||||
@@ -1,4 +0,0 @@
|
||||
# Backward-compat shim -- module moved to ocr\/layout\/columns.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.layout.columns")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user