feat: add versioned research templates and alpha variants
This commit is contained in:
@@ -11,6 +11,7 @@ from typing import Annotated
|
||||
from fastapi import APIRouter, Depends, FastAPI, HTTPException, Query, Request, Response
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
from fastapi.responses import JSONResponse, StreamingResponse
|
||||
from pydantic import ValidationError
|
||||
from sqlalchemy import delete, select, text
|
||||
|
||||
from .ai.routes import router as ai_router
|
||||
@@ -18,11 +19,13 @@ from .ai.runtime import AIRuntime
|
||||
from .alphas import list_statement, sorted_statement
|
||||
from .backtests.routes import router as backtest_router
|
||||
from .business import Business, notify_job
|
||||
from .catalog.research_routes import router as research_catalog_router
|
||||
from .catalog.routes import router as catalog_router
|
||||
from .config import Settings
|
||||
from .db import create_database
|
||||
from .jobs import AUTH_KINDS, Runner, create_job
|
||||
from .models import Account, Admin, BacktestConfig, Job, JobItem, LoginSession
|
||||
from .research.routes import router as research_router
|
||||
from .schemas import (
|
||||
AccountOutput,
|
||||
AlphaDetail,
|
||||
@@ -117,6 +120,7 @@ def create_app(settings=None, wq_client=None, ai_model_factory=None):
|
||||
login_failures = defaultdict(list)
|
||||
|
||||
@app.exception_handler(RequestValidationError)
|
||||
@app.exception_handler(ValidationError)
|
||||
async def validation_error(request, exc):
|
||||
# Pydantic's default error includes the submitted value, possibly a password.
|
||||
return JSONResponse(
|
||||
@@ -400,5 +404,7 @@ def create_app(settings=None, wq_client=None, ai_model_factory=None):
|
||||
app.include_router(backtest_router)
|
||||
app.include_router(api)
|
||||
app.include_router(catalog_router)
|
||||
app.include_router(research_catalog_router)
|
||||
app.include_router(research_router)
|
||||
app.include_router(ai_router(ai_runtime))
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user