From 03d645390cda1b4b84ee0c46854c65fdc160e1a7 Mon Sep 17 00:00:00 2001 From: NiPreps Bot Date: Sat, 21 Dec 2024 18:52:00 +0000 Subject: [PATCH] docs(master): Update docs of development line --- master/_modules/niworkflows/anat/ants.html | 16 ++++++---------- .../_modules/niworkflows/interfaces/itk.html | 10 +++++----- .../_modules/niworkflows/interfaces/norm.html | 6 ++---- master/_modules/niworkflows/reports/core.html | 2 +- master/api/niworkflows-anat-ants-1.pdf | Bin 20450 -> 20450 bytes master/api/niworkflows-anat-ants-2.pdf | Bin 16179 -> 16179 bytes master/api/niworkflows-anat-ants-3.pdf | Bin 11748 -> 11748 bytes .../api/niworkflows-anat-coregistration-1.pdf | Bin 10523 -> 10523 bytes master/api/niworkflows-anat-freesurfer-1.pdf | Bin 13597 -> 13597 bytes master/api/niworkflows-anat-skullstrip-1.pdf | Bin 12656 -> 12656 bytes master/api/niworkflows-func-util-1.pdf | Bin 10183 -> 10183 bytes master/api/niworkflows-func-util-2.pdf | Bin 15599 -> 15599 bytes master/api/niworkflows-func-util-3.pdf | Bin 12276 -> 12276 bytes .../niworkflows-workflows-epi-refmap-1.pdf | Bin 9669 -> 9669 bytes 14 files changed, 14 insertions(+), 20 deletions(-) diff --git a/master/_modules/niworkflows/anat/ants.html b/master/_modules/niworkflows/anat/ants.html index e1fc9685721..dcd755007b5 100644 --- a/master/_modules/niworkflows/anat/ants.html +++ b/master/_modules/niworkflows/anat/ants.html @@ -1053,15 +1053,11 @@

Source code for niworkflows.anat.ants

     me_7_2 = pe.Node(ImageMath(operation='ME', op2='5'), name='22_me_7_2')
 
     # De-pad
-    depad_mask = pe.Node(
-        ImageMath(operation='PadImage', op2='-%d' % padding), name='23_depad_mask'
-    )
-    depad_segm = pe.Node(
-        ImageMath(operation='PadImage', op2='-%d' % padding), name='24_depad_segm'
-    )
-    depad_gm = pe.Node(ImageMath(operation='PadImage', op2='-%d' % padding), name='25_depad_gm')
-    depad_wm = pe.Node(ImageMath(operation='PadImage', op2='-%d' % padding), name='26_depad_wm')
-    depad_csf = pe.Node(ImageMath(operation='PadImage', op2='-%d' % padding), name='27_depad_csf')
+    depad_mask = pe.Node(ImageMath(operation='PadImage', op2=f'-{padding}'), name='23_depad_mask')
+    depad_segm = pe.Node(ImageMath(operation='PadImage', op2=f'-{padding}'), name='24_depad_segm')
+    depad_gm = pe.Node(ImageMath(operation='PadImage', op2=f'-{padding}'), name='25_depad_gm')
+    depad_wm = pe.Node(ImageMath(operation='PadImage', op2=f'-{padding}'), name='26_depad_wm')
+    depad_csf = pe.Node(ImageMath(operation='PadImage', op2=f'-{padding}'), name='27_depad_csf')
 
     msk_conform = pe.Node(niu.Function(function=_conform_mask), name='msk_conform')
     merge_tpms = pe.Node(niu.Merge(in_segmentation_model[0]), name='merge_tpms')
@@ -1393,7 +1389,7 @@ 

Source code for niworkflows.anat.ants

     for label in labels:
         newnii = nii.__class__(np.uint8(label_data == label), nii.affine, nii.header)
         newnii.set_data_dtype('uint8')
-        out_file = fname_presuffix(in_segm, suffix='_class-%02d' % label, newpath=cwd)
+        out_file = fname_presuffix(in_segm, suffix=f'_class-{label:02d}', newpath=cwd)
         newnii.to_filename(out_file)
         out_files.append(out_file)
     return out_files
