From 831c5972ca26137fbf965edc9fe7480365bde392 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Oct 2021 11:50:27 -0400 Subject: [PATCH 1/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 48460056378b47cd4537bc162ae13e2fb4c2bd31 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Oct 2021 14:29:44 -0400 Subject: [PATCH 2/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 a22ace7..950990f 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="https://github.com/nipy/nipype/tarball/master - 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="https://github.com/nipy/nipype/tarball/master - 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')" ] }, { From 0ca3dd83b48affc9274d0f61124aabbdf0f3723b Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 4 Apr 2022 13:09:51 -0400 Subject: [PATCH 3/3] MNT: Update Python to 3.8 --- generate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate.sh b/generate.sh index 950990f..3c2f44d 100644 --- a/generate.sh +++ b/generate.sh @@ -15,7 +15,7 @@ generate_docker() { --user=neuro \ --workdir /home/neuro \ --miniconda \ - conda_install="python=3.7 pytest jupyter jupyterlab jupyter_contrib_nbextensions + conda_install="python=3.8 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 pybids==0.13.1