Clinical-Genomics / genotype-api

Rewrite of genotype package
0 stars 1 forks source link

refactor(analysis endpoint session handling) #105

Closed ChrOertlin closed 8 months ago

ChrOertlin commented 8 months ago

Added

Move database statements out of analysis api

Changed

Fixed

Steps to consider while deploying

Review:

This version is a:

sonarcloud[bot] commented 8 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

ChrOertlin commented 8 months ago

Nice! Next step could be to add a service layer to further decouple the database layer from the api layer.

api layer (parse json to dto) -> service layer -> database layer (database records) -> service layer (convert database records to dto) -> api layer (serialize dto to json).

Could make it simpler to decouple the dtos and database models. This is FastAPI though, seems like some of it is built in already

Yes, SQLModel is made to directly translate database models to DTOs for FastAPI. But we would like to detangle the CRUD and the API and remove SQLmodel. So we will implement the structure you outlined here for genotype as well! That way it is the same as in our other repos, and to me much clearer to work with.

ChrOertlin commented 8 months ago

Application loads

image

ChrOertlin commented 8 months ago

image

ChrOertlin commented 8 months ago

88