Skip to content

Commit

Permalink
Merge pull request #17 from nipype/develop
Browse files Browse the repository at this point in the history
Bug fix of doctest generation
  • Loading branch information
tclose authored Mar 26, 2024
2 parents 5a04f9d + 72dcec9 commit 2af28d1
Show file tree
Hide file tree
Showing 231 changed files with 810 additions and 633 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,31 +122,17 @@ jobs:
matrix:
repo:
- afni
- ants
- fsl
- freesurfer
env:
SECRET: ""
# - ants
# - fsl
# - freesurfer
# - mriqc
steps:
- name: Get secret for corresponding repo
id: get_secret
run: |
if [ "${{ matrix.repo }}" == "afni" ]; then
SECRET="${{ secrets.AFNI_PAT }}"
elif [ "${{ matrix.repo }}" == "ants" ]; then
SECRET="${{ secrets.ANTS_PAT }}"
elif [ "${{ matrix.repo }}" == "fsl" ]; then
SECRET="${{ secrets.FSL_PAT }}"
elif [ "${{ matrix.repo }}" == "freesurfer" ]; then
SECRET="${{ secrets.FREESURFER_PAT }}"
fi
echo "SECRET=$SECRET" >> $GITHUB_ENV

- name: Trigger post-release on downstream repos
if: github.event_name == 'release' && env.SECRET
if: github.event_name == 'release'
run: |
curl -XPOST -u "${{ env.SECRET }}" -H "Accept: application/vnd.github.everest-preview+json" \
curl -XPOST -u "${{ env.POST_RELEASE_PAT }}" -H "Accept: application/vnd.github.everest-preview+json" \
"https://api.github.com/repos/nipype/pydra-${{ matrix.repo }}/dispatches" \
-d '{"event_type": "create-post-release"}'
env:
PAT: ${{ env.SECRET }}
PAT: ${{ env.POST_RELEASE_PAT }}
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/a_boverlap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file_a:
in_file_a: '"functional.nii"'
# type=file|default=<undefined>: input file A
in_file_b:
in_file_b: '"structural.nii"'
# type=file|default=<undefined>: input file B
out_file: ' "out.mask_ae_overlap.txt"'
# type=file: output file
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/afn_ito_nifti.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"afni_output.3D"'
# type=file|default=<undefined>: input file to 3dAFNItoNIFTI
out_file: ' "afni_output.nii"'
# type=file: output file
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/align_epi_anat_py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
anat:
anat: '"structural.nii"'
# type=file|default=<undefined>: name of structural dataset
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: EPI dataset to align
epi_base: '0'
# type=traitcompound|default=None: the epi base used in alignmentshould be one of (0/mean/median/max/subbrick#)
Expand Down
12 changes: 6 additions & 6 deletions example-specs/task/nipype/afni/allineate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dAllineate
out_file: '"functional_allineate.nii"'
# type=file: output image file name
# type=file|default=<undefined>: output file from 3dAllineate
in_matrix:
in_matrix: '"cmatrix.mat"'
# type=file|default=<undefined>: matrix to align input file
imports:
# list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item
Expand All @@ -349,9 +349,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dAllineate
reference:
reference: '"structural.nii"'
# type=file|default=<undefined>: file to be used as reference, the first volume will be used if not given the reference will be the first volume of in_file.
allcostx: '"out.allcostX.txt"'
# type=file: Compute and print ALL available cost functionals for the un-warped inputs
Expand All @@ -367,9 +367,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dAllineate
reference:
reference: '"structural.nii"'
# type=file|default=<undefined>: file to be used as reference, the first volume will be used if not given the reference will be the first volume of in_file.
nwarp_fixmot: '["X", "Y"]'
# type=list|default=[]: To fix motion along directions.
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/auto_tcorrelate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: timeseries x space (volume or surface) file
polort: '-1'
# type=int|default=0: Remove polynomical trend of order m or -1 for no detrending
eta2: 'True'
# type=bool|default=False: eta^2 similarity
mask:
mask: '"mask.nii"'
# type=file|default=<undefined>: mask of voxels
mask_only_targets: 'True'
# type=bool|default=False: use mask only on targets voxels
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/auto_tlrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"structural.nii"'
# type=file|default=<undefined>: Original anatomical volume (+orig).The skull is removed by this scriptunless instructed otherwise (-no_ss).
no_ss: 'True'
# type=bool|default=False: Do not strip skull of input data set (because skull has already been removed or because template still has the skull) NOTE: The ``-no_ss`` option is not all that optional. Here is a table of when you should and should not use ``-no_ss`` +------------------+------------+---------------+ | Dataset | Template | +==================+============+===============+ | | w/ skull | wo/ skull | +------------------+------------+---------------+ | WITH skull | ``-no_ss`` | xxx | +------------------+------------+---------------+ | WITHOUT skull | No Cigar | ``-no_ss`` | +------------------+------------+---------------+ Template means: Your template of choice Dset. means: Your anatomical dataset ``-no_ss`` means: Skull stripping should not be attempted on Dset xxx means: Don't put anything, the script will strip Dset No Cigar means: Don't try that combination, it makes no sense.
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/autobox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"structural.nii"'
# type=file|default=<undefined>: input file
padding: '5'
# type=int|default=0: Number of extra voxels to pad on each side of box
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/automask.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dAutomask
dilate: '1'
# type=int|default=0: dilate the mask outwards
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/axialize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3daxialize
out_file: '"axialized.nii"'
# type=file: output file
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/bandpass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dBandpass
highpass: '0.005'
# type=float|default=0.0: highpass
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/blur_in_mask.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dSkullStrip
mask:
mask: '"mask.nii"'
# type=file|default=<undefined>: Mask dataset, if desired. Blurring will occur only within the mask. Voxels NOT in the mask will be set to zero in the output.
fwhm: '5.0'
# type=float|default=0.0: fwhm kernel size
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/blur_to_fwhm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"epi.nii"'
# type=file|default=<undefined>: The dataset that will be smoothed
fwhm: '2.5'
# type=float|default=0.0: Blur until the 3D FWHM reaches this value (in mm)
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/brick_stat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dmaskave
mask:
mask: '"skeleton_mask.nii.gz"'
# type=file|default=<undefined>: -mask dset = use dset as mask to include/exclude voxels
min: 'True'
# type=bool|default=False: print the minimum value in dataset
Expand Down
6 changes: 3 additions & 3 deletions example-specs/task/nipype/afni/calc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file_a:
in_file_a: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dcalc
in_file_b:
in_file_b: '"functional2.nii"'
# type=file|default=<undefined>: operand file to 3dcalc
expr: '"a*b"'
# type=str|default='': expr
Expand All @@ -218,7 +218,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file_a:
in_file_a: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dcalc
expr: '"1"'
# type=str|default='': expr
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/cat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ doctests:
# '.mock()' method of the corresponding class is used instead.
sel: '"''[0,2]''"'
# type=str|default='': Apply the same column/row selection string to all filenames on the command line.
in_files:
in_files: '["f1.1D", "f2.1D"]'
# type=list|default=[]:
out_file: '"catout.1d"'
# type=file: output file
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/center_mass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"structural.nii"'
# type=file|default=<undefined>: input file to 3dCM
cm_file: '"cm.txt"'
# type=file: file with the center of mass coordinates
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/clip_level.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"anatomical.nii"'
# type=file|default=<undefined>: input file to 3dClipLevel
imports:
# list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/convert_dset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"lh.pial_converted.gii"'
# type=file|default=<undefined>: input file to ConvertDset
out_type: '"niml_asc"'
# type=enum|default='niml'|allowed['1D','1Dp','1Dpt','gii','gii_asc','gii_b64','gii_b64gz','niml','niml_asc','niml_bi']: output type
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/copy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dcopy
imports:
# list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/deconvolve.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_files:
in_files: '["functional.nii", "functional2.nii"]'
# type=inputmultiobject|default=[]: filenames of 3D+time input datasets. More than one filename can be given and the datasets will be auto-catenated in time. You can input a 1D time series file here, but the time axis should run along the ROW direction, not the COLUMN direction as in the 'input1D' option.
out_file: '"output.nii"'
# type=file: output statistics file
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/degree_centrality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dDegreeCentrality
mask:
mask: '"mask.nii"'
# type=file|default=<undefined>: mask file to mask input data
sparsity: '1 # keep the top one percent of connections'
# type=float|default=0.0: only take the top percent of connections
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/despike.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dDespike
imports:
# list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/detrend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dDetrend
args: '"-polort 2"'
# type=str|default='': Additional parameters to the command
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/dot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_files:
in_files: '["functional.nii[0]", "structural.nii"]'
# type=list|default=[]: list of input files, possibly with subbrick selectors
dodice: 'True'
# type=bool|default=False: Return the Dice coefficient (the Sorensen-Dice index).
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/ecm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dECM
mask:
mask: '"mask.nii"'
# type=file|default=<undefined>: mask file to mask input data
sparsity: '0.1 # keep top 0.1% of connections'
# type=float|default=0.0: only take the top percent of connections
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/edge_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dedge3
out_file: '"edges.nii"'
# type=file: output file
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file_a:
in_file_a: '"seed.1D"'
# type=file|default=<undefined>: input file to 1deval
in_file_b:
in_file_b: '"resp.1D"'
# type=file|default=<undefined>: operand file to 1deval
expr: '"a*b"'
# type=str|default='': expr
Expand Down
4 changes: 2 additions & 2 deletions example-specs/task/nipype/afni/fim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dfim+
ideal_file:
ideal_file: '"seed.1D"'
# type=file|default=<undefined>: ideal time series file name
out_file: '"functional_corr.nii"'
# type=file: output file
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/fourier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input file to 3dFourier
retrend: 'True'
# type=bool|default=False: Any mean and linear trend are removed before filtering. This will restore the trend after filtering.
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/fwh_mx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"functional.nii"'
# type=file|default=<undefined>: input dataset
imports:
# list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item
Expand Down
2 changes: 1 addition & 1 deletion example-specs/task/nipype/afni/gcor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ doctests:
# dict[str, str] - name-value pairs for inputs to be provided to the doctest.
# If the field is of file-format type and the value is None, then the
# '.mock()' method of the corresponding class is used instead.
in_file:
in_file: '"structural.nii"'
# type=file|default=<undefined>: input dataset to compute the GCOR over
nfirst: '4'
# type=int|default=0: specify number of initial TRs to ignore
Expand Down
Loading

0 comments on commit 2af28d1

Please sign in to comment.