Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
093309f
brainprep/_version: set version to 2.1.0.dev.
AGrigis Apr 1, 2026
573528b
brainprep/workflow: start adding morphologist.
AGrigis Apr 1, 2026
560dcbf
Merge branch 'dev' of https://github.com/brainprepdesk/brainprep into…
AGrigis Apr 1, 2026
fc54e6f
README: fix badge.
AGrigis Apr 1, 2026
12ecd39
containers/Dockerfile.quasiraw: rm freesurfer & add SynthStrip
nasironeeb Apr 8, 2026
eee472e
Replace "worflow" by "workflow"
AymericGaudin Apr 10, 2026
456aef4
brainprep/tools/scaling: brainprep command line corrections
AymericGaudin Apr 10, 2026
c14f40d
brainprep/wrappers: print subprocess stdout live.
AGrigis Apr 10, 2026
357a7cf
brainprep/workflow/sulcire: add morphologists workflows.
AGrigis Apr 10, 2026
6495372
brainprep/decorators: add and apply signature hook.
AGrigis Apr 10, 2026
56491f6
brainprep: fix CI.
AGrigis Apr 10, 2026
06dafed
brainprep/tools/scaling: replace relative path by absolute in pre-par…
AymericGaudin Apr 10, 2026
34930a3
brainprep/tools: ruff check
AymericGaudin Apr 10, 2026
7b8c4a1
CHANGELOG: update.
AGrigis Apr 10, 2026
f930455
brainprep/interfaces/utils: Correct error when calling sed
AymericGaudin Apr 14, 2026
a1e426b
brainprep/interfaces/utils: move run mapping file.
AGrigis Apr 15, 2026
56296c4
Merge pull request #52 from AymericGaudin/cat12
AGrigis Apr 15, 2026
7abd745
Merge pull request #50 from AymericGaudin/scaling
AGrigis Apr 15, 2026
2d693c3
Merge branch 'dev' of https://github.com/brainprepdesk/brainprep into…
AGrigis Apr 15, 2026
c3af449
tools/scaling/scaling_cli: use pathlib rather than os.
AGrigis Apr 15, 2026
8247a4d
Merge pull request #51 from nasironeeb/dev_dockerfile
AGrigis Apr 15, 2026
aca2a11
Merge branch 'dev' of https://github.com/brainprepdesk/brainprep into…
AGrigis Apr 15, 2026
b1c246b
containers/Dockerfile.quasiraw: reorganize instructions.
AGrigis Apr 15, 2026
9c53282
doc/user_guide/vbm: fix QC documentation.
AGrigis Apr 16, 2026
ffc115d
brainprep/decorators: add module name in signature hook.
AGrigis Apr 16, 2026
1fda11e
tools/scaling/scaling_cli: add timepoint filter for longitudinal anal…
AGrigis Apr 16, 2026
9f460f7
containers/Dockerfile: fix FreeSurfer SynthStrip install.
AGrigis Apr 16, 2026
1480b6d
fix: handle None timepoints in collect_config
nasironeeb Apr 16, 2026
4e46caa
Merge pull request #53 from nasironeeb/dev
AGrigis Apr 17, 2026
d59ba11
tools/scaling/scaling_cli: remove subject from the selection.
AGrigis Apr 17, 2026
0be3660
brainprep/interfaces/cat12: create session folders in longitudinal vbm
AymericGaudin Apr 21, 2026
18cf5d2
brainprep/interfaces/cat12: Look for the right output files in the lo…
AymericGaudin Apr 21, 2026
9a44366
Merge pull request #54 from AymericGaudin/vbm_long
AGrigis Apr 22, 2026
3bbb5d0
Merge branch 'dev' of https://github.com/brainprepdesk/brainprep into…
AGrigis Apr 22, 2026
72c1ed8
brainprep/interfaces/freesurfer: replace np.in1d with np.isin for Num…
nasironeeb Apr 27, 2026
aba2b65
brainprep/wrappers: redirect stderr to stdout.
AGrigis Apr 30, 2026
5459112
brainprep/decorators: move print command location.
AGrigis Apr 30, 2026
b97dc24
brainprep/interfaces/cat12: code refactoring.
AGrigis Apr 30, 2026
9c53119
brainprep/decorators: log all executed commands.
AGrigis Apr 30, 2026
a1f32bd
brainprep/workflow: fix workspace name conflicts.
AGrigis Apr 30, 2026
8f0e5eb
brainprep/cli: add interface CLI.
AGrigis May 7, 2026
2820b3f
brainprep/workflow/dmriprep: add dMRI preprocessing workflow.
AGrigis May 7, 2026
6d7380b
examples/workflows: add clear working directory.
AGrigis May 7, 2026
5a47a3b
brainprep/config: add dMRI preprocessing config options.
AGrigis May 7, 2026
b8938fe
pyproject: check for unused imports.
AGrigis May 7, 2026
4d7c4a8
brainprep/cli: adapt the code so that any interface can be called fro…
AGrigis May 12, 2026
1bb1e55
containers/Dockerfile.dmriprep: add container creation draft.
AGrigis May 12, 2026
2bdc3a1
brainprep: fix CI.
AGrigis May 12, 2026
9f5a24d
Merge pull request #55 from nasironeeb/dev
AGrigis May 12, 2026
e9f7f43
brainprep/interfaces/fmriprep: fix fmriprep parameters + output names.
AGrigis Jul 10, 2026
f43ae9a
faster quasiraw pipeline + mask interpolation fixed
Duplums Jul 22, 2026
a038ac5
Merge branch 'fast-quasiraw' of https://github.com/Duplums/brainprep …
AGrigis Aug 3, 2026
50ea94a
brainprep/workflow/quasiraw: add a 'quick' option to speed up process…
AGrigis Aug 3, 2026
9750dfe
brainprep: fix pydoclint CI.
AGrigis Aug 3, 2026
6f04598
brainprep/interfaces/freesurfer: write the brain file to disk.
AGrigis Aug 4, 2026
cd76f3e
brainprep/workflow/defacing: update new brainmask interface.
AGrigis Aug 4, 2026
18269b5
brainprep/interfaces/fsl: allow rigid body alignment.
AGrigis Aug 4, 2026
0646471
brainprep/workflow/quasiraw: refactor workflow + use 2mm space for qu…
AGrigis Aug 4, 2026
9b721f5
doc/user_guide/quasiraw: update documentation.
AGrigis Aug 4, 2026
23d4e93
brainprep/resources/MNI152_T1_2mm_brain: add template in 2mm space.
AGrigis Aug 4, 2026
49656ed
brainprep/tests/test_workflow: fix interface testing.
AGrigis Aug 4, 2026
7f5a8d3
brainprep/workflow/quasiraw: return unmasked image.
AGrigis Aug 5, 2026
dad6f0b
brainprep/tests/test_workflow: remove slow interface testing.
AGrigis Aug 5, 2026
3b115ba
brainprep/workflow/quasiraw: support T2w and FLAIR modalities in Quas…
AGrigis Aug 5, 2026
5e78d5a
brainprep/workflow/defacing: add T2w and FLAIR support in defacing wo…
AGrigis Aug 7, 2026
74b368c
brainprep/tests: clear rst report before each test.
AGrigis Aug 7, 2026
7c8d76d
brainprep/workflow/defacing: fix enum.
AGrigis Aug 7, 2026
988a688
Merge pull request #60 from Duplums/fast-quasiraw
AGrigis Aug 7, 2026
9d38683
brainprep/workflow/quasiraw: fix parameters.
AGrigis Aug 21, 2026
1dc7f5c
brainprep/workflow/reporting: add reproting workflow.
AGrigis Aug 21, 2026
92eadd8
brainprep/interfaces: reorganize interfaces.
AGrigis Aug 24, 2026
cdf1e03
brainprep/interfaces/fmriprep: deal with sbref.
AGrigis Aug 25, 2026
e078adb
doc: update documentation.
AGrigis Aug 25, 2026
6582902
containers: Update morphologist version
AymericGaudin Aug 27, 2026
564a7a4
tools/scaling/scaling_cli: fix bugs + add longitudinal option.
AGrigis Aug 27, 2026
a4c4e37
tools/build: run 'examples' tests localy using apptainer.
AGrigis Aug 27, 2026
957cc01
tools/build: fix execution commands.
AGrigis Aug 27, 2026
230522e
Merge pull request #62 from AymericGaudin/update-morphologist
AGrigis Aug 27, 2026
98ebe7e
brainprep/workflow/dmriprep: add synb0 support.
AGrigis Sep 17, 2026
2e371bf
tools/build/build_images: use apptainer command.
AGrigis Sep 17, 2026
9f9e9c3
brainprep/interfaces/synb0disco: add synb0 interface.
AGrigis Sep 17, 2026
9842672
brainprep/_version: update version.
AGrigis Sep 17, 2026
4ae4b72
github/workflows: bump actions.
AGrigis Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Codespell
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
echo "DEPLOY_TYPE=pr" >> $GITHUB_OUTPUT
fi
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
cache: "pip"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pycodestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pydoclint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
shell: bash
run: echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
cache: "pip"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# .. code-block:: bash
#
# $ nosetests --with-coverage --cover-package=brainprep --verbosity=2
# --with-doctest --doctest-options='+ELLIPSIS,+NORMALIZE_WHITESPACE'
###
name: "testing[nosetests]"

