Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 22, 2024
1 parent fedc154 commit bd9b5a6
Show file tree
Hide file tree
Showing 104 changed files with 906 additions and 908 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
- name: Revert version to most recent tag on upstream update
if: github.event_name == 'repository_dispatch'
run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}')
run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}')
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install build dependencies
Expand Down Expand Up @@ -53,8 +53,8 @@ jobs:
uses: actions/checkout@v4
- name: Revert version to most recent tag on upstream update
if: github.event_name == 'repository_dispatch'
run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}')
- name: Download tasks converted from Nipype
run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}')
- name: Download tasks converted from Nipype
uses: actions/download-artifact@v3
with:
name: converted-nipype
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
python -c "import fileformats.medimage_fsl as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
python -c "import fileformats.extras.medimage_fsl as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
fileformats-test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Removed unnecessary tools to free space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Get Download cache Key
id: cache-key
run: echo "::set-output name=key::fsl-linux-ubuntu22_amd64-7.4.1"
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Revert version to most recent tag on upstream update
if: github.event_name == 'repository_dispatch'
run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}')
- name: Download tasks converted from Nipype
- name: Download tasks converted from Nipype
uses: actions/download-artifact@v3
with:
name: converted-nipype
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -213,7 +213,7 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_FILEFORMATS_API_TOKEN }}
packages-dir: ./related-packages/fileformats/dist
packages-dir: ./related-packages/fileformats/dist

deploy-fileformats-extras:
needs: [deploy-fileformats]
Expand All @@ -222,7 +222,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -245,7 +245,7 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_FILEFORMATS_EXTRAS_API_TOKEN }}
packages-dir: ./related-packages/fileformats-extras/dist
packages-dir: ./related-packages/fileformats-extras/dist

deploy:
needs: [deploy-fileformats-extras]
Expand All @@ -255,7 +255,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
- name: Download tasks converted from Nipype
- name: Download tasks converted from Nipype
uses: actions/download-artifact@v3
with:
name: converted-nipype
Expand All @@ -268,7 +268,7 @@ jobs:
git checkout $TAG
git add -f pydra/tasks/fsl/auto/_version.py
git commit -am"added auto-generated version to make new tag for package version"
git tag ${TAG}post${POST}
git tag ${TAG}post${POST}
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -297,9 +297,9 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}

# Deploy on tags if PYPI_API_TOKEN is defined in the repository secrets.
# Secrets are not accessible in the if: condition [0], so set an output variable [1]
# [0] https://github.community/t/16928
# [1] https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter
# [1] https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This repository aims to be the canonical set of Pydra tasks for incorporating

Part of this effort is to establish a (mostly) declarative language for describing tasks that
potentially have intricate rules for determining the availability and names from the choice of
inputs.
inputs.


Automatically-generated vs manually-curated tasks
Expand All @@ -29,7 +29,7 @@ Automatically generated tasks can be found in the `pydra.tasks.fsl.auto` package
These packages should be treated with extreme caution as they likely do not pass testing.
Generated tasks that have been edited and pass testing are imported into one or more of the
`pydra.tasks.fsl.v*` packages, corresponding to the version of the fsl toolkit
they are designed for.
they are designed for.

Tests
-----
Expand Down Expand Up @@ -160,7 +160,7 @@ in the ``inputs > types`` and ``outputs > types`` dicts of the YAML spec.

If the required file-type is not found implemented within fileformats, please see the `fileformats
docs <https://arcanaframework.github.io/fileformats/developer.html>`__ for instructions on how to define
new fileformat types, and see
new fileformat types, and see
`fileformats-medimage-extras <https://github.com/ArcanaFramework/fileformats-medimage-extras/blob/6c2dabe91e95687eebc2639bb6f034cf9595ecfc/fileformats/extras/medimage/nifti.py#L30-L48>`__
for an example on how to implement methods to generate sample data for them.

