Skip to content

Commit

Permalink
BUG: Remove non-exisitng version keyword parameter in script argparser
Browse files Browse the repository at this point in the history
Remove non-existing `version` keyword parameter in script argument
parser object instantiation.

Fixes:
```
Traceback (most recent call last):
  File ".virtualenvs/wma/lib/python3.8/site-packages/pytest_console_scripts/__init__.py", line 319, in exec_script
    exec(compiled, {'__name__': '__main__'})
  File ".virtualenvs/wma/bin/wm_flatten_length_distribution.py", line 4, in <module>
    __import__('pkg_resources').run_script('whitematteranalysis==0.3.0', 'wm_flatten_length_distribution.py')
  File ".virtualenvs/wma/lib/python3.8/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File ".virtualenvs/wma/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1462, in run_script
    exec(code, namespace, namespace)
  File ".virtualenvs/wma/lib/python3.8/site-packages/whitematteranalysis-0.3.0-py3.8.egg/EGG-INFO/scripts/wm_flatten_length_distribution.py", line 26, in <module>
    parser = argparse.ArgumentParser(
TypeError: __init__() got an unexpected keyword argument 'version'
```

and equivalent errors across scripts.
  • Loading branch information
jhlegarreta committed Oct 7, 2023
1 parent 2766202 commit 287f90d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions bin/wm_compare_vtks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def main():
#-----------------
parser = argparse.ArgumentParser(
description="Compare two tractography files to see how much registration has changed the points. The files must have the exact same size and lines and points, e.g. the original file and the file that results from applying a transform to a file.",
epilog="Written by Lauren O\'Donnell, [email protected]. Please reference \"O'Donnell, Lauren J., and C-F. Westin. Automatic tractography segmentation using a high-dimensional white matter atlas. Medical Imaging, IEEE Transactions on 26.11 (2007): 1562-1575.\"",
version='1.0')
epilog="Written by Lauren O\'Donnell, [email protected]. Please reference \"O'Donnell, Lauren J., and C-F. Westin. Automatic tractography segmentation using a high-dimensional white matter atlas. Medical Imaging, IEEE Transactions on 26.11 (2007): 1562-1575.\"")

parser.add_argument(
'inputFile1',
Expand Down
3 changes: 1 addition & 2 deletions utilities/wm_flatten_length_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#-----------------
parser = argparse.ArgumentParser(
description="Samples fibers such that the output distribution of fiber lengths is approximately flat, within the input length range.",
epilog="Written by Lauren O\'Donnell, [email protected]",
version='1.0')
epilog="Written by Lauren O\'Donnell, [email protected]")

parser.add_argument(
'inputDirectory',
Expand Down
3 changes: 1 addition & 2 deletions utilities/wm_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
#-----------------
parser = argparse.ArgumentParser(
description="Compute requested statistics comparing groups in the input groups file. Please verify your input by running wm_quality_control_cluster measurements before running this program.",
epilog="Written by Lauren O\'Donnell, [email protected]. Please reference \"O'Donnell, Lauren J., and C-F. Westin. Automatic tractography segmentation using a high-dimensional white matter atlas. Medical Imaging, IEEE Transactions on 26.11 (2007): 1562-1575.\"",
version='1.0')
epilog="Written by Lauren O\'Donnell, [email protected]. Please reference \"O'Donnell, Lauren J., and C-F. Westin. Automatic tractography segmentation using a high-dimensional white matter atlas. Medical Imaging, IEEE Transactions on 26.11 (2007): 1562-1575.\"")
parser.add_argument(
'inputDirectory',
help='A directory of .csv or txt measurement files from Slicer tractography measurements.')
Expand Down
3 changes: 1 addition & 2 deletions utilities/wm_statistics_export_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#-----------------
parser = argparse.ArgumentParser(
description="Export all subjects selected measures into one excel-readable file for use in statistics programs. Please verify your input by running wm_quality_control_cluster measurements before running this program.",
epilog="Written by Lauren O\'Donnell, [email protected]. Please reference \"O'Donnell, Lauren J., and C-F. Westin. Automatic tractography segmentation using a high-dimensional white matter atlas. Medical Imaging, IEEE Transactions on 26.11 (2007): 1562-1575.\"",
version='1.0')
epilog="Written by Lauren O\'Donnell, [email protected]. Please reference \"O'Donnell, Lauren J., and C-F. Westin. Automatic tractography segmentation using a high-dimensional white matter atlas. Medical Imaging, IEEE Transactions on 26.11 (2007): 1562-1575.\"")

parser.add_argument(
'inputDirectory',
Expand Down
3 changes: 1 addition & 2 deletions utilities/wm_transform_polydata.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
#-----------------
parser = argparse.ArgumentParser(
description="Applies preprocessing to input directory. Downsamples, removes short fibers. Preserves tensors and scalar point data along retained fibers.",
epilog="Written by Lauren O\'Donnell, [email protected]",
version='1.0')
epilog="Written by Lauren O\'Donnell, [email protected]")

parser.add_argument(
'inputDirectory',
Expand Down

0 comments on commit 287f90d

Please sign in to comment.