Skip to content

Commit 1d91073

Browse files
committed
🔀 Merge develop into fix/distcorelif
2 parents 7d06aa6 + a938dc4 commit 1d91073

Some content is hidden

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

55 files changed

+5574
-3769
lines changed

.github/Dockerfiles/Ubuntu.bionic-non-free.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ RUN groupadd -r c-pac && \
107107
libxp-dev && \
108108
add-apt-repository --remove --yes ppa:zeehio/libxp && \
109109
apt-get update && \
110-
curl -sO https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh && \
111-
bash Miniconda3-py37_4.8.2-Linux-x86_64.sh -b -p /usr/local/miniconda && \
112-
rm Miniconda3-py37_4.8.2-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda && \
110+
curl -sO https://repo.anaconda.com/miniconda/Miniconda3-py37_4.12.0-Linux-x86_64.sh && \
111+
bash Miniconda3-py37_4.12.0-Linux-x86_64.sh -b -p /usr/local/miniconda && \
112+
rm Miniconda3-py37_4.12.0-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda && \
113113
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
114114
echo $TZ > /etc/timezone && \
115115
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \

.github/Dockerfiles/Ubuntu.xenial-20200114.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ RUN apt-get update && \
120120
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
121121

122122
# Installing and setting up miniconda
123-
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh && \
124-
bash Miniconda3-4.5.11-Linux-x86_64.sh -b -p /usr/local/miniconda && \
125-
rm Miniconda3-4.5.11-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda
123+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-py37_4.12.0-Linux-x86_64.sh && \
124+
bash Miniconda3-py37_4.12.0-Linux-x86_64.sh -b -p /usr/local/miniconda && \
125+
rm Miniconda3-py37_4.12.0-Linux-x86_64.sh && chmod -R 777 /usr/local/miniconda
126126

127127
# Set CPATH for packages relying on compiled libs (e.g. indexed_gzip)
128128
ENV PATH="/usr/local/miniconda/bin:$PATH" \

.github/scripts/get_package_id.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111

1212
def get_packages(owner, tag, api_token=None):
1313
"""Function to collect GHCR packages for a given owner & tag
14-
14+
1515
Parameters
1616
----------
1717
owner : str
1818
username or org name
19-
19+
2020
tag : str
2121
image tag (part left of the colon)
2222
2323
api_token : str or None
2424
GitHub API personal access token with read.packages permission
25-
25+
2626
Returns
2727
-------
2828
list
@@ -32,11 +32,11 @@ def get_packages(owner, tag, api_token=None):
3232

3333
def fetch(url):
3434
"""Method to make API call and return response, given a URL
35-
35+
3636
Parameters
3737
----------
3838
url : str
39-
39+
4040
Returns
4141
-------
4242
dict or list
@@ -59,34 +59,36 @@ def fetch(url):
5959
'$VERSION_TAG $GITHUB_TOKEN`'
6060
]))
6161
return response
62-
packages = fetch(
62+
_packages = fetch(
6363
f'https://api.github.com/orgs/{owner}/packages/container/'
6464
f'{tag}/versions')
65-
if packages.get('message', 'Not Found') == 'Not Found':
66-
packages = fetch(
67-
f'https://api.github.com/users/{owner}/packages/container/'
68-
f'{tag}/versions')
65+
packages = []
66+
for _package in _packages:
67+
if _package.get('message', 'Not Found') == 'Not Found':
68+
packages += fetch(
69+
f'https://api.github.com/users/{owner}/packages/container/'
70+
f'{tag}/versions')
6971
return packages
7072

7173

7274
def id_from_tag(owner, image, tag, api_token=None):
7375
"""Function to return a package ID given an image version tag
74-
76+
7577
Parameters
7678
----------
7779
owner : str
7880
GitHub username or org name
79-
81+
8082
image : str
8183
Image tag (the part to the left of the colon)
82-
84+
8385
tag : str
8486
Image version tag (the part to the right of the colon)
8587
8688
api_token: str or None
8789
GitHub API personal access token with read.packages permission
8890
"""
89-
packages = get_packages(owner, image)
91+
packages = get_packages(owner, image, api_token)
9092
versions = [image['id'] for image in packages if tag in image.get(
9193
'metadata', {}
9294
).get('container', {}).get('tags', [])]

.github/workflows/build_stages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}/$TAG" | tr '[:upper:]' '[:lower:]')
6767
echo DOCKER_TAG=$DOCKER_TAG >> $GITHUB_ENV
6868
docker manifest inspect $DOCKER_TAG >/dev/null
69-
echo "::set-output name=not_yet_exists::$?"
69+
echo "not_yet_exists=$?" >> $GITHUB_OUTPUT
7070
- name: Set up Docker Buildx
7171
uses: docker/[email protected]
7272
if: contains(steps.changed-files-base.outputs.all_changed_files, matrix.Dockerfile) || contains(steps.changed-files.outputs.all_changed_files, matrix.Dockerfile)
@@ -156,7 +156,7 @@ jobs:
156156
DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}/$TAG" | tr '[:upper:]' '[:lower:]')
157157
echo DOCKER_TAG=$DOCKER_TAG >> $GITHUB_ENV
158158
docker manifest inspect $DOCKER_TAG >/dev/null
159-
echo "::set-output name=not_yet_exists::$?"
159+
echo "not_yet_exists=$?" >> $GITHUB_OUTPUT
160160
if: contains(steps.changed-files-base.outputs.all_changed_files, matrix.Dockerfile) || contains(steps.changed-files.outputs.all_changed_files, matrix.Dockerfile)
161161
- name: Prep Dockerfiles for forked repository
162162
if: github.repository_owner != 'FCP-INDI' && contains(steps.changed-files-base.outputs.all_changed_files, matrix.Dockerfile) || contains(steps.changed-files.outputs.all_changed_files, matrix.Dockerfile)
@@ -230,7 +230,7 @@ jobs:
230230
DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}/$TAG" | tr '[:upper:]' '[:lower:]')
231231
echo DOCKER_TAG=$DOCKER_TAG >> $GITHUB_ENV
232232
docker manifest inspect $DOCKER_TAG >/dev/null
233-
echo "::set-output name=not_yet_exists::$?"
233+
echo "not_yet_exists=$?" >> $GITHUB_OUTPUT
234234
id: docker_tag
235235
- name: Clear up some space on runner
236236
if: always() && steps.changed-files-base.outputs.any_changed == 'true' || steps.changed-files.outputs.any_changed == 'true' || steps.docker_tag.not_yet_exists == 1

