• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Clinical-Genomics / arnold / 7102454002

05 Dec 2023 02:52PM UTC coverage: 0.0%. Remained the same
7102454002

push

github

web-flow
Update to pydantic v2 (#47) (patch)

Added
Move the models to pydantic v2

add Codeowners for automatic reviewer tagging

0 of 89 new or added lines in 5 files covered. (0.0%)

28 existing lines in 5 files now uncovered.

0 of 699 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/arnold/api/api_v1/api.py
1
from fastapi.responses import JSONResponse
×
2
from fastapi import FastAPI, Request, status
×
3
from pymongo.errors import BulkWriteError
×
4

5
from arnold.api.api_v1.endpoints import sample
×
6
from arnold.api.api_v1.endpoints import step
×
7
from arnold.api.api_v1.endpoints import trends
×
8
from arnold.api.api_v1.endpoints import flow_cell
×
9
from arnold.api.api_v1.endpoints import plots
×
10
from fastapi.middleware.cors import CORSMiddleware
×
11

12

13
app = FastAPI()
×
14

15
app.add_middleware(
×
16
    CORSMiddleware,
17
    allow_origins=["*"],
18
    allow_credentials=True,
19
    allow_methods=["*"],
20
    allow_headers=["*"],
21
)
22

23

24
@app.exception_handler(BulkWriteError)
×
25
async def exception_handler(request: Request, exc: BulkWriteError) -> JSONResponse:
×
26
    return JSONResponse(
×
27
        status_code=status.HTTP_400_BAD_REQUEST, content=exc.details.get("writeErrors")
28
    )
29

30

31
@app.get("/")
×
32
async def root():
×
33
    return {"message": "Welcome to arnold"}
×
34

35

36
app.include_router(sample.router, prefix="/api/v1", tags=["sample"])
×
37
app.include_router(step.router, prefix="/api/v1", tags=["prep"])
×
38
app.include_router(trends.router, prefix="/api/v1", tags=["trends"])
×
39
app.include_router(flow_cell.router, prefix="/api/v1", tags=["flow_cell"])
×
40
app.include_router(plots.router, prefix="/api/v1", tags=["plots"])
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc