-
Notifications
You must be signed in to change notification settings - Fork 52
Automated tests for run_nifti_insertion.py #1257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cmadjar
merged 51 commits into
aces:main
from
cmadjar:run_nifti_insertion_integration_test
Apr 11, 2025
Merged
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
0d1a4c3
add a few initial tests for run_nifti_insertion.py
cmadjar 68a02db
fix tests + typo in error message of run_nifti_insertion.py
cmadjar 20d0cd6
fix linting
cmadjar e37e807
fix test
cmadjar 7190a79
add new files to RB for tests of run_nifti_insertion.py
cmadjar ed76455
fix tests with new files
cmadjar 5c8a39b
fix tests with new files
cmadjar f1e4533
fix tests with new files
cmadjar d6ae35b
fix tests with new files
cmadjar 37615dd
fix tests with new files
cmadjar afe6475
fix tests with new files
cmadjar 19400ed
fix tests with new files
cmadjar 3f893b7
ruff fix
cmadjar 6e06f07
add ORM for mri_protocol_violated_scans
cmadjar 2deecd0
add ORM for mri_protocol_violated_scans
cmadjar 6159c39
add ORM for mri_protocol_violated_scans
cmadjar 49526b2
fix ORM
cmadjar 7133bdd
add query for mri_protocol_violated_scans
cmadjar 54c0a16
query mri_protocol_violated_scans
cmadjar f27bb50
fix path to NIfTI file with unknown protocol
cmadjar 9474a7c
fix ruff + assert violated scans
cmadjar edb038b
fix querying the right dude
cmadjar 248a2d7
fix assert
cmadjar 9e10e91
set sessionID in session table for uploadID 128
cmadjar 03837fa
add check that the file is in the file system
cmadjar cd3e04b
add test for violations_log
cmadjar f0067f6
fix typo
cmadjar e720956
fix missing FK
cmadjar cd1f229
fix missing FK
cmadjar b091497
add bids rel files to support DWI 25 for testing
cmadjar 5905b5b
fix missing FK
cmadjar 4750243
fix cand_id error in insertion into mri_violations_log
cmadjar cbd93f9
fix unit test
cmadjar ad05a67
fix integration test
cmadjar af2bac9
add query to parameter_type and parameter_file to check that files go…
cmadjar a998b4f
add query to parameter_type and parameter_file to check that files go…
cmadjar 119b18f
add query to parameter_type and parameter_file to check that files go…
cmadjar 7d11103
add query to parameter_type and parameter_file to check that files go…
cmadjar 03717bf
add query to parameter_type and parameter_file to check that files go…
cmadjar b2d6e1d
add query to parameter_type and parameter_file to check that files go…
cmadjar 3f9de81
add query to parameter_type and parameter_file to check that files go…
cmadjar e33bd02
add query to parameter_type and parameter_file to check that files go…
cmadjar cbc9529
add query to parameter_type and parameter_file to check that files go…
cmadjar 1980f40
add query to parameter_type and parameter_file to check that files go…
cmadjar 62d70b9
add query to parameter_type and parameter_file to check that files go…
cmadjar 11d7bcc
add bval and bvec path to command call
cmadjar e151c9e
Maxime's feedback
cmadjar 97c4ea1
fix tests
cmadjar 53497cc
fix tests
cmadjar 4309003
remove string to see if that fails tests
cmadjar 0fa9aa1
put back str()
cmadjar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from decimal import Decimal | ||
|
||
from sqlalchemy import ForeignKey | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.mri_protocol_check_group as db_mri_protocol_check_group | ||
import lib.db.models.mri_scan_type as db_mri_scan_type | ||
from lib.db.base import Base | ||
|
||
|
||
class DbMriProtocolCheck(Base): | ||
__tablename__ = 'mri_protocol_checks' | ||
|
||
id : Mapped[int] = mapped_column('ID', primary_key=True) | ||
scan_type_id : Mapped[int | None] \ | ||
= mapped_column('MriScanTypeID', ForeignKey('mri_scan_type.MriScanTypeID')) | ||
severity : Mapped[str | None] = mapped_column('Severity') | ||
header : Mapped[str | None] = mapped_column('Header') | ||
valid_min : Mapped[Decimal | None] = mapped_column('ValidMin') | ||
valid_max : Mapped[Decimal | None] = mapped_column('ValidMax') | ||
valid_regex : Mapped[str | None] = mapped_column('ValidRegex') | ||
protocol_check_group_id : Mapped[int] \ | ||
= mapped_column('MriProtocolChecksGroupID', ForeignKey('mri_protocol_checks_group.MriProtocolChecksGroupID')) | ||
|
||
scan_type : Mapped['db_mri_scan_type.DbMriScanType'] \ | ||
= relationship('DbMriScanType', back_populates='protocol_checks') | ||
protocol_check_group: Mapped['db_mri_protocol_check_group.DbMriProtocolCheckGroup'] \ | ||
= relationship('DbMriProtocolCheckGroup', back_populates='protocol_check') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.mri_protocol_check as db_mri_protocol_check | ||
import lib.db.models.mri_violation_log as db_mri_violation_log | ||
from lib.db.base import Base | ||
|
||
|
||
class DbMriProtocolCheckGroup(Base): | ||
__tablename__ = 'mri_protocol_checks_group' | ||
|
||
id : Mapped[int] = mapped_column('MriProtocolChecksGroupID', primary_key=True) | ||
name: Mapped[str] = mapped_column('Name') | ||
|
||
protocol_check: Mapped['db_mri_protocol_check.DbMriProtocolCheck'] \ | ||
= relationship('DbMriProtocolCheck', back_populates='protocol_check_group') | ||
violations_log: Mapped['db_mri_violation_log.DbMriViolationLog'] \ | ||
= relationship('DbMriViolationLog', back_populates='protocol_check_group') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.mri_protocol_violated_scan as db_mri_protocol_violated_scan | ||
from lib.db.base import Base | ||
|
||
|
||
class DbMriProtocolGroup(Base): | ||
__tablename__ = 'mri_protocol_group' | ||
|
||
id : Mapped[int] = mapped_column('MriProtocolGroupID', primary_key=True) | ||
name : Mapped[str] = mapped_column('Name') | ||
|
||
violated_scans: Mapped['db_mri_protocol_violated_scan.DbMriProtocolViolatedScan'] \ | ||
= relationship('DbMriProtocolViolatedScan', back_populates='protocol_group') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from datetime import datetime | ||
from typing import Optional | ||
|
||
from sqlalchemy import ForeignKey | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.candidate as db_candidate | ||
import lib.db.models.dicom_archive as db_dicom_archive | ||
import lib.db.models.mri_protocol_group as db_mri_protocol_group | ||
from lib.db.base import Base | ||
|
||
|
||
class DbMriProtocolViolatedScan(Base): | ||
__tablename__ = 'mri_protocol_violated_scans' | ||
|
||
id : Mapped[int] = mapped_column('ID', primary_key=True) | ||
candidate_id : Mapped[int | None] = mapped_column('CandidateID', ForeignKey('candidate.ID')) | ||
pscid : Mapped[str | None] = mapped_column('PSCID') | ||
dicom_archive_id : Mapped[int | None] = mapped_column('TarchiveID', ForeignKey('tarchive.TarchiveID')) | ||
time_run : Mapped[datetime | None] = mapped_column('time_run') | ||
series_description : Mapped[str | None] = mapped_column('series_description') | ||
minc_location : Mapped[str | None] = mapped_column('minc_location') | ||
patient_name : Mapped[str | None] = mapped_column('PatientName') | ||
tr_range : Mapped[str | None] = mapped_column('TR_range') | ||
te_range : Mapped[str | None] = mapped_column('TE_range') | ||
ti_range : Mapped[str | None] = mapped_column('TI_range') | ||
slice_thickness_range : Mapped[str | None] = mapped_column('slice_thickness_range') | ||
xspace_range : Mapped[str | None] = mapped_column('xspace_range') | ||
yspace_range : Mapped[str | None] = mapped_column('yspace_range') | ||
zspace_range : Mapped[str | None] = mapped_column('zspace_range') | ||
xstep_range : Mapped[str | None] = mapped_column('xstep_range') | ||
ystep_range : Mapped[str | None] = mapped_column('ystep_range') | ||
zstep_range : Mapped[str | None] = mapped_column('zstep_range') | ||
time_range : Mapped[str | None] = mapped_column('time_range') | ||
series_uid : Mapped[str | None] = mapped_column('SeriesUID') | ||
image_type : Mapped[str | None] = mapped_column('image_type') | ||
phase_encoding_direction : Mapped[str | None] = mapped_column('PhaseEncodingDirection') | ||
echo_number : Mapped[str | None] = mapped_column('EchoNumber') | ||
protocol_group_id : Mapped[int | None] \ | ||
= mapped_column('MriProtocolGroupID', ForeignKey('mri_protocol_group.MriProtocolGroupID')) | ||
|
||
candidate : Mapped[Optional['db_candidate.DbCandidate']] \ | ||
= relationship('DbCandidate', back_populates='violated_scans') | ||
archive : Mapped[Optional['db_dicom_archive.DbDicomArchive']] \ | ||
= relationship('DbDicomArchive', back_populates='violated_scans') | ||
protocol_group: Mapped['db_mri_protocol_group.DbMriProtocolGroup']\ | ||
= relationship('DbMriProtocolGroup', back_populates='violated_scans') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.mri_protocol_check as db_mri_protocol_check | ||
import lib.db.models.mri_violation_log as db_mri_violation_log | ||
from lib.db.base import Base | ||
|
||
|
||
class DbMriScanType(Base): | ||
__tablename__ = 'mri_scan_type' | ||
|
||
id : Mapped[int] = mapped_column('MriScanTypeID', primary_key=True) | ||
name : Mapped[str] = mapped_column('MriScanTypeName') | ||
|
||
protocol_checks : Mapped[list['db_mri_protocol_check.DbMriProtocolCheck']] \ | ||
= relationship('DbMriProtocolCheck', back_populates='scan_type') | ||
violations_log : Mapped[list['db_mri_violation_log.DbMriViolationLog']] \ | ||
= relationship('DbMriViolationLog', back_populates='scan_type') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from datetime import datetime | ||
from typing import Optional | ||
|
||
from sqlalchemy import ForeignKey | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.candidate as db_candidate | ||
import lib.db.models.dicom_archive as db_dicom_archive | ||
import lib.db.models.mri_protocol_check_group as db_mri_protocol_check_group | ||
import lib.db.models.mri_scan_type as db_mri_scan_type | ||
from lib.db.base import Base | ||
|
||
|
||
class DbMriViolationLog(Base): | ||
__tablename__ = 'mri_violations_log' | ||
|
||
id : Mapped[int] = mapped_column('LogID', primary_key=True) | ||
time_run : Mapped[datetime] = mapped_column('TimeRun') | ||
series_uid : Mapped[str | None] = mapped_column('SeriesUID') | ||
dicom_archive_id : Mapped[int | None] \ | ||
= mapped_column('TarchiveID', ForeignKey('tarchive.TarchiveID')) | ||
minc_file : Mapped[str | None] = mapped_column('MincFile') | ||
patient_name : Mapped[str | None] = mapped_column('PatientName') | ||
candidate_id : Mapped[int | None] = mapped_column('CandidateID', ForeignKey('candidate.ID')) | ||
visit_label : Mapped[str | None] = mapped_column('Visit_label') | ||
check_id : Mapped[int | None] = mapped_column('CheckID') | ||
scan_type_id : Mapped[int | None] \ | ||
= mapped_column('MriScanTypeID', ForeignKey('mri_scan_type.MriScanTypeID')) | ||
severity : Mapped[str | None] = mapped_column('Severity') | ||
header : Mapped[str | None] = mapped_column('Header') | ||
value : Mapped[str | None] = mapped_column('Value') | ||
valid_range : Mapped[str | None] = mapped_column('ValidRange') | ||
valid_regex : Mapped[str | None] = mapped_column('ValidRegex') | ||
echo_time : Mapped[float | None] = mapped_column('EchoTime') | ||
phase_encoding_direction: Mapped[str | None] = mapped_column('PhaseEncodingDirection') | ||
echo_number : Mapped[str | None] = mapped_column('EchoNumber') | ||
protocol_check_group_id : Mapped[int | None] \ | ||
= mapped_column('MriProtocolChecksGroupID', ForeignKey('mri_protocol_checks_group.MriProtocolChecksGroupID')) | ||
|
||
archive : Mapped[Optional['db_dicom_archive.DbDicomArchive']] \ | ||
= relationship('DbDicomArchive', back_populates='violations_log') | ||
candidate : Mapped[Optional['db_candidate.DbCandidate']] \ | ||
= relationship('DbCandidate', back_populates='violations_log') | ||
scan_type : Mapped[Optional['db_mri_scan_type.DbMriScanType']] \ | ||
= relationship('DbMriScanType', back_populates='violations_log') | ||
protocol_check_group: Mapped[Optional['db_mri_protocol_check_group.DbMriProtocolCheckGroup']] \ | ||
= relationship('DbMriProtocolCheckGroup', back_populates='violations_log') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
from sqlalchemy.orm import Mapped, mapped_column | ||
from sqlalchemy import ForeignKey | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.file as db_file | ||
import lib.db.models.parameter_type as db_parameter_type | ||
from lib.db.base import Base | ||
|
||
|
||
class DbParameterFile(Base): | ||
__tablename__ = 'parameter_file' | ||
|
||
id : Mapped[int] = mapped_column('ParameterFileID', primary_key=True) | ||
file_id : Mapped[int] = mapped_column('FileID') | ||
parameter_type_id : Mapped[int] = mapped_column('ParameterTypeID') | ||
value : Mapped[str | None] = mapped_column('Value') | ||
insert_time : Mapped[int] = mapped_column('InsertTime') | ||
id : Mapped[int] = mapped_column('ParameterFileID', primary_key=True) | ||
file_id : Mapped[int] = mapped_column('FileID', ForeignKey('files.FileID')) | ||
type_id : Mapped[int] = mapped_column('ParameterTypeID', ForeignKey('parameter_type.ParameterTypeID')) | ||
value : Mapped[str | None] = mapped_column('Value') | ||
insert_time : Mapped[int] = mapped_column('InsertTime') | ||
|
||
file: Mapped[list['db_file.DbFile']] = relationship('DbFile', back_populates='parameters') | ||
type: Mapped['db_parameter_type.DbParameterType'] = relationship('DbParameterType', back_populates='parameter_file') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
import lib.db.models.parameter_file as db_parameter_file | ||
from lib.db.base import Base | ||
|
||
|
||
class DbParameterType(Base): | ||
__tablename__ = 'parameter_type' | ||
|
||
id : Mapped[int] = mapped_column('ParameterTypeID', primary_key=True) | ||
name : Mapped[str] = mapped_column('Name') | ||
alias : Mapped[str | None] = mapped_column('Alias') | ||
data_type : Mapped[str | None] = mapped_column('Type') | ||
description : Mapped[str | None] = mapped_column('Description') | ||
range_min : Mapped[float | None] = mapped_column('RangeMin') | ||
range_max : Mapped[float | None] = mapped_column('RangeMax') | ||
source_field : Mapped[str | None] = mapped_column('SourceField') | ||
source_from : Mapped[str | None] = mapped_column('SourceFrom') | ||
source_condition : Mapped[str | None] = mapped_column('SourceCondition') | ||
queryable : Mapped[bool | None] = mapped_column('Queryable') | ||
is_file : Mapped[bool | None] = mapped_column('IsFile') | ||
|
||
parameter_file: Mapped[list['db_parameter_file.DbParameterFile']] \ | ||
= relationship('DbParameterFile', back_populates='type') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from sqlalchemy import select | ||
from sqlalchemy.orm import Session as Database | ||
|
||
from lib.db.models.file import DbFile | ||
from lib.db.models.parameter_file import DbParameterFile | ||
from lib.db.models.parameter_type import DbParameterType | ||
|
||
|
||
def try_get_file_with_unique_combination( | ||
db: Database, | ||
series_uid: str, | ||
echo_time: str | None, | ||
echo_number: str | None, | ||
phase_encoding_direction: str | None | ||
) -> DbFile | None: | ||
""" | ||
Get a file from the database using its SeriesInstanceUID, or return `None` if | ||
no file was found. | ||
""" | ||
|
||
return db.execute(select(DbFile) | ||
.where(DbFile.series_uid == series_uid) | ||
.where(DbFile.echo_time == echo_time) | ||
.where(DbFile.echo_number == echo_number) | ||
.where(DbFile.phase_encoding_direction == phase_encoding_direction) | ||
).scalar_one_or_none() | ||
|
||
|
||
def try_get_parameter_value_with_file_id_parameter_name( | ||
db: Database, | ||
file_id: int, | ||
parameter_name: str | ||
) -> DbParameterFile | None: | ||
""" | ||
Get parameter value from file ID and parameter name, or return `None` if no entry was found | ||
""" | ||
|
||
return db.execute(select(DbParameterFile) | ||
.join(DbParameterFile.type) | ||
.where(DbParameterType.name == parameter_name) | ||
.where(DbParameterFile.file_id == file_id) | ||
).scalar_one_or_none() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from sqlalchemy import select | ||
from sqlalchemy.orm import Session as Database | ||
|
||
from lib.db.models.mri_protocol_violated_scan import DbMriProtocolViolatedScan | ||
|
||
|
||
def try_get_protocol_violated_scans_with_unique_series_combination( | ||
db: Database, | ||
series_uid: str, | ||
echo_time: str | None, | ||
echo_number: str | None, | ||
phase_encoding_direction: str | None | ||
) -> DbMriProtocolViolatedScan | None: | ||
""" | ||
Get the protocol violated scans from the database using its SeriesInstanceUID, or return `None` if | ||
no protocol violated scan was found. | ||
""" | ||
|
||
return db.execute(select(DbMriProtocolViolatedScan) | ||
.where(DbMriProtocolViolatedScan.series_uid == series_uid) | ||
.where(DbMriProtocolViolatedScan.te_range == echo_time) | ||
.where(DbMriProtocolViolatedScan.echo_number == echo_number) | ||
.where(DbMriProtocolViolatedScan.phase_encoding_direction == phase_encoding_direction) | ||
).scalar_one_or_none() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from sqlalchemy import select | ||
from sqlalchemy.orm import Session as Database | ||
|
||
from lib.db.models.mri_violation_log import DbMriViolationLog | ||
|
||
|
||
def try_get_violations_log_with_unique_series_combination( | ||
db: Database, | ||
series_uid: str, | ||
echo_time: str | None, | ||
echo_number: str | None, | ||
phase_encoding_direction: str | None | ||
) -> DbMriViolationLog | None: | ||
""" | ||
Get the violations log from the database using its SeriesInstanceUID, or return `None` if | ||
no violations log was found. | ||
""" | ||
|
||
return db.execute(select(DbMriViolationLog) | ||
.where(DbMriViolationLog.series_uid == series_uid) | ||
.where(DbMriViolationLog.echo_time == echo_time) | ||
.where(DbMriViolationLog.echo_number == echo_number) | ||
.where(DbMriViolationLog.phase_encoding_direction == phase_encoding_direction) | ||
).scalar_one_or_none() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.