Skip to content
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

Fix broken template FCSVs #179

Merged
merged 4 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vtkMRMLMarkupsFiducialNode_16,-16.143,4.4655,25.685,0,0,0,1,1,1,0,16,L LV at AC,
vtkMRMLMarkupsFiducialNode_17,19.58,-23.463,28.507,0,0,0,1,1,1,0,17,R LV at PC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_18,-19.666,-23.452,27.885,0,0,0,1,1,1,0,18,L LV at PC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_19,0.025,33.2105,3.1305,0,0,0,1,1,1,0,19,genu of CC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_20,0.563,-39.4115,7.6585,0,0,0,1,1,1,0,20,splenium,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_20,0.563,-39.4115,7.6585,0,0,0,1,1,1,0,20,splenium of CC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_21,34.341,-4.7005,-26.1515,0,0,0,1,1,1,0,21,R AL temporal horn,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_22,-33.368,-5.6025,-22.4175,0,0,0,1,1,1,0,22,L AL temporal horn,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_23,17.6445,-10.098,-18.0085,0,0,0,1,1,1,0,23,R superior AM temporal horn,vtkMRMLScalarVolumeNode1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vtkMRMLMarkupsFiducialNode_16,-15.43225,6.228585,24.9267,0,0,0,1,1,1,0,16,L LV a
vtkMRMLMarkupsFiducialNode_17,18.54945,-22.73095,28.598,0,0,0,1,1,1,0,17,R LV at PC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_18,-18.6767,-22.7815,28.42485,0,0,0,1,1,1,0,18,L LV at PC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_19,0.002431,33.43875,2.52457,0,0,0,1,1,1,0,19,genu of CC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_20,0.132994,-37.6245,6.401015,0,0,0,1,1,1,0,20,splenium,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_20,0.132994,-37.6245,6.401015,0,0,0,1,1,1,0,20,splenium of CC,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_21,34.47875,-4.880005,-26.81425,0,0,0,1,1,1,0,21,R AL temporal horn,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_22,-34.3701,-4.84792,-26.9405,0,0,0,1,1,1,0,22,L AL temporal horn,vtkMRMLScalarVolumeNode1
vtkMRMLMarkupsFiducialNode_23,17.93685,-10.93965,-17.9412,0,0,0,1,1,1,0,23,R superior AM temporal horn,vtkMRMLScalarVolumeNode1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"python-dotenv~=0.17",
"WTForms~=2.2",
],
version="v1.2.2-pre.5"
version="v1.2.2-pre.5",
)
15 changes: 15 additions & 0 deletions test/test_templates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from pathlib import Path
import unittest

from afidsvalidator import model


class TestTemplates(unittest.TestCase):
def test_human_templates(self):
for template_file in Path(
"afidsvalidator/afids-templates/human"
).iterdir():
with self.subTest(template_file=template_file):
with open(template_file, "r", encoding="utf-8") as fcsv:
afids = model.csv_to_afids(fcsv.read())
self.assertTrue(afids.validate())