.github/workflows/check_updated_version.yml renamed to .github/workflows/check_updated_preconfigs.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
name: Check updated version
1+
name: Check updated preconfigs
22

33
on:
44
pull_request_target:
55
types: [edited, opened, reopened, ready_for_review, synchronize]
66
push:
77

88
jobs:
9-
check-updated-version:
10-
name: Check if version updated
9+
check-updated-preconfigs:
10+
name: Check if preconfigs need updated
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check out C-PAC
1414
uses: actions/checkout@v2
1515
with:
1616
fetch-depth: 2
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.9'
20+
cache: 'pip'
1721
- name: Check if version updated
1822
run: |
1923
git config --global user.email "[email protected]"
@@ -37,6 +41,14 @@ jobs:
3741
[skip ci]"
3842
git push origin HEAD:${GITHUB_BRANCH} || true
3943
fi
44+
export PYTHONPATH=$PWD
45+
pip install nipype numpy matplotlib pandas pathvalidate pytz pyyaml voluptuous yamlordereddictloader
46+
python ./CPAC/utils/configuration/yaml_template.py
47+
if [[ ! -z $(git diff origin/${GITHUB_BRANCH}) ]]
48+
then
49+
git add CPAC/resources/configs
50+
git commit -m ":bulb: Update comments based on default preconfig"
51+
fi
4052
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
4153
if [[ ! "$COMMIT_MESSAGE" == *"Update version to"* ]]
4254
then
@@ -48,14 +60,14 @@ jobs:
4860
git add version CPAC/resources/configs
4961
if [[ ! -z $(git diff origin/${GITHUB_BRANCH}) ]]
5062
then
51-
git commit -m ":bookmark: Update version to ${VERSION} ($COMMIT_MESSAGE)"
63+
git commit -m ":bookmark: Update version to ${VERSION} ($COMMIT_MESSAGE)" || true
5264
git push origin HEAD:${GITHUB_BRANCH} || true
5365
fi
5466
cd ..
5567
fi
5668
5769
trigger-next-workflow:
58-
needs: check-updated-version
70+
needs: check-updated-preconfigs
5971
runs-on: ubuntu-latest
6072
steps:
6173
- name: Set up check

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3434
- Added crash messages from during and before graph building to logs
3535
- Added data-config-specific hash string to C-PAC-generated config files
3636
- Updated `rbc-options` preconfig to use `fmriprep-options` preprocessing
37+
- Changed minimized pipeline base from `default` to `blank`
3738

3839
### Fixed
40+
- Fixed [a bug](https://github.com/FCP-INDI/C-PAC/issues/1779) in which generated pipeline configs were not 100% accurate. The only affected configurable option discovered in testing was seed-based correlation analysis always reverting to the default configuration.
3941
- Fixed [bug](https://github.com/FCP-INDI/C-PAC/issues/1795) that was causing `cpac run` to fail when passing a manual random seed via `--random_seed`.
4042
- Replaces ``DwellTime`` with ``EffectiveEchoSpacing`` for FSL usage of the term
4143
- Fixed an issue that was causing some epi field maps to not be ingressed if the BIDS tags were not in the correct order.

CPAC/alff/alff.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ def alff_falff(wf, cfg, strat_pool, pipe_num, opt=None):
246246
"switch": ["run"],
247247
"option_key": "None",
248248
"option_val": "None",
249-
"inputs": [["desc-denoisedNofilt_bold", "desc-brain_bold",
250-
"desc-preproc_bold", "bold"],
249+
"inputs": ["desc-denoisedNofilt_bold",
251250
"space-bold_desc-brain_mask"],
252251
"outputs": ["alff",
253252
"falff"]}
@@ -262,8 +261,7 @@ def alff_falff(wf, cfg, strat_pool, pipe_num, opt=None):
262261
alff.get_node('hp_input').iterables = ('hp', alff.inputs.hp_input.hp)
263262
alff.get_node('lp_input').iterables = ('lp', alff.inputs.lp_input.lp)
264263

265-
node, out = strat_pool.get_data(["desc-denoisedNofilt_bold", "desc-brain_bold",
266-
"desc-preproc_bold", "bold"])
264+
node, out = strat_pool.get_data("desc-denoisedNofilt_bold")
267265
wf.connect(node, out, alff, 'inputspec.rest_res')
268266

269267
node, out = strat_pool.get_data('space-bold_desc-brain_mask')

0 commit comments

Comments
 (0)