diff --git a/master/_modules/niworkflows/interfaces/itk.html b/master/_modules/niworkflows/interfaces/itk.html
index a0adeadaf71..3ae4049b9be 100644
--- a/master/_modules/niworkflows/interfaces/itk.html
+++ b/master/_modules/niworkflows/interfaces/itk.html
@@ -520,7 +520,7 @@ 

Source code for niworkflows.interfaces.itk

 
     in_file, in_xform, ifargs, index, newpath = args
     out_file = fname_presuffix(
-        in_file, suffix='_xform-%05d' % index, newpath=newpath, use_ext=True
+        in_file, suffix=f'_xform-{index:05d}', newpath=newpath, use_ext=True
     )
 
     copy_dtype = ifargs.pop('copy_dtype', False)
@@ -582,19 +582,19 @@ 

Source code for niworkflows.interfaces.itk

 
         if nxforms != num_files:
             raise RuntimeError(
-                'Number of transforms (%d) found in the ITK file does not match'
-                ' the number of input image files (%d).' % (nxforms, num_files)
+                f'Number of transforms ({nxforms}) found in the ITK file does not'
+                f' match the number of input image files ({num_files}).'
             )
 
         # At this point splitting transforms will be necessary, generate a base name
         out_base = fname_presuffix(
-            tf_file, suffix='_pos-%03d_xfm-{:05d}' % i, newpath=tmp_folder.name
+            tf_file, suffix=f'_pos-{i:03d}_xfm-{{:05d}}', newpath=tmp_folder.name
         ).format
         # Split combined ITK transforms file
         split_xfms = []
         for xform_i in range(nxforms):
             # Find start token to extract
-            startidx = tfdata.index('#Transform %d' % xform_i)
+            startidx = tfdata.index(f'#Transform {xform_i}')
             next_xform = base_xform + tfdata[startidx + 1 : startidx + 4] + ['']
             xfm_file = out_base(xform_i)
             with open(xfm_file, 'w') as out_xfm:
diff --git a/master/_modules/niworkflows/interfaces/norm.html b/master/_modules/niworkflows/interfaces/norm.html
index 002fc49ce0f..e2f991ae5d4 100644
--- a/master/_modules/niworkflows/interfaces/norm.html
+++ b/master/_modules/niworkflows/interfaces/norm.html
@@ -556,7 +556,7 @@ 

Source code for niworkflows.interfaces.norm

             if interface_result.runtime.returncode != 0:
                 NIWORKFLOWS_LOG.warning('Retry #%d failed.', self.retry)
                 # Save outputs (if available)
-                term_out = _write_outputs(interface_result.runtime, '.nipype-%04d' % self.retry)
+                term_out = _write_outputs(interface_result.runtime, f'.nipype-{self.retry:04d}')
                 if term_out:
                     NIWORKFLOWS_LOG.warning('Log of failed retry saved (%s).', ', '.join(term_out))
             else:
@@ -569,9 +569,7 @@ 

Source code for niworkflows.interfaces.norm

             self.retry += 1
 
         # If all tries fail, raise an error.
