From 8e1a9704e8707bc81484f56b213c7f7d7f6cc0c1 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Tue, 27 Feb 2024 10:26:29 +0100 Subject: [PATCH 1/7] error with line in Dockerfile (already modified in Dockerfile_nomcr) --- Dockerfile_macapype_env | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Dockerfile_macapype_env b/Dockerfile_macapype_env index 4a389f89b..bb243b0c8 100644 --- a/Dockerfile_macapype_env +++ b/Dockerfile_macapype_env @@ -131,22 +131,20 @@ RUN apt-get install -y -q --no-install-recommends \ netpbm \ tcsh \ xfonts-base \ - xvfb \ - && curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \ - && dpkg -i /tmp/toinstall.deb \ - && rm /tmp/toinstall.deb \ - && curl -sSL --retry 5 -o /tmp/toinstall.deb http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \ - && dpkg -i /tmp/toinstall.deb \ - && rm /tmp/toinstall.deb \ - && apt-get install -f \ - && gsl2_path="$(find / -name 'libgsl.so.23' || printf '')" \ - && if [ -n "$gsl2_path" ]; then \ - ln -sfv "$gsl2_path" "$(dirname $gsl2_path)/libgsl.so.0"; \ - fi \ - && ldconfig \ - && echo "Downloading AFNI ..." \ - && mkdir -p /opt/afni-latest \ - && curl -fsSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \ + xvfb + +RUN curl -sSL --retry 5 -o /tmp/toinstall.deb http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb +RUN dpkg -i /tmp/toinstall.deb +RUN rm /tmp/toinstall.deb +RUN apt-get install -f +RUN gsl2_path="$(find / -name 'libgsl.so.23' || printf '')" +RUN if [ -n "$gsl2_path" ]; then \ + ln -sfv "$gsl2_path" "$(dirname $gsl2_path)/libgsl.so.0";\ + fi +RUN ldconfig +RUN echo "Downloading AFNI ..." +RUN mkdir -p /opt/afni-latest +RUN curl -fsSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \ | tar -xz -C /opt/afni-latest --strip-components 1 ############################################# AFNI IsoSurface requires specifically libXp6 From 16818d597c7f3c75a763b352427b7ec110d30ff5 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Tue, 27 Feb 2024 10:26:51 +0100 Subject: [PATCH 2/7] forcing latest spm version of macapype_env --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index da3339a37..99e0bb689 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:latest +FROM macatools/macapype_env:v0.1.2-spm USER root @@ -71,4 +71,4 @@ RUN apt-get clean \ RUN rm -rf \ /tmp/hsperfdata* \ /var/*/apt/*/partial \ - /var/log/apt/term* \ No newline at end of file + /var/log/apt/term* From 526207bfaab0fefe8e54b163395c6177147348dd Mon Sep 17 00:00:00 2001 From: David Meunier Date: Tue, 27 Feb 2024 11:56:45 +0100 Subject: [PATCH 3/7] forcing version of macapype_env --- Dockerfile_nomcr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile_nomcr b/Dockerfile_nomcr index 5a7e9f2e4..79f2faf55 100644 --- a/Dockerfile_nomcr +++ b/Dockerfile_nomcr @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:v0.1.1-nomcr +FROM macatools/macapype_env:v0.1.2 USER root From 0135b0e5e8a516d72eb2214de0e2857f264d97b2 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Tue, 27 Feb 2024 13:49:15 +0100 Subject: [PATCH 4/7] forcing v0.1.2 or v0.1.2-spm as macapype_env --- Dockerfile_github | 2 +- Dockerfile_testpypi | 3 +-- Dockerfile_testpypi_nomcr | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile_github b/Dockerfile_github index 959111fee..00eee7c3a 100644 --- a/Dockerfile_github +++ b/Dockerfile_github @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:latest +FROM macatools/macapype_env:v0.1.2-spm USER root diff --git a/Dockerfile_testpypi b/Dockerfile_testpypi index bc6eb2ab6..43c756ed4 100644 --- a/Dockerfile_testpypi +++ b/Dockerfile_testpypi @@ -9,8 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:latest - +FROM macatools/macapype_env:v0.1.2-spm USER root ARG DEBIAN_FRONTEND="noninteractive" diff --git a/Dockerfile_testpypi_nomcr b/Dockerfile_testpypi_nomcr index e6f4025da..d71e81bca 100644 --- a/Dockerfile_testpypi_nomcr +++ b/Dockerfile_testpypi_nomcr @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:v0.1.1-nomcr +FROM macatools/macapype_env:v0.1.2 USER root From b38e521508e01370ecf19b9ad43be22dc66c8e81 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Tue, 27 Feb 2024 14:11:03 +0100 Subject: [PATCH 5/7] to relaunch PR with version of python 3.10 --- .github/workflows/check_on_PR.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check_on_PR.yml b/.github/workflows/check_on_PR.yml index 02168382e..c28e767ed 100644 --- a/.github/workflows/check_on_PR.yml +++ b/.github/workflows/check_on_PR.yml @@ -7,7 +7,6 @@ on: branches: - master - jobs: build: From 888624d1779c7942a706ed1e45dd36c873b6a9a5 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Tue, 27 Feb 2024 14:12:58 +0100 Subject: [PATCH 6/7] python v2 --- .github/workflows/check_on_PR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_on_PR.yml b/.github/workflows/check_on_PR.yml index 7876b72f6..d95e76561 100644 --- a/.github/workflows/check_on_PR.yml +++ b/.github/workflows/check_on_PR.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@master - name: Set up Python 3.10.5 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.10.5 From fbb48cf4a56f7a0e556bb7c89d9f085900ed1114 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Tue, 27 Feb 2024 14:23:00 +0100 Subject: [PATCH 7/7] flake8 --- macapype/utils/misc.py | 7 +++---- macapype/utils/utils_tests.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/macapype/utils/misc.py b/macapype/utils/misc.py index 6160be80c..a846bd82f 100644 --- a/macapype/utils/misc.py +++ b/macapype/utils/misc.py @@ -22,7 +22,7 @@ def print_nii_data(nii_file): def get_elem(list_elem, index_elem): assert isinstance(list_elem, list), 'Error, list_elem should be a list' - assert 0 <= index_elem and index_elem < len(list_elem),\ + assert 0 <= index_elem and index_elem < len(list_elem), \ ('error with index {}, does not match a list with {} elements'.format( index_elem, len(list_elem))) @@ -33,9 +33,8 @@ def get_elem(list_elem, index_elem): def get_index(list_elem, index_elem): - assert isinstance(list_elem, list), 'Error, list_elem should be a list' - assert 1 <= index_elem and index_elem < len(list_elem)+1,\ + assert 1 <= index_elem and index_elem < len(list_elem)+1, \ ('error with index {}, shoud start at 1 and be smaller than {}'.format( index_elem, len(list_elem)+1)) @@ -88,7 +87,7 @@ def gzip(unzipped_file): zipped_file = dest + ".gz" - assert os.path.exists(zipped_file),\ + assert os.path.exists(zipped_file), \ "Error, {} should exists".format(zipped_file) return zipped_file diff --git a/macapype/utils/utils_tests.py b/macapype/utils/utils_tests.py index 908e6cbbc..ed64b9247 100644 --- a/macapype/utils/utils_tests.py +++ b/macapype/utils/utils_tests.py @@ -51,7 +51,7 @@ def _download_data_zip(data_zip, name): return True - assert op.exists(data_zip),\ + assert op.exists(data_zip), \ "Error, data_zip = {} not found ".format(data_zip) return False