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

Clinical-Genomics / arnold / 8249361983

12 Mar 2024 01:07PM UTC coverage: 0.0%. Remained the same
8249361983

push

github

web-flow
fix(reponse model in create request) (#58) (patch)

Fix response models for creating cases.

0 of 10 new or added lines in 4 files covered. (0.0%)

3 existing lines in 1 file now uncovered.

0 of 1182 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 arnold.api.api_v1.endpoints import case
×
11
from fastapi.middleware.cors import CORSMiddleware
×
12

13

14
app = FastAPI()
×
15

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

24

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

31

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

36

37
app.include_router(sample.router, prefix="/api/v1", tags=["sample"])
×
38
app.include_router(step.router, prefix="/api/v1", tags=["prep"])
×
39
app.include_router(trends.router, prefix="/api/v1", tags=["trends"])
×
40
app.include_router(flow_cell.router, prefix="/api/v1", tags=["flow_cell"])
×
41
app.include_router(plots.router, prefix="/api/v1", tags=["plots"])
×
42
app.include_router(case.router, prefix="/api/v1", tags=["case"])
×
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