-        raise RuntimeError(
-            'Robust spatial normalization failed after %d retries.' % (self.retry - 1)
-        )
+        raise RuntimeError(f'Robust spatial normalization failed after {self.retry - 1} retries.')
 
     def _get_ants_args(self):
         args = {
diff --git a/master/_modules/niworkflows/reports/core.html b/master/_modules/niworkflows/reports/core.html
index 0957ff9bff7..b9b99cc685e 100644
--- a/master/_modules/niworkflows/reports/core.html
+++ b/master/_modules/niworkflows/reports/core.html
@@ -901,7 +901,7 @@ 

Source code for niworkflows.reports.core

 
         logger = logging.getLogger('cli')
         error_list = ', '.join(
-            '%s (%d)' % (subid, err) for subid, err in zip(subject_list, report_errors) if err
+            f'{subid} ({err})' for subid, err in zip(subject_list, report_errors) if err
         )
         logger.error(
             'Preprocessing did not finish successfully. Errors occurred while processing '
diff --git a/master/api/niworkflows-anat-ants-1.pdf b/master/api/niworkflows-anat-ants-1.pdf
index af8161819e15428b18f2a7e593ddb450beb25091..ec5278c9ad15a939d0971c4b2b7457fcfb7d604f 100644
GIT binary patch
delta 21
dcmaDfpYhRr#trj**$gdA4UJ7UFZH!$0svx{2f+XU

delta 21
dcmaDfpYhRr#trj**$fO#%uFpdFZH!$0svx*2g3jW

diff --git a/master/api/niworkflows-anat-ants-2.pdf b/master/api/niworkflows-anat-ants-2.pdf
index b2dd76eda850a85ae2a10be0d6ecdc05459cd045..8ef24b6f9bba7ef007d381c8cf92a1aceeeb6f05 100644
GIT binary patch
delta 19
acmdm7x4CY^2OBm+3sXa5)6L&(Y?%O8nFpW%

delta 19
acmdm7x4CY^2OBm6LlZMo%gx_xY?%O8jR&Ft

diff --git a/master/api/niworkflows-anat-ants-3.pdf b/master/api/niworkflows-anat-ants-3.pdf
index 2765a010eff2b1deaa0945881c77cdbf3ba16822..b3b296c9694bc1d3c191a807de29cd8d325493bc 100644
GIT binary patch
delta 19
acmaD7{UmzBLTxrf3sXa5v(3x3ZJ7X5KL-5(

delta 19
acmaD7{UmzBLTxq!LlZMo%gxKRZJ7X5Ee8Go

diff --git a/master/api/niworkflows-anat-coregistration-1.pdf b/master/api/niworkflows-anat-coregistration-1.pdf
index e48713bb9cd010783931ce2640aa6f0c1739c39a..35972d4142a5814176d25569fae512f407aba775 100644
GIT binary patch
delta 19
acmbOoG&^WRiaML2g{h&j`Q|M3jf?<9ECx#e

delta 19
acmbOoG&^WRiaMKtp^3SH;pQy$jf?<8$p$|F

diff --git a/master/api/niworkflows-anat-freesurfer-1.pdf b/master/api/niworkflows-anat-freesurfer-1.pdf
index e38e9ec727d50bd8fc3f4352458c6211e3f8ce74..018203089c1274172679045da2a7ba8dd16af447 100644
GIT binary patch
delta 19
acmbQ6H8*R+Eh9EV3sXa5i_H&=Y?%O0zXuNh

delta 19
acmbQ6H8*R+Eh9DqLlbiY!_5zjY?%O0RtEwA

diff --git a/master/api/niworkflows-anat-skullstrip-1.pdf b/master/api/niworkflows-anat-skullstrip-1.pdf
index 52a8cac92d8776bed209726304563dc2e82fda50..88565df8249ba2ce889a114d35f2795c73969e5a 100644
GIT binary patch
delta 19
acmey6^dV`3u0ETgg{h&j#b#rDTP6Tb0R}|?

delta 19
acmey6^dV`3u0ETAp^3SH(Pm?PTP6Tao(4Gp

diff --git a/master/api/niworkflows-func-util-1.pdf b/master/api/niworkflows-func-util-1.pdf
index 68080ca26c50475a6592cc15bcd5bbcaaac53a89..cc59398285f9513b506ceb60ab70d914ecdbad41 100644
GIT binary patch
delta 19
acmX@^f82kApcjmxr

delta 19
acmX@^f82kApc

diff --git a/master/api/niworkflows-workflows-epi-refmap-1.pdf b/master/api/niworkflows-workflows-epi-refmap-1.pdf
index f7cd778ea812a34f1c91c28d7d72aa420408e992..557dfa527a39195753c8d94b565067dd8955f1b1 100644
GIT binary patch
delta 19
acmX@=ebjpczY3e7g{h&b!DdmF4U7On-UZtL

delta 19
acmX@=ebjpczY3dyp^3Sn$!1ZN4U7Onum#uv