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

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:
Benjamin Admin
2026-04-26 00:11:33 +02:00
parent d093a4d388
commit 5f2ed44654
288 changed files with 214 additions and 1182 deletions

View File

@@ -56,7 +56,7 @@ class TestIngestionStatus:
def test_status_not_running(self):
"""Test status when no ingestion is running."""
from admin_api import _ingestion_status
from admin.api import _ingestion_status
# Reset status
_ingestion_status["running"] = False
@@ -67,7 +67,7 @@ class TestIngestionStatus:
def test_status_running(self):
"""Test status when ingestion is running."""
from admin_api import _ingestion_status
from admin.api import _ingestion_status
_ingestion_status["running"] = True
_ingestion_status["last_run"] = datetime.now().isoformat()
@@ -81,7 +81,7 @@ class TestUploadAPI:
def test_upload_record_creation(self):
"""Test that upload records are created correctly."""
from admin_api import _upload_history
from admin.api import _upload_history
# Clear history
_upload_history.clear()
@@ -102,7 +102,7 @@ class TestUploadAPI:
def test_upload_history_limit(self):
"""Test that upload history is limited to 100 entries."""
from admin_api import _upload_history
from admin.api import _upload_history
_upload_history.clear()
@@ -187,7 +187,7 @@ class TestMetricsDB:
@pytest.mark.asyncio
async def test_store_feedback_no_pool(self):
"""Test feedback storage when DB is not available."""
from metrics_db import store_feedback
from metrics.db import store_feedback
with patch('metrics_db.get_pool', new_callable=AsyncMock, return_value=None):
result = await store_feedback(
@@ -199,7 +199,7 @@ class TestMetricsDB:
@pytest.mark.asyncio
async def test_calculate_metrics_no_pool(self):
"""Test metrics calculation when DB is not available."""
from metrics_db import calculate_metrics
from metrics.db import calculate_metrics
with patch('metrics_db.get_pool', new_callable=AsyncMock, return_value=None):
metrics = await calculate_metrics()
@@ -214,7 +214,7 @@ class TestMetricsDB:
]
# Read the metrics_db module to check table names
from metrics_db import init_metrics_tables
from metrics.db import init_metrics_tables
# The function should create these tables
assert callable(init_metrics_tables)
@@ -231,8 +231,8 @@ class TestRAGIntegration:
@pytest.mark.asyncio
async def test_nibis_search(self):
"""Test NiBiS semantic search."""
from admin_api import search_nibis
from admin_api import NiBiSSearchRequest
from admin.api import search_nibis
from admin.api import NiBiSSearchRequest
request = NiBiSSearchRequest(
query="Gedichtanalyse Expressionismus",
@@ -265,7 +265,7 @@ class TestRAGIntegration:
@pytest.mark.asyncio
async def test_metrics_storage(self):
"""Test metrics storage in PostgreSQL."""
from metrics_db import store_feedback, calculate_metrics
from metrics.db import store_feedback, calculate_metrics
# This would require PostgreSQL running
# stored = await store_feedback(
@@ -330,7 +330,7 @@ class TestEmbeddings:
def test_vector_dimensions(self):
"""Test that vector dimensions are configured correctly."""
from eh_pipeline import get_vector_size, EMBEDDING_BACKEND
from korrektur.eh_pipeline import get_vector_size, EMBEDDING_BACKEND
size = get_vector_size()
@@ -341,7 +341,7 @@ class TestEmbeddings:
def test_chunking_config(self):
"""Test chunking configuration."""
from eh_pipeline import CHUNK_SIZE, CHUNK_OVERLAP
from korrektur.eh_pipeline import CHUNK_SIZE, CHUNK_OVERLAP
assert CHUNK_SIZE > 0
assert CHUNK_OVERLAP >= 0