Fix: Update all old-style imports inside packages to new paths
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 1m7s
CI / test-go-edu-search (push) Successful in 46s
CI / test-python-klausur (push) Failing after 2m32s
CI / test-python-agent-core (push) Successful in 33s
CI / test-nodejs-website (push) Successful in 34s
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 1m7s
CI / test-go-edu-search (push) Successful in 46s
CI / test-python-klausur (push) Failing after 2m32s
CI / test-python-agent-core (push) Successful in 33s
CI / test-nodejs-website (push) Successful in 34s
65 files in klausur-service packages + 3 in backend-lehrer packages had stale imports referencing deleted shim modules. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
zeugnis package — certificate crawler, models, storage.
|
||||
|
||||
Backward-compatible re-exports: consumers can still use
|
||||
``from zeugnis_api import ...`` etc. via the shim files in backend/.
|
||||
``from zeugnis.api import ...`` etc. via the shim files in backend/.
|
||||
"""
|
||||
|
||||
@@ -16,7 +16,7 @@ from .models import (
|
||||
from .crawler import (
|
||||
start_crawler, stop_crawler, get_crawler_status,
|
||||
)
|
||||
from metrics_db import (
|
||||
from metrics.db import (
|
||||
get_zeugnis_documents, get_zeugnis_stats,
|
||||
log_zeugnis_event, get_pool,
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ from .models import (
|
||||
BUNDESLAENDER,
|
||||
generate_id, get_training_allowed, get_bundesland_name, get_license_for_bundesland,
|
||||
)
|
||||
from metrics_db import (
|
||||
from metrics.db import (
|
||||
get_zeugnis_sources, upsert_zeugnis_source, get_pool,
|
||||
)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ async def start_crawler(bundesland: Optional[str] = None, source_id: Optional[st
|
||||
|
||||
async def run_crawler():
|
||||
try:
|
||||
from metrics_db import get_pool
|
||||
from metrics.db import get_pool
|
||||
pool = await get_pool()
|
||||
|
||||
if pool:
|
||||
|
||||
@@ -322,8 +322,8 @@ SEED_DATA: Dict[str, Dict[str, Any]] = {
|
||||
|
||||
async def populate_seed_data():
|
||||
"""Populate database with seed data."""
|
||||
from metrics_db import get_pool, upsert_zeugnis_source
|
||||
from zeugnis_models import generate_id
|
||||
from metrics.db import get_pool, upsert_zeugnis_source
|
||||
from zeugnis.models import generate_id
|
||||
|
||||
pool = await get_pool()
|
||||
if not pool:
|
||||
@@ -412,4 +412,4 @@ if __name__ == "__main__":
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("To populate database, run:")
|
||||
print(" python -c 'import asyncio; from zeugnis_seed_data import populate_seed_data; asyncio.run(populate_seed_data())'")
|
||||
print(" python -c 'import asyncio; from zeugnis.seed_data import populate_seed_data; asyncio.run(populate_seed_data())'")
|
||||
|
||||
@@ -83,7 +83,7 @@ class ZeugnisCrawler:
|
||||
|
||||
# Initialize database connection
|
||||
try:
|
||||
from metrics_db import get_pool
|
||||
from metrics.db import get_pool
|
||||
self.db_pool = await get_pool()
|
||||
except Exception as e:
|
||||
print(f"Failed to get database pool: {e}")
|
||||
|
||||
Reference in New Issue
Block a user