Skip to content

Commit 96db8b0

Browse files
authored
Merge pull request #2100 from FCP-INDI/rc/v1.8.7
Release v1.8.7
2 parents 6448fed + e098f66 commit 96db8b0

File tree

104 files changed

+3341
-625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3341
-625
lines changed

.github/Dockerfiles/C-PAC.develop-ABCD-HCP-bionic.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/fcp-indi/c-pac/stage-base:abcd-hcp-v1.8.6.dev1
1+
FROM ghcr.io/fcp-indi/c-pac/stage-base:abcd-hcp-v1.8.7.dev1
22
LABEL org.opencontainers.image.description "Full C-PAC image with software dependencies version-matched to [ABCD-HCP BIDS fMRI Pipeline](https://github.com/DCAN-Labs/abcd-hcp-pipeline/blob/e480a8f99534f1b05f37bf44c64827384b69b383/Dockerfile)"
33
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
44
USER root

.github/Dockerfiles/C-PAC.develop-fMRIPrep-LTS-xenial.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/fcp-indi/c-pac/stage-base:fmriprep-lts-v1.8.6.dev1
1+
FROM ghcr.io/fcp-indi/c-pac/stage-base:fmriprep-lts-v1.8.7.dev1
22
LABEL org.opencontainers.image.description "Full C-PAC image with software dependencies version-matched to [fMRIPrep LTS](https://reproducibility.stanford.edu/fmriprep-lts#long-term-support-lts)"
33
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
44
USER root

.github/Dockerfiles/C-PAC.develop-jammy.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# You should have received a copy of the GNU Lesser General Public
1616
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
17-
FROM ghcr.io/fcp-indi/c-pac/stage-base:standard-v1.8.6.dev1
17+
FROM ghcr.io/fcp-indi/c-pac/stage-base:standard-v1.8.7.dev1
1818
LABEL org.opencontainers.image.description "Full C-PAC image"
1919
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
2020
USER root

.github/Dockerfiles/C-PAC.develop-lite-jammy.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# You should have received a copy of the GNU Lesser General Public
1616
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
17-
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.6.dev1
17+
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.7.dev1
1818
LABEL org.opencontainers.image.description "Full C-PAC image without FreeSurfer"
1919
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
2020
USER root

.github/Dockerfiles/base-ABCD-HCP.Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
FROM ghcr.io/fcp-indi/c-pac/afni:21.1.00-bionic as AFNI
33
FROM ghcr.io/fcp-indi/c-pac/ants:2.2.0.neurodocker-bionic as ANTs
44
FROM ghcr.io/fcp-indi/c-pac/c3d:1.0.0-bionic as c3d
5-
FROM ghcr.io/fcp-indi/c-pac/connectome-workbench:1.3.2-1.neurodebian-bionic as connectome-workbench
65
FROM ghcr.io/fcp-indi/c-pac/freesurfer:6.0.0-min.neurodocker-bionic as FreeSurfer
76
FROM ghcr.io/fcp-indi/c-pac/fsl:5.0.10-bionic as FSL
87
FROM ghcr.io/fcp-indi/c-pac/ica-aroma:0.4.3-beta-bionic as ICA-AROMA
@@ -43,7 +42,7 @@ COPY --from=ANTs /ants_template /ants_template
4342
# install FSL
4443
COPY --from=FSL /usr/bin/tclsh /usr/bin/tclsh
4544
COPY --from=FSL /usr/bin/wish /usr/bin/wish
46-
COPY --from=FSL /usr/share/fsl/ /usr/share/fsl/
45+
COPY --from=FSL /usr/share/fsl /usr/share/fsl
4746
COPY --from=FSL /lib/x86_64-linux-gnu/lib*so* /lib/x86_64-linux-gnu/
4847
COPY --from=FSL /usr/lib/lib*so* /usr/lib/
4948
# set up FSL environment
@@ -76,9 +75,14 @@ ENV MSMBINDIR=/opt/msm/Ubuntu \
7675
PATH=$PATH:/opt/msm/Ubuntu
7776

