Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Henrik Stranneheim <[email protected]>
  • Loading branch information
ChrOertlin and henrikstranneheim authored Mar 20, 2024
1 parent 700ed61 commit 5ac2636
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion genotype_api/api/endpoints/analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def upload_sequence_analysis(
session: Session = Depends(get_session),
current_user: User = Depends(get_active_user),
):
"""Reading vcf file, creating and uploading sequence analyses and sample objects to db."""
"""Reading VCF file, creating and uploading sequence analyses and sample objects to the database."""
analysis_service = AnalysisService(session)
analyses: list[AnalysisResponse] = analysis_service.get_upload_sequence_analyses(file)
return analyses
2 changes: 1 addition & 1 deletion genotype_api/dto/analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Module that holds the analysis dtos."""
"""Module that holds the analysis DTOs."""

from datetime import datetime

Expand Down
2 changes: 1 addition & 1 deletion genotype_api/dto/genotype.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Module to hold the genotype dtos."""
"""Module to hold the genotype DTOs."""

from pydantic import BaseModel, Field

Expand Down
5 changes: 2 additions & 3 deletions genotype_api/services/analysis_service/analysis_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


class AnalysisService:
"""This service acts as a translational layer between the crud and the api."""
"""This service acts as a translational layer between the CRUD and the API."""

def __init__(self, session: Session):
self.session: Session = session
Expand All @@ -46,8 +46,7 @@ def get_analyses_to_display(self, skip: int, limit: int) -> list[AnalysisRespons

def get_upload_sequence_analyses(self, file: UploadFile) -> list[AnalysisResponse]:
"""
Reading vcf file, creating and uploading sequence analyses and sample objects to db.
NOTE: requires further refactoring - leaving it for now.
Reading VCF file, creating and uploading sequence analyses and sample objects to the database.
"""
file_name: Path = check_file(file_path=file.filename, extension=".vcf")
content = file.file.read().decode("utf-8")
Expand Down

0 comments on commit 5ac2636

Please sign in to comment.