Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
74427cb
Added __print_usage_pydra__ special options for
tclose Aug 22, 2023
121f87c
deleted pydra package GHA workflow (now generated in https://github.c…
tclose Aug 21, 2025
d71093d
added in missing imports to app.py
tclose Aug 21, 2025
4a71da2
added in SequenceDirectoryOut Python type
tclose Aug 21, 2025
a6a1097
touch up
tclose Aug 21, 2025
ce7920a
debugged pydra code generation
tclose Aug 21, 2025
3ebdad6
renamed __print_usage_pydra__ to __print_pydra_code__
tclose Aug 22, 2025
21ec26b
renamed generating methods to print_pydra_code from print_usage_pydra
tclose Aug 22, 2025
6e497b5
dropped flake8 config
tclose Aug 22, 2025
4c48cdd
reverted .gitignore
tclose Aug 22, 2025
49d4788
renamed directions arguments to fibre_directions
tclose Aug 26, 2025
4447c50
added pydra test github action
tclose Aug 27, 2025
f88a4fd
added dev option to pydra-tasks-mrtrix3 install
tclose Aug 27, 2025
f78acd3
updated reference docs to use new "fibre_directions" argument names
tclose Aug 27, 2025
246e062
fixing pylint errors in app.py
tclose Aug 28, 2025
3e0e84f
fixing up pylint errors
tclose Aug 28, 2025
e84cf2d
disable pylint too many public methods for app.Parser
tclose Aug 28, 2025
91a62f6
renamed directions -> fibre_directions in ref docs
tclose Aug 28, 2025
9aa1bc7
run pytest instead of just importing pydra package in GH action
tclose Aug 28, 2025
10fde8b
Merge branch 'dev' into pydra-usage
Lestropie Nov 17, 2025
9a455ea
updated pydra code gen to match new argument-handling syntax
tclose Nov 28, 2025
23fff5b
debugging generation of pydra code after arg parsing refactor merge
tclose Nov 28, 2025
3024e11
fixed up code to pass syntax check
tclose Nov 28, 2025
f4e3bf5
cleaned up app.py import
tclose Nov 28, 2025
d2dfdfb
Renamed pydra CI workflow
tclose Nov 28, 2025
cb6bc45
renamed pydra CI workflow
tclose Nov 28, 2025
24a09ac
Stylistic changes in response to code-review
tclose Dec 1, 2025
08d9393
reverted use of optional kwarg in pydra code-gen type formatting
tclose Dec 2, 2025
4725833
Fix repeatable-option type generation in print_pydra_code
tclose Sep 7, 2026
5d36e9d
Fix per-element type lookup in format_option_type tuple case
tclose Sep 7, 2026
a9c00c0
Fix always-false is_multi check in format_option
tclose Sep 7, 2026
1f5b2d8
Remove dead 5tt-prefix handling in pydra_code
tclose Sep 7, 2026
e71d55c
removed pin on cmake version
tclose Sep 7, 2026
bb6ade4
fix up clang-tidy errors
tclose Sep 7, 2026
e74889c
Merge branch 'dev' into pydra-usage
tclose Sep 7, 2026
2ab70f4
added comment to retrigger tests
tclose Sep 8, 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
22 changes: 22 additions & 0 deletions .github/workflows/clang-tidy-post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Post clang-tidy review comments

# Runs in the base repo's context (unlike the pull_request-triggered
# clang-tidy-review workflow, which gets a read-only GITHUB_TOKEN for PRs
# from forks), so it has the permissions needed to post the review that
# clang-tidy.yml generated and uploaded as an artifact.
on:
workflow_run:
workflows: ["clang-tidy-review"]
types:
- completed

jobs:
post-review:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- uses: ZedThree/clang-tidy-review/post@v0.21.0
with:
max_comments: 25
5 changes: 5 additions & 0 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
apt_packages: g++,qt6-base-dev,libqt6opengl6-dev,libglvnd-dev,zlib1g-dev,libfftw3-dev,ninja-build
config_file: .clang-tidy-review
clang_tidy_version: 19
# PRs from forks get a read-only GITHUB_TOKEN, which can't post a review
# (see the 403 "Resource not accessible by integration" failure). Generate
# the review here and post it from clang-tidy-post.yml instead, which runs
# via workflow_run in the base repo's context and has write access.
split_workflow: true

- uses: ZedThree/clang-tidy-review/upload@v0.21.0
id: upload-review
83 changes: 83 additions & 0 deletions .github/workflows/pydra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Pydra code generation

on:
pull_request:
types: [opened, synchronize]
branches: [ master, dev]
merge_group:
types: [checks_requested]
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
generate-pydra:
runs-on: ubuntu-latest

env:
QT_SELECT: qt6
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "2G"

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Get latest version
run: echo "MRTRIX3_VERSION=$(git fetch --tags && git describe --tags --abbrev=0)" >> $GITHUB_ENV

- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install clang qt6-base-dev libglvnd-dev zlib1g-dev libfftw3-dev ninja-build python3-numpy libpng-dev

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Get CMake
uses: lukka/get-cmake@latest

- name: Print CMake version
run: cmake --version

- name: Make installation dir
run: |
sudo mkdir -p /opt/mrtrix3
sudo chown $USER /opt/mrtrix3

- name: configure
run: >
cmake
-B build
-G Ninja
-D CMAKE_BUILD_TYPE=Release
-D MRTRIX_BUILD_TESTS=ON
-D MRTRIX_STL_DEBUGGING=ON
-D MRTRIX_WARNINGS_AS_ERRORS=ON
-D CMAKE_C_COMPILER=clang
-D CMAKE_CXX_COMPILER=clang++
-D CMAKE_INSTALL_PREFIX=/opt/mrtrix3

- name: Build MRtrix3
run: cmake --build build

- name: Install MRtrix3
run: cmake --install build

- name: Clone pydra-tasks-mrtrix3
run: git clone https://github.com/nipype/pydra-tasks-mrtrix3

- name: Install pydra-tasks-mrtrix3 and fileformats packages
run: pip install -e ./pydra-tasks-mrtrix3[test,dev] -e ./pydra-tasks-mrtrix3/related-packages/fileformats -e ./pydra-tasks-mrtrix3/related-packages/fileformats-extras

- name: Generate Pydra task packages
run: python3 pydra-tasks-mrtrix3/generate.py /opt/mrtrix3/bin pydra-tasks-mrtrix3 3.1.0

- name: Test with pytest
run: pytest -sv pydra-tasks-mrtrix3/pydra/tasks/mrtrix3 --cov pydra.tasks.mrtrix3 --cov-report xml



2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
docs/**/*.md
!docs/README.md
/python/lib/mrtrix3/_version.py
*.venv
/scripts/mrtrix_bash_completion
/dev/
/compiled_docs/
/.vscode/
.claude
.cproject
.DS_store
.idea
.project
.settings
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/amp2response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void usage() {
ARGUMENTS
+ Argument ("amps", "the amplitudes image").type_image_in()
+ Argument ("mask", "the mask containing the voxels from which to estimate the response function").type_image_in()
+ Argument ("directions", "a 4D image containing the estimated fibre directions").type_image_in()
+ Argument ("fibre_directions", "a 4D image containing the estimated fibre directions").type_image_in()
+ Argument ("response", "the output zonal spherical harmonic coefficients").type_file_out();

OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/peaks2amp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void usage() {
SYNOPSIS = "Extract amplitudes from a peak directions image";

ARGUMENTS
+ Argument ("directions", "the input directions image."
+ Argument ("fibre_directions", "the input directions image."
" Each volume corresponds to the x, y & z"
" component of each direction vector in turn.").type_image_in()

Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/peaks2fixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void usage() {
+ Fixel::format_description;

ARGUMENTS
+ Argument ("directions", "the input directions image;"
+ Argument ("fibre_directions", "the input directions image;"
" each volume corresponds to the x, y & z"
" component of each direction vector in turn.").type_image_in()

Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/sh2amp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void usage() {

ARGUMENTS
+ Argument ("input", "the input spherical harmonic (SH) coefficients image").type_image_in()
+ Argument ("directions", "the set of directions along which the SH functions will be sampled").type_file_in()
+ Argument ("fibre_directions", "the set of directions along which the SH functions will be sampled").type_file_in()
+ Argument ("output", "the output amplitudes image").type_image_out();

OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmd/sh2response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void usage() {
ARGUMENTS
+ Argument ("SH", "the spherical harmonic decomposition of the diffusion-weighted images").type_image_in()
+ Argument ("mask", "the mask containing the voxels from which to estimate the response function").type_image_in()
+ Argument ("directions", "a 4D image containing the direction vectors along which to estimate the response function").type_image_in()
+ Argument ("fibre_directions", "a 4D image containing the direction vectors along which to estimate the response function").type_image_in()
+ Argument ("response", "the output axially-symmetric spherical harmonic coefficients").type_file_out();

OPTIONS
Expand Down
Loading
Loading