From a72dfa15126512051135ea627dbf339bf9f9ed00 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 15 Oct 2021 13:22:16 -0400 Subject: [PATCH 1/3] TEST: nipype rel/1.7.0 --- generate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate.sh b/generate.sh index a22ace7..d92faf7 100644 --- a/generate.sh +++ b/generate.sh @@ -17,7 +17,7 @@ generate_docker() { --miniconda \ conda_install="python=3.7 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \ - pip_install="https://github.com/nipy/nipype/tarball/master + pip_install="git+https://github.com/nipy/nipype.git@rel/1.7.0 https://github.com/INCF/pybids/tarball/0.7.1 nilearn datalad[full] nipy duecredit nbval niflow-nipype1-workflows" \ create_env="neuro" \ @@ -56,7 +56,7 @@ generate_singularity() { --miniconda \ conda_install="python=3.7 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \ - pip_install="https://github.com/nipy/nipype/tarball/master + pip_install="git+https://github.com/nipy/nipype.git@rel/1.7.0 https://github.com/INCF/pybids/tarball/0.7.1 nilearn datalad[full] nipy duecredit nbval niflow-nipype1-workflows" \ create_env="neuro" \ From 359e5d7ec63210ad7c7372a540bde5ba9f4118b0 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Oct 2021 11:50:27 -0400 Subject: [PATCH 2/3] FIX: Be more forgiving of the exception type Nipype changed how it reports exceptions raised in nodes in 1.7.0 --- notebooks/basic_function_interface.ipynb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/notebooks/basic_function_interface.ipynb b/notebooks/basic_function_interface.ipynb index f4b4076..5dc2b89 100644 --- a/notebooks/basic_function_interface.ipynb +++ b/notebooks/basic_function_interface.ipynb @@ -247,8 +247,8 @@ "# Run node\n", "try:\n", " rndArray.run()\n", - "except(NameError) as err:\n", - " print(\"NameError:\", err)\n", + "except Exception as err:\n", + " print(err)\n", "else:\n", " raise" ] @@ -259,8 +259,12 @@ "source": [ "As you can see, if we don't import `random` inside the scope of the function, we receive the following error:\n", "\n", - " NameError: global name 'random' is not defined\n", - " Interface Function failed to run. " + " Exception raised while executing Node rndArray_node.\n", + "\n", + " Traceback (most recent call last):\n", + " [...]\n", + " File \"\", line 3, in get_random_array\n", + " NameError: name 'random' is not defined" ] } ], From fb2c20b0a30a7f1021bbcbccc0b6c688c183b261 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Oct 2021 14:29:44 -0400 Subject: [PATCH 3/3] ENH: Update to more recent PyBIDS --- generate.sh | 4 ++-- notebooks/basic_data_input_bids.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generate.sh b/generate.sh index d92faf7..e817417 100644 --- a/generate.sh +++ b/generate.sh @@ -18,7 +18,7 @@ generate_docker() { conda_install="python=3.7 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \ pip_install="git+https://github.com/nipy/nipype.git@rel/1.7.0 - https://github.com/INCF/pybids/tarball/0.7.1 + pybids==0.13.1 nilearn datalad[full] nipy duecredit nbval niflow-nipype1-workflows" \ create_env="neuro" \ activate=True \ @@ -57,7 +57,7 @@ generate_singularity() { conda_install="python=3.7 pytest jupyter jupyterlab jupyter_contrib_nbextensions traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \ pip_install="git+https://github.com/nipy/nipype.git@rel/1.7.0 - https://github.com/INCF/pybids/tarball/0.7.1 + pybids==0.13.1 nilearn datalad[full] nipy duecredit nbval niflow-nipype1-workflows" \ create_env="neuro" \ activate=True \ diff --git a/notebooks/basic_data_input_bids.ipynb b/notebooks/basic_data_input_bids.ipynb index 3275f9d..e87d70a 100644 --- a/notebooks/basic_data_input_bids.ipynb +++ b/notebooks/basic_data_input_bids.ipynb @@ -140,7 +140,7 @@ "metadata": {}, "outputs": [], "source": [ - "layout.get(subject='01', suffix='bold', extensions=['nii', 'nii.gz'])" + "layout.get(subject='01', suffix='bold', extension=['.nii', '.nii.gz'])" ] }, { @@ -156,7 +156,7 @@ "metadata": {}, "outputs": [], "source": [ - "layout.get(subject='01', suffix='bold', extensions=['nii', 'nii.gz'], return_type='file')" + "layout.get(subject='01', suffix='bold', extension=['.nii', '.nii.gz'], return_type='file')" ] }, {