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>
58 lines
1.7 KiB
Python
58 lines
1.7 KiB
Python
# ==============================================
|
|
# Breakpilot Drive - Unit API (barrel re-export)
|
|
# ==============================================
|
|
# This module was split into:
|
|
# - unit_models.py (Pydantic models)
|
|
# - unit_helpers.py (Auth, DB, token, validation helpers)
|
|
# - unit_routes.py (Definition, session, analytics routes)
|
|
# - unit_content_routes.py (H5P, worksheet, PDF routes)
|
|
#
|
|
# The `router` object is assembled here by including all sub-routers.
|
|
# Importers that did `from units.api import router` continue to work.
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from .routes import router as _routes_router
|
|
from .definition_routes import router as _definition_router
|
|
from .content_routes import router as _content_router
|
|
|
|
# Re-export models for any direct importers
|
|
from .models import ( # noqa: F401
|
|
UnitDefinitionResponse,
|
|
CreateSessionRequest,
|
|
SessionResponse,
|
|
TelemetryEvent,
|
|
TelemetryPayload,
|
|
TelemetryResponse,
|
|
PostcheckAnswer,
|
|
CompleteSessionRequest,
|
|
SessionSummaryResponse,
|
|
UnitListItem,
|
|
RecommendedUnit,
|
|
CreateUnitRequest,
|
|
UpdateUnitRequest,
|
|
ValidationError,
|
|
ValidationResult,
|
|
)
|
|
|
|
# Re-export helpers for any direct importers
|
|
from .helpers import ( # noqa: F401
|
|
get_optional_current_user,
|
|
get_unit_database,
|
|
create_session_token,
|
|
verify_session_token,
|
|
get_session_from_token,
|
|
validate_unit_definition,
|
|
USE_DATABASE,
|
|
REQUIRE_AUTH,
|
|
SECRET_KEY,
|
|
)
|
|
|
|
# Assemble the combined router.
|
|
# _routes_router and _content_router both use prefix="/api/units",
|
|
# so we create a plain router and include them without extra prefix.
|
|
router = APIRouter()
|
|
router.include_router(_routes_router)
|
|
router.include_router(_definition_router)
|
|
router.include_router(_content_router)
|