7877
# install Connectome Workbench
79-
COPY --from=connectome-workbench /lib64/* /lib64.
80-
COPY --from=connectome-workbench /lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/
81-
COPY --from=connectome-workbench /usr/* /usr/
78+
RUN APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC && \
79+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 && \
80+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517 && \
81+
printf '\ndeb http://httpredir.debian.org/debian/ buster main non-free' >> /etc/apt/sources.list && \
82+
apt-get update --allow-insecure-repositories && \
83+
apt-get install connectome-workbench=1.3.2-1 -y && \
84+
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
85+
ENV PATH=/usr:$PATH
8286

8387
# install ICA-AROMA
8488
COPY --from=ICA-AROMA /opt/ICA-AROMA /opt/ICA-AROMA

.github/Dockerfiles/base-standard.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
1717
FROM ghcr.io/fcp-indi/c-pac/freesurfer:6.0.0-min.neurodocker-jammy as FreeSurfer
1818

19-
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.6.dev1
19+
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.7.dev1
2020
LABEL org.opencontainers.image.description "NOT INTENDED FOR USE OTHER THAN AS A STAGE IMAGE IN A MULTI-STAGE BUILD \
2121
Standard software dependencies for C-PAC standard images"
2222
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC

.github/scripts/autoversioning.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
3+
# Copyright (C) 2024 C-PAC Developers
4+
5+
# This file is part of C-PAC.
6+
7+
# C-PAC is free software: you can redistribute it and/or modify it under
8+
# the terms of the GNU Lesser General Public License as published by the
9+
# Free Software Foundation, either version 3 of the License, or (at your
10+
# option) any later version.
11+
12+
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
13+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15+
# License for more details.
16+
17+
# You should have received a copy of the GNU Lesser General Public
18+
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
19+
20+
# Update version comment strings
21+
cd CPAC
22+
VERSION=$(python -c "from info import __version__; print(('.'.join(('.'.join(__version__[::-1].split('-')[1].split('.')[1:])[::-1], __version__.split('-')[1])) if '-' in __version__ else __version__).split('+', 1)[0])")
23+
cd ..
24+
echo "v${VERSION}" > version
25+
export _SED_COMMAND="s/^(# [Vv]ersion ).*$/# Version ${VERSION}/g"
26+
if [[ "$OSTYPE" == "darwin"* ]]; then
27+
# Mac OSX
28+
find ./CPAC/resources/configs -name "*.yml" -exec sed -i '' -E "${_SED_COMMAND}" {} \;
29+
else
30+
# Linux and others
31+
find ./CPAC/resources/configs -name "*.yml" -exec sed -i'' -r "${_SED_COMMAND}" {} \;
32+
fi
33+
git add version
34+
VERSIONS=( `git show $(git log --pretty=format:'%h' -n 2 version | tail -n 1):version` `cat version` )
35+
export PATTERN="(declare|typeset) -a"
36+
if [[ "$(declare -p VERSIONS)" =~ $PATTERN ]]
37+
then
38+
for DOCKERFILE in $(find ./.github/Dockerfiles -name "*.Dockerfile")
39+
do
40+
export IFS=""
41+
for LINE in $(grep "FROM ghcr\.io/fcp\-indi/c\-pac/.*\-${VERSIONS[0]}" ${DOCKERFILE})
42+
do
43+
echo "Updating stage tags in ${DOCKERFILE}"
44+
if [[ "$OSTYPE" == "darwin"* ]]; then
45+
# Mac OSX
46+
sed -i "" "s/\-${VERSIONS[0]}/\-${VERSIONS[1]}/g" ${DOCKERFILE}
47+
else
48+
# Linux and others
49+
sed -i "s/\-${VERSIONS[0]}/\-${VERSIONS[1]}/g" ${DOCKERFILE}
50+
fi
51+
done
52+
done
53+
unset IFS
54+
fi
55+
git add CPAC/resources/configs .github/Dockerfiles
56+
57+
# Overwrite top-level Dockerfiles with the CI Dockerfiles
58+
cp .github/Dockerfiles/C-PAC.develop-jammy.Dockerfile Dockerfile
59+
cp .github/Dockerfiles/C-PAC.develop-ABCD-HCP-bionic.Dockerfile variant-ABCD-HCP.Dockerfile
60+
cp .github/Dockerfiles/C-PAC.develop-fMRIPrep-LTS-xenial.Dockerfile variant-fMRIPrep-LTS.Dockerfile
61+
cp .github/Dockerfiles/C-PAC.develop-lite-jammy.Dockerfile variant-lite.Dockerfile
62+
git add *Dockerfile

.github/workflows/on_push.yml

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -35,77 +35,8 @@ jobs:
3535
uses: actions/checkout@v3
3636
with:
3737
fetch-depth: 2
38-
- uses: actions/setup-python@v4
39-
with:
40-
python-version: '3.9'
41-
cache: 'pip'
42-
- name: Check if version updated
43-
id: version_updated
44-
run: |
45-
git config --global user.email "[email protected]"
46-
git config --global user.name "Theodore (Machine User)"
47-
GITHUB_BRANCH=$(echo ${GITHUB_REF} | cut -d '/' -f 3-)
48-
export PYTHONPATH=$PWD
49-
pip install -q wheel
50-
pip install -q nipype numpy matplotlib pandas pathvalidate pytz pyyaml voluptuous
51-
python ./CPAC/utils/configuration/yaml_template.py
52-
if [[ ! -z $(git diff origin/${GITHUB_BRANCH}) ]]
53-
then
54-
git add CPAC/resources/configs
55-
git commit -m ":bulb: Update comments based on default preconfig"
56-
fi
57-
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
58-
if [[ ! "$COMMIT_MESSAGE" == *"Update version to"* ]]
59-
then
60-
cd CPAC
61-
VERSION=$(python -c "from info import __version__; print(('.'.join(('.'.join(__version__[::-1].split('-')[1].split('.')[1:])[::-1], __version__.split('-')[1])) if '-' in __version__ else __version__).split('+', 1)[0])")
62-
cd ..
63-
echo "v${VERSION}" > version
64-
find ./CPAC/resources/configs -name "*.yml" -exec sed -i -r "s/^(# [Vv]ersion ).*$/# Version ${VERSION}/g" {} \;
65-
git add version
66-
VERSIONS=($(git diff origin/${GITHUB_BRANCH} -- version | tail -n 2))
67-
export PATTERN="(declare|typeset) -a"
68-
if [[ "$(declare -p VERSIONS)" =~ $PATTERN ]]
69-
then
70-
for DOCKERFILE in $(find ./.github/Dockerfiles -name "*.Dockerfile")
71-
do
72-
export IFS=""
73-
for LINE in $(grep "FROM ghcr\.io/fcp\-indi/c\-pac/.*\-${VERSIONS[0]:1}" ${DOCKERFILE})
74-
do
75-
echo "Updating stage tags in ${DOCKERFILE}"
76-
sed -i "s/\-${VERSIONS[0]:1}/\-${VERSIONS[1]:1}/g" ${DOCKERFILE}
77-
done
78-
done
79-
unset IFS
80-
fi
81-
if [[ ! -z $(git diff origin/${GITHUB_BRANCH}) ]]
82-
then
83-
git add CPAC/resources/configs .github/Dockerfiles
84-
git commit -m ":bookmark: Update version to ${VERSION} ($COMMIT_MESSAGE)" || true
85-
git push origin HEAD:${GITHUB_BRANCH} || true
86-
fi
87-
cd ..
88-
fi
89-
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]
90-
then
91-
cd $HOME/work/C-PAC/C-PAC
92-
for DOCKERFILE in $(ls .github/Dockerfiles/C-PAC.develop-*.Dockerfile)
93-
do
94-
if [[ "$DOCKERFILE" =~ .*C-PAC.develop-(.*)-(bionic|xenial).Dockerfile ]]
95-
then
96-
cp $DOCKERFILE variant-${BASH_REMATCH[1]}.Dockerfile
97-
else
98-
cp $DOCKERFILE Dockerfile
99-
fi
100-
done
101-
git add *ockerfile
102-
git commit -m ":truck: Copy develop Dockerfiles to root directory \
103-
\
104-
[skip ci]"
105-
git push origin HEAD:${GITHUB_BRANCH} || true
106-
fi
10738
- name: Get changed files since last commit
108-
uses: tj-actions/changed-files@v35.7.6
39+
uses: tj-actions/changed-files@v41.0.0
10940
id: changed-files
11041
with:
11142
since_last_remote_commit: "true"

.markdownlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ MD013: false
2020
# no duplicate headers
2121
MD024:
2222
siblings_only: true
23+
# allow specific inline HTML elements
24+
MD033:
25+
allowed_elements:
26+
- span

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (C) 2024 C-PAC Developers
2+
3+
# This file is part of C-PAC.
4+
5+
# C-PAC is free software: you can redistribute it and/or modify it under
6+
# the terms of the GNU Lesser General Public License as published by the
7+
# Free Software Foundation, either version 3 of the License, or (at your
8+
# option) any later version.
9+
10+
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
11+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13+
# License for more details.
14+
15+
# You should have received a copy of the GNU Lesser General Public
16+
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
17+
18+
repos:
19+
- repo: local
20+
hooks:
21+
- id: autoversioning
22+
name: Update Dockerfiles and version comments
23+
entry: .github/scripts/autoversioning.sh
24+
language: script
25+
files: '.*Dockerfile$|.*\.yaml$|^CPAC/info\.py$'
26+
- id: update-yaml-comments
27+
name: Update YAML comments
28+
entry: CPAC/utils/configuration/yaml_template.py
29+
language: python
30+
files: '^CPAC/resources/configs/pipeline_config_.*\.ya?ml'
31+
additional_dependencies:
32+
- "click"
33+
- "nipype"
34+
- "pathvalidate"
35+
- "pyyaml"
36+
- "voluptuous"

0 commit comments

Comments
 (0)