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

Rename dwi scripts #823

Merged
merged 7 commits into from
Dec 1, 2023
Next Next commit
Renaming scil_apply_bias_field_on_dwi.py to scil_dwi_apply_bias_field…
….py.
  • Loading branch information
karanphil committed Dec 1, 2023
commit 3850f33002eda4212d5c534f8585acdf6497d75a
20 changes: 20 additions & 0 deletions scripts/legacy/scil_apply_bias_field_on_dwi.py
Original file line number Diff line number Diff line change
@@ -0,0 1,20 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from scilpy.io.deprecator import deprecate_script
from scripts.scil_dwi_apply_bias_field import main as new_main


DEPRECATION_MSG = """
This script has been renamed scil_dwi_apply_bias_field.py.
Please change your existing pipelines accordingly.
"""


@deprecate_script("scil_apply_bias_field_on_dwi.py", DEPRECATION_MSG, '1.7.0')
def main():
new_main()


if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 13,7 @@


def test_help_option(script_runner):
ret = script_runner.run('scil_apply_bias_field_on_dwi.py', '--help')
ret = script_runner.run('scil_dwi_apply_bias_field.py', '--help')
assert ret.success


Expand All @@ -23,6 23,6 @@ def test_execution_processing(script_runner):
'dwi_crop.nii.gz')
in_bias = os.path.join(get_home(), 'processing',
'bias_field_b0.nii.gz')
ret = script_runner.run('scil_apply_bias_field_on_dwi.py', in_dwi,
ret = script_runner.run('scil_dwi_apply_bias_field.py', in_dwi,
in_bias, 'dwi_crop_n4.nii.gz')
assert ret.success