From 6a39816e11b20e7811989d3e97c9a7836e7e5f1d Mon Sep 17 00:00:00 2001 From: Jonas Osmann Date: Tue, 31 Jan 2023 14:44:12 -0500 Subject: [PATCH 1/4] [fix] hardcode setup.py package versions Hardcoding required package versions in python.py to prevent breaking changes potentially introduced by latest versions of packages that have not been tested with MIRACL yet. --- setup.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 4571763d..5bcc25db 100755 --- a/setup.py +++ b/setup.py @@ -37,9 +37,25 @@ 'Topic :: Scientific/Engineering :: Image Recognition', ], install_requires=[ - 'numpy', 'pandas', 'scipy', 'opencv-python', 'tifffile', 'nibabel', 'argparse', 'tables', 'statsmodels', - 'allensdk', 'lightning-python', 'joblib', 'matplotlib', 'argcomplete', 'dipy', 'seaborn', 'pyqt5', 'nipype' - ], + 'numpy==1.21.6', + 'pandas==1.3.5', + 'scipy==1.6.2', + 'opencv-python==4.2.0.32', + 'tifffile==2021.11.2', + 'nibabel==4.0.2', + 'argparse=1.4.0', + 'tables==3.7.0', + 'statsmodels==0.13.0', + 'allensdk==2.15.1', + 'lightning-python==1.2.1', + 'joblib==1.2.0', + 'matplotlib==3.4.2', + 'argcomplete==2.0.0', + 'dipy==1.6.0', + 'seaborn==0.12.2', + 'pyqt5==5.15.8', + 'nipype==1.8.5' + ], entry_points={'console_scripts': ['miracl=miracl.cli:main'], 'gui_scripts': ['miraclGUI=miracl.miraclGUI:main']}, keywords=[ From bbbf20f7114d86048c7247e3b38d4712538ae9e2 Mon Sep 17 00:00:00 2001 From: Jonas Osmann Date: Tue, 31 Jan 2023 14:45:40 -0500 Subject: [PATCH 2/4] [fix] install setuptools v65.6.0 setuptools v67.0.0 introduced changes that broke the MIRACL CLI and GUI methods. Installing version v65.6.0, which has previously been tested with MIRACL, fixes this issue. However, this should only be a temporary fix. Ideally, the affected scripts should be changed in MIRACL to make them work with v67.0.0 of setuptools. The reason why this is not being done in this commit is, as so often, time constraints. --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 635c5bb5..db2c7f3a 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,10 @@ ADD . /code # delete ruamel pkg RUN rm -rf $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/ruamel* && \ pip install markupsafe==2.0.1 && \ + # Install setuptools v65.6.0 as latest version (v67.0.0) + # breaks parsing. Temporary fix only. In the long run, + # scripts should be refactored to work with current version! + pip install setuptools==65.6.0 && \ pip install -e /code/ "botocore >= 1.20.110" ENV MIRACL_HOME=/code/miracl From 2de9e9cca7739ca00f7374e1266bc27679fba024 Mon Sep 17 00:00:00 2001 From: Jonas Osmann Date: Tue, 31 Jan 2023 15:14:05 -0500 Subject: [PATCH 3/4] [fix] fix missing equal sign Missing equal sign caused setup.py to exit with error. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5bcc25db..cdcc6d72 100755 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ 'opencv-python==4.2.0.32', 'tifffile==2021.11.2', 'nibabel==4.0.2', - 'argparse=1.4.0', + 'argparse==1.4.0', 'tables==3.7.0', 'statsmodels==0.13.0', 'allensdk==2.15.1', From dcc9e1ddc11699a45cb3166fadb3d29ca668da45 Mon Sep 17 00:00:00 2001 From: Jonas Osmann Date: Tue, 31 Jan 2023 15:35:04 -0500 Subject: [PATCH 4/4] [fix] update Sylabs Singularity token in CircleCI Sylabs Singularity token varible needed to be updated to most recent token in CircleCI context. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5a3fd7c..2535a9ae 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,7 +62,7 @@ jobs: # Change permissions for code directory for any Singularity user sed -i '/#STOPUNCOMMENT#/a # Change permissions for code dir\nchmod -R 777 /code' miracl.def && \ # Log in to cloud.sylabs.io - echo $SYLABS_TOKEN_JAN_25_2023 > tokenfile && \ + echo $SYLABS_TOKEN_JAN_30_2023 > tokenfile && \ singularity remote login -u aiconslab --tokenfile tokenfile && \ # Setting trap in case image cannot be deleted set -e