Expand Down Expand Up @@ -34,11 +33,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand All @@ -48,7 +47,7 @@ jobs:
python -m pip install --progress-bar off ".[ci]"
- name: Run unit tests
run: |
nosetests --with-coverage --cover-package=brainprep --verbosity=2 --with-doctest --doctest-options='+ELLIPSIS,+NORMALIZE_WHITESPACE'
nosetests --with-coverage --cover-package=brainprep --verbosity=2
- name: Coveralls
if: matrix.python-version == 3.12
env:
Expand Down
67 changes: 45 additions & 22 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.. -*- mode: rst -*-

2.1.0.dev

2.2.0.dev
=========

HIGHLIGHTS
Expand All @@ -9,36 +10,69 @@ HIGHLIGHTS
NEW
---

Fixes
-----

Enhancements
------------

Changes
-------


2.1.0
=====

HIGHLIGHTS
----------

This release optimizes existing or introduces new workflows. Please review
the modifications below.

NEW
---

- :bdg-success:`Enhancement` Add the dmriprep workflow.
- :bdg-success:`Enhancement` Add the tbss workflow.
- :bdg-success:`Enhancement` Add the mrophologist workflow.
- :bdg-success:`Enhancement` Add the morphologist workflow.

Fixes
-----

- :bdg-danger:`Deprecation` Fix the containers that are using `mri_synthstrip`.
- :bdg-danger:`Deprecation` The run mapping file has been moved to avoid
conflicts with FreeSurfer.

