ci / api (push) Failing after 10s
ci / terraform (push) Failing after 11s
ci / web (push) Failing after 35s
ci / pipeline (push) Failing after 2m29s
ci / images (api) (push) Skipped
ci / images (ml) (push) Skipped
ci / images (pipeline) (push) Skipped
ci / images (web) (push) Skipped
End-to-end variant interpretation platform for rare genetic disease research: SvelteKit UI, FastAPI + PostgreSQL API, Nextflow/Ensembl VEP pipeline, LightGBM pathogenicity scoring with MLflow, K8s/ArgoCD/GCP infrastructure. Public test data only; no clinical claims.
33 lines
868 B
Python
33 lines
868 B
Python
import asyncio
|
|
from logging.config import fileConfig
|
|
|
|
from alembic import context
|
|
from sqlalchemy.ext.asyncio import async_engine_from_config
|
|
from sqlalchemy import pool
|
|
|
|
from app.config import settings
|
|
from app.models import Base
|
|
|
|
config = context.config
|
|
config.set_main_option("sqlalchemy.url", settings.database_url)
|
|
if config.config_file_name:
|
|
fileConfig(config.config_file_name)
|
|
target_metadata = Base.metadata
|
|
|
|
|
|
def run_migrations(connection):
|
|
context.configure(connection=connection, target_metadata=target_metadata)
|
|
with context.begin_transaction():
|
|
context.run_migrations()
|
|
|
|
|
|
async def run_async():
|
|
engine = async_engine_from_config(
|
|
config.get_section(config.config_ini_section, {}), poolclass=pool.NullPool
|
|
)
|
|
async with engine.connect() as conn:
|
|
await conn.run_sync(run_migrations)
|
|
|
|
|
|
asyncio.run(run_async())
|