Expand Down
2 changes: 1 addition & 1 deletion nipype-auto-conv/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ fileformats-medimage >=0.4
fileformats-datascience >= 0.1
fileformats-medimage-fsl
traits
nipype2pydra
nipype2pydra
20 changes: 10 additions & 10 deletions nipype-auto-conv/specs/apply_topup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
#
# Docs
# ----
#
#
# Interface for FSL topup, a tool for estimating and correcting
# susceptibility induced distortions.
# `General reference
# <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup/ApplytopupUsersGuide>`_
# and `use example
# <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup/ExampleTopupFollowedByApplytopup>`_.
#
#
#
#
# Examples
# --------
#
#
# >>> from nipype.interfaces.fsl import ApplyTOPUP
# >>> applytopup = ApplyTOPUP()
# >>> applytopup.inputs.in_files = ["epi.nii", "epi_rev.nii"]
Expand All @@ -27,8 +27,8 @@
# >>> applytopup.cmdline # doctest: +ELLIPSIS
# 'applytopup --datain=topup_encoding.txt --imain=epi.nii,epi_rev.nii --inindex=1,2 --topup=topup --out=epi_corrected.nii.gz'
# >>> res = applytopup.run() # doctest: +SKIP
#
#
#
#
task_name: ApplyTOPUP
nipype_name: ApplyTOPUP
nipype_module: nipype.interfaces.fsl.epi
Expand Down Expand Up @@ -117,8 +117,8 @@ tests:
# be terminated before they complete for time-saving reasons, and therefore
# these values will be ignored, when running in CI
timeout: 10
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# successfully. Set to 0 to disable the timeout (warning, this could
# lead to the unittests taking a very long time to complete)
xfail: true
Expand All @@ -145,8 +145,8 @@ tests:
# be terminated before they complete for time-saving reasons, and therefore
# these values will be ignored, when running in CI
timeout: 10
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# successfully. Set to 0 to disable the timeout (warning, this could
# lead to the unittests taking a very long time to complete)
xfail: true
Expand Down
16 changes: 8 additions & 8 deletions nipype-auto-conv/specs/apply_xfm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
# ----
# Currently just a light wrapper around FLIRT,
# with no modifications
#
#
# ApplyXFM is used to apply an existing transform to an image
#
#
#
#
# Examples
# --------
#
#
# >>> import nipype.interfaces.fsl as fsl
# >>> from nipype.testing import example_data
# >>> applyxfm = fsl.preprocess.ApplyXFM()
Expand All @@ -23,8 +23,8 @@
# >>> applyxfm.inputs.reference = example_data('mni.nii')
# >>> applyxfm.inputs.apply_xfm = True
# >>> result = applyxfm.run() # doctest: +SKIP
#
#
#
#
task_name: ApplyXFM
nipype_name: ApplyXFM
nipype_module: nipype.interfaces.fsl.preprocess
Expand Down Expand Up @@ -217,8 +217,8 @@ tests:
# be terminated before they complete for time-saving reasons, and therefore
# these values will be ignored, when running in CI
timeout: 10
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# successfully. Set to 0 to disable the timeout (warning, this could
# lead to the unittests taking a very long time to complete)
xfail: true
Expand Down
8 changes: 4 additions & 4 deletions nipype-auto-conv/specs/ar1_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# ----
# Use fslmaths to generate an AR1 coefficient image across a
# given dimension. (Should use -odt float and probably demean first)
#
#
#
#
task_name: AR1Image
nipype_name: AR1Image
nipype_module: nipype.interfaces.fsl.maths
Expand Down Expand Up @@ -88,8 +88,8 @@ tests:
# be terminated before they complete for time-saving reasons, and therefore
# these values will be ignored, when running in CI
timeout: 10
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# successfully. Set to 0 to disable the timeout (warning, this could
# lead to the unittests taking a very long time to complete)
xfail: true
Expand Down
16 changes: 8 additions & 8 deletions nipype-auto-conv/specs/av_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
# Docs
# ----
# Use FSL avscale command to extract info from mat file output of FLIRT
#
#
# Examples
# --------
#
#
# >>> avscale = AvScale()
# >>> avscale.inputs.mat_file = 'flirt.mat'
# >>> res = avscale.run() # doctest: +SKIP
#
#
#
#
#
#
task_name: AvScale
nipype_name: AvScale
nipype_module: nipype.interfaces.fsl.utils
Expand Down Expand Up @@ -68,7 +68,7 @@ tests:
# dict[str, str] - values to provide to inputs fields in the task initialisation
# (if not specified, will try to choose a sensible value)
all_param:
# type=bool|default=False:
# type=bool|default=False:
mat_file:
# type=file|default=<undefined>: mat file to read
ref_file:
Expand All @@ -85,8 +85,8 @@ tests:
# be terminated before they complete for time-saving reasons, and therefore
# these values will be ignored, when running in CI
timeout: 10
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# successfully. Set to 0 to disable the timeout (warning, this could
# lead to the unittests taking a very long time to complete)
xfail: true
Expand Down
18 changes: 9 additions & 9 deletions nipype-auto-conv/specs/b0_calc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
#
# Docs
# ----
#
#
# B0 inhomogeneities occur at interfaces of materials with different magnetic susceptibilities,
# such as tissue-air interfaces. These differences lead to distortion in the local magnetic field,
# as Maxwell’s equations need to be satisfied. An example of B0 inhomogneity is the first volume
# of the 4D volume ```$FSLDIR/data/possum/b0_ppm.nii.gz```.
#
#
# Examples
# --------
#
#
# >>> from nipype.interfaces.fsl import B0Calc
# >>> b0calc = B0Calc()
# >>> b0calc.inputs.in_file = 'tissue+air_map.nii'
# >>> b0calc.inputs.z_b0 = 3.0
# >>> b0calc.inputs.output_type = "NIFTI_GZ"
# >>> b0calc.cmdline
# 'b0calc -i tissue+air_map.nii -o tissue+air_map_b0field.nii.gz --chi0=4.000000e-07 -d -9.450000e-06 --extendboundary=1.00 --b0x=0.00 --gx=0.0000 --b0y=0.00 --gy=0.0000 --b0=3.00 --gz=0.0000'
#
#
#
#
task_name: B0Calc
nipype_name: B0Calc
nipype_module: nipype.interfaces.fsl.possum
Expand Down Expand Up @@ -115,8 +115,8 @@ tests:
# be terminated before they complete for time-saving reasons, and therefore
# these values will be ignored, when running in CI
timeout: 10
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# successfully. Set to 0 to disable the timeout (warning, this could
# lead to the unittests taking a very long time to complete)
xfail: true
Expand All @@ -139,8 +139,8 @@ tests:
# be terminated before they complete for time-saving reasons, and therefore
# these values will be ignored, when running in CI
timeout: 10
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# int - the value to set for the timeout in the generated test,
# after which the test will be considered to have been initialised
# successfully. Set to 0 to disable the timeout (warning, this could
# lead to the unittests taking a very long time to complete)
xfail: true
Expand Down
Loading

0 comments on commit bd9b5a6

Please sign in to comment.