Skip to content

Commit 4aff0de

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pre-commit-ci-update-config
2 parents baa2712 + de1344d commit 4aff0de

File tree

7 files changed

+86
-34
lines changed

7 files changed

+86
-34
lines changed

.github/workflows/docker.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,6 @@ env:
1818
FORCE_COLOR: true
1919

2020
jobs:
21-
check-pixi:
22-
runs-on: ubuntu-latest
23-
permissions:
24-
contents: read
25-
steps:
26-
- name: Checkout repository
27-
uses: actions/checkout@v5
28-
with:
29-
fetch-depth: 200
30-
fetch-tags: true
31-
ref: ${{ github.ref }}
32-
- uses: prefix-dev/[email protected]
33-
with:
34-
pixi-version: v0.55.0
35-
run-install: false
36-
- run: pixi lock --check
37-
3821
build-container:
3922
runs-on: ubuntu-latest
4023
permissions:

.github/workflows/pixi-lock.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
on:
2+
pull_request_target
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
7+
8+
jobs:
9+
check-lockfile:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout pull request
15+
uses: actions/checkout@v5
16+
with:
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
fetch-depth: 0
20+
- name: Find submitting repository
21+
id: get-source-repo
22+
uses: actions/github-script@v8
23+
env:
24+
OWNER: ${{ github.repository_owner }}
25+
REPO: ${{ github.repository }}
26+
PULL: ${{ github.event.number }}
27+
with:
28+
script: |
29+
const { data } = await github.rest.pulls.get({
30+
owner: process.env.OWNER,
31+
repo: process.env.REPO.split('/')[1],
32+
pull_number: process.env.PULL,
33+
});
34+
core.setOutput('remote', data.head.repo.html_url)
35+
core.setOutput('branch', data.head.ref)
36+
- name: Set git identity
37+
run: |
38+
git config --global user.name "nipreps[bot]"
39+
git config --global user.email "[email protected]"
40+
- uses: prefix-dev/[email protected]
41+
with:
42+
pixi-version: v0.58.0
43+
run-install: false
44+
- name: Install the latest version of uv
45+
uses: astral-sh/setup-uv@v7
46+
- name: Update lockfile
47+
run: >
48+
uvx datalad run -i pixi.lock -i pyproject.toml -o pixi.lock --
49+
bash -c '! pixi lock --check || git checkout .'
50+
- name: Push updated lockfile, if needed
51+
run: |
52+
git push $REMOTE HEAD:$BRANCH
53+
env:
54+
REMOTE: ${{ steps.get-source-repo.outputs.remote }}
55+
BRANCH: ${{ steps.get-source-repo.outputs.branch }}

fmriprep/interfaces/multiecho.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ class T2SMapInputSpec(CommandLineInputSpec):
6868
'monoexponential model is fit to the raw data.'
6969
),
7070
)
71+
n_exclude = traits.Int(
72+
argstr='--exclude 0:%d',
73+
position=5,
74+
desc='Number of volumes from the beginning of the run to exclude from T2*/S0 estimation.',
75+
)
7176

7277

7378
class T2SMapOutputSpec(TraitedSpec):

fmriprep/workflows/bold/fit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,10 @@ def init_bold_native_wf(
981981
# Do NOT set motion_xfm on outputnode
982982
# This prevents downstream resamplers from double-dipping
983983
workflow.connect([
984-
(inputnode, bold_t2s_wf, [('bold_mask', 'inputnode.bold_mask')]),
984+
(inputnode, bold_t2s_wf, [
985+
('bold_mask', 'inputnode.bold_mask'),
986+
('dummy_scans', 'inputnode.skip_vols'),
987+
]),
985988
(boldref_bold, join_echos, [('out_file', 'bold_files')]),
986989
(join_echos, bold_t2s_wf, [('bold_files', 'inputnode.bold_file')]),
987990
(join_echos, outputnode, [('bold_files', 'bold_echos')]),

fmriprep/workflows/bold/t2s.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ def init_bold_t2s_wf(
107107
The optimally combined time series was carried forward as the *preprocessed BOLD*.
108108
"""
109109

110-
inputnode = pe.Node(niu.IdentityInterface(fields=['bold_file', 'bold_mask']), name='inputnode')
110+
inputnode = pe.Node(
111+
niu.IdentityInterface(fields=['bold_file', 'bold_mask', 'skip_vols']),
112+
name='inputnode',
113+
)
111114

112115
outputnode = pe.Node(niu.IdentityInterface(fields=['bold', 't2star_map']), name='outputnode')
113116

@@ -122,7 +125,10 @@ def init_bold_t2s_wf(
122125
)
123126
workflow.connect([
124127
(inputnode, dilate_mask, [('bold_mask', 'in_mask')]),
125-
(inputnode, t2smap_node, [('bold_file', 'in_files')]),
128+
(inputnode, t2smap_node, [
129+
('bold_file', 'in_files'),
130+
('skip_vols', 'n_exclude'),
131+
]),
126132
(dilate_mask, t2smap_node, [('out_mask', 'mask_file')]),
127133
(t2smap_node, outputnode, [('optimal_comb', 'bold'),
128134
('t2star_map', 't2star_map')]),

pixi.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies = [
3636
"requests >= 2.27",
3737
"sdcflows >= 2.15.0",
3838
"smriprep >= 0.19.2",
39-
"tedana >= 25.0.0",
39+
"tedana >= 25.1.0",
4040
"templateflow >= 24.2.2",
4141
"transforms3d >= 0.4.2",
4242
"toml >= 0.10",

0 commit comments

Comments
 (0)