Enhancements
------------

- :bdg-success:`Enhancement` Add signature hook.
- :bdg-success:`Enhancement` Add live comand line monitoring support.
- :bdg-success:`Enhancement` Support multi-modality in Quasi-Raw workflow.
- :bdg-success:`Enhancement` Add `quick` mode in Quasi-Raw workflow.
- :bdg-success:`Enhancement` Support multi-modality in Deface workflow.

Changes
-------

- :bdg-danger:`Deprecation` Optimize the Quasi-Raw workflow steps.


2.0.0
=====

HIGHLIGHTS
----------

his is a major release featuring significant changes to both the API and
This is a major release featuring significant changes to both the API and
CLI. Please review the modifications below.

NEW
---

- :bdg-success:`Doc` Create doc with `furo <https://github.com/pradyunsg/furo>`_.
- :bdg-success:`Enhancement` Worflows generate a report file.
- :bdg-success:`Enhancement` Workflows generate a report file.
- :bdg-success:`Enhancement` Anonymize workflow outputs.
- :bdg-success:`Enhancement` Worflows generate BIDS-compliant organization.
- :bdg-success:`Enhancement` workflows generate BIDS-compliant organization.
- :bdg-success:`Enhancement` New workflows can generate HTML reporting.
- :bdg-success:`Datasets` Toy datasets have been added to test the module.
- :bdg-success:`Enhancement` Quasi-RAW preprocessing compute the brain mask
Expand Down Expand Up @@ -82,19 +116,18 @@ Changes
0.0.2
=====

**Released September 2022**

HIGHLIGHTS
----------

- :bdg-success:`API` This release includes different workflows to process
antomical, functional and diffusion MR images.
- :bdg-success:`API` All workflows are integrated in a dedicated container
to enforce reproducible research.
This is the legacy release of brainprep.

NEW
---

- :bdg-success:`API` This release includes different workflows to process
antomical, functional and diffusion MR images.
- :bdg-success:`API` All workflows are integrated in a dedicated container
to enforce reproducible research.
- :bdg-success:`API` The following workflows are released:

* fsreconall
Expand All @@ -114,13 +147,3 @@ NEW
* tbss-preproc
* tbss
* dmriprep

Fixes
-----

Enhancements
------------

Changes
-------

12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@

**Development**

.. image:: https://coveralls.io/repos/brainprepdesk/brainprep/badge.svg?branch=dev&service=github
.. image:: https://coveralls.io/repos/brainprepdesk/brainprep/badge.svg?service=github
:target: https://coveralls.io/github/brainprepdesk/brainprep
:alt: Coveralls

.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/testing.yml/badge.svg?branch=dev
.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/testing.yml/badge.svg
:target: https://github.com/brainprepdesk/brainprep/actions
:alt: Testing Status

.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/pycodestyle.yml/badge.svg?branch=dev
.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/pycodestyle.yml/badge.svg
:target: https://github.com/brainprepdesk/brainprep/actions
:alt: PyCodeStyle

.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/ruff.yml/badge.svg?branch=dev
.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/ruff.yml/badge.svg
:target: https://github.com/brainprepdesk/brainprep/actions
:alt: Ruff Linter

.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/pydoclint.yml/badge.svg?branch=dev
.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/pydoclint.yml/badge.svg
:target: https://github.com/brainprepdesk/brainprep/actions
:alt: PyDocLint

.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/documentation.yml/badge.svg?branch=dev
.. image:: https://github.com/brainprepdesk/brainprep/actions/workflows/documentation.yml/badge.svg
:target: https://brainprepdesk.github.io/brainprep
:alt: Documentation Status

Expand Down
2 changes: 1 addition & 1 deletion brainprep/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.0"
__version__ = "2.1.0"
73 changes: 69 additions & 4 deletions brainprep/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@

import fire

import brainprep.interfaces as interfaces
import brainprep.workflow as wf
from brainprep.config import DEFAULT_OPTIONS
from brainprep.utils import coerce_to_list


def make_wrapped(
fn: Callable,
is_vbm: bool = False) -> Callable:
is_vbm: bool = False,
is_dmriprep: bool = False,
is_interface: bool = False) -> Callable:
"""
Wrap a workflow function and extend its signature with global
configuration parameters.
Expand All @@ -54,8 +58,18 @@ def make_wrapped(
If ``False`` (default), VBM-specific configuration parameters
such as ``cat12_file``, ``spm12_dir``, ``matlab_dir``,
``tpm_file``, and ``darteltpm_file`` are excluded from the
generated signature. If ``True``, all configuration parameters
generated signature. If ``True``, all these configuration parameters
are included. Default False.
is_dmriprep : bool
Whether the wrapped function corresponds to a dMRIprep workflow.
If ``False`` (default), dMRIprep-specific configuration parameters
such as ``mni_2iso_file``, and ``geolab_atlas_dir`` are excluded from
the generated signature. If ``True``, all these configuration parameters
are included. Default False.
is_interface : bool
Whether the wrapped function corresponds to a brainprep interface.
If ``True``, the ``dryrun`` configuration parameters is excluded from
the generated signature. Default False.

Returns
-------
Expand Down Expand Up @@ -83,17 +97,54 @@ def wrapped_fn(*args, **kwargs):
for key in DEFAULT_OPTIONS
if key in kwargs
}

sig = inspect.signature(fn)
args = list(args)
for idx, param in enumerate(sig.parameters.values()):
if param.name == "entities":
if param.kind in (
param.POSITIONAL_ONLY,
param.POSITIONAL_OR_KEYWORD):
val = coerce_to_list(args[idx], list[str])
if len(val) == 1:
val = val[0]
args[idx] = (
[
dict(
item_text.split("-")
for item_text in dict_text.split("_")
)
for dict_text in val
]
if isinstance(val, list)
else dict(
item_text.split("-")
for item_text in val.split("_")
)
)
break
args = tuple(args)

with Config(**config_params):
return fn(*args, **kwargs)

sig = inspect.signature(fn)
kwargs_in_keys = "kwargs" in sig.parameters
params = list(sig.parameters.values())
if is_interface:
params = [
param
for param in params
if param.name != "dryrun"
]
for key, val in DEFAULT_OPTIONS.items():
if not is_vbm and key in (
if not is_interface and not is_vbm and key in (
"cat12_file", "spm12_dir", "matlab_dir", "tpm_file",
"darteltpm_file"):
continue
if not is_interface and not is_dmriprep and key in (
"mni_2iso_file", "geolab_atlas_dir"):
continue
param = inspect.Parameter(
key,
inspect.Parameter.KEYWORD_ONLY,
Expand Down Expand Up @@ -149,7 +200,21 @@ def main():
"group-level-vbm": wf.brainprep_group_vbm,
"subject-level-fmriprep": wf.brainprep_fmriprep,
"group-level-fmriprep": wf.brainprep_group_fmriprep,
"subject-level-sulcirec": wf.brainprep_sulcirec,
"group-level-sulcirec": wf.brainprep_group_sulcirec,
"subject-level-dmriprep": wf.brainprep_dmriprep,
"group-level-reporting": wf.brainprep_group_reporting,
}
for key, fn in commands.items():
commands[key] = make_wrapped(fn, is_vbm=key.endswith("vbm"))
commands[key] = make_wrapped(
fn,
is_vbm=key.endswith("vbm"),
is_dmriprep=key.endswith("dmriprep"),
)
for key, fn in inspect.getmembers(interfaces, inspect.isfunction):
key = key.replace("_", "-")
commands.setdefault("interface", {})[key] = make_wrapped(
fn,
is_interface=True,
)
fire.Fire(commands)
Loading
Loading