Skip to content

Commit 6dd04fc

Browse files
committed
Handle merge conflicts
2 parents 16be647 + c7fb11b commit 6dd04fc

Some content is hidden

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

73 files changed

+1958
-373
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: 🐛 Bug
3+
about: Report a problem
4+
labels: 'bug'
5+
---
6+
7+
## Problem
8+
9+
> A report of the problem you observed.
10+
11+
## Expectation
12+
13+
> A description of what you were expecting to observe instead.
14+
15+
## Suggestion
16+
17+
> Some ideas about how to solve that problem.
18+
19+
## Reproducibility
20+
21+
> Steps to reproduce your observations so we can see the problem too, ideally some minimal code example.
22+
23+
## Additional context
24+
25+
> More context about your project, operating system, hardware or whatever to better understand the issue.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: 🎇 Trajectory request
3+
about: Propose a new trajectory for MRI-nufft
4+
labels: ['trajectories', 'feature request']
5+
title: "Add trajectory"
6+
---
7+
8+
## The trajectory
9+
10+
> Describe the trajectory/sampling pattern, don't hesitate to add pictures.
11+
12+
## References
13+
14+
> Add publication and/or code references.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: 🛠️ Installation issues
3+
about: Failed to install MRI-nufft or one of its backend ?
4+
title: "Installation issue with "
5+
---
6+
7+
<!-- Please fill out the following sections to help us understand your issue.
8+
9+
Before submitting, please ensure that you have read the installation guidelines:
10+
https://mind-inria.github.io/mri-nufft/getting_started.html
11+
-->
12+
13+
## My System
14+
15+
- **OS**: [e.g. Ubuntu 20.04, macOS 11.2, Windows 10]
16+
- **Python version**: [e.g. 3.8.5]
17+
- **CUDA version**: [if applicable, e.g. 11.2]
18+
- **package manager** [e.g. pip, uv, conda]
19+
20+
## What I did
21+
22+
> Describe the steps you took to install MRI-nufft or its backend, including any commands you ran.
23+
24+
## What happened
25+
26+
> Describe the error messages or issues you encountered during installation.
27+
> If possible, include the full output of the installation command.
28+
29+
## Additional context
30+
31+
> Provide any additional information that might help diagnose the issue.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: ✨ Feature request
3+
about: Suggest a new feature for MRI-nufft
4+
labels: 'feature request'
5+
---
6+
7+
## Description & use cases
8+
9+
> Describe the feature you would like to see in MRI-nufft. Be as specific as possible about what you want to achieve.
10+
11+
12+
## Suggested implementation
13+
14+
> Describe how you envision the feature being implemented. This could include specific functions, classes, or changes to existing code.

.github/pull_request_template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!---
2+
This is a suggested pull request template for mri-nufft.
3+
It's designed to capture information we've found to be useful in reviewing pull requests.
4+
5+
If there is other information that would be helpful to include, please don't hesitate to add it!
6+
7+
Please make sure your pull request also follows the
8+
[contribution guidelines](https://github.com/mind-inria/mri-nufft/blob/master/CONTRIBUTING.md) that
9+
will be enforced during the review process.
10+
-->
11+
12+
<!-- Please indicate after the # which issue you're closing with this PR.
13+
This is helpful for the maintainers AND will magically close the issue when this
14+
pull request is merged!
15+
If the PR closes multiple issues, includes "closes" before each one is listed.
16+
https://help.github.com/articles/closing-issues-using-keywords -->
17+
- Closes #
18+
19+
<!-- Please give a brief overview of what has changed in the PR.
20+
If you're not sure what to write, consider it a note to the maintainers to indicate
21+
what they should be looking for when they review the pull request. -->
22+
Changes proposed in this pull request:
23+
24+
-
25+
-

.github/workflows/test-ci.yml

Lines changed: 32 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -51,36 +51,9 @@ jobs:
5151
${{ env.create_venv }}
5252
${{ env.activate_venv }}
5353
python -m pip install --upgrade pip
54-
python -m pip install -e .[test]
55-
56-
- name: Install pynfft
57-
if: ${{ matrix.backend == 'pynfft' || env.ref_backend == 'pynfft' }}
58-
shell: bash
59-
run: |
60-
${{ env.activate_venv }}
61-
python -m pip install "pynfft2>=1.4.3"
62-
63-
- name: Install pynufft
64-
if: ${{ matrix.backend == 'pynufft-cpu' || env.ref_backend == 'pynufft-cpu' }}
65-
run: |
66-
${{ env.activate_venv }}
67-
python -m pip install pynufft
68-
69-
- name: Install finufft
70-
if: ${{ matrix.backend == 'finufft' || env.ref_backend == 'finufft'}}
71-
shell: bash
72-
run: |
73-
${{ env.activate_venv }}
74-
python -m pip install finufft
75-
76-
- name: Install Sigpy
77-
if: ${{ matrix.backend == 'sigpy' || env.ref_backend == 'sigpy'}}
78-
shell: bash
79-
run: |
80-
${{ env.activate_venv }}
81-
python -m pip install sigpy
82-
83-
- name: Install BART
54+
python -m pip install -e .[test,${{ env.ref_backend }},${{ matrix.backend }}]
55+
56+
- name: Install BART if needed
8457
if: ${{ matrix.backend == 'bart' || env.ref_backend == 'bart'}}
8558
shell: bash
8659
run: |
@@ -92,13 +65,6 @@ jobs:
9265
make
9366
echo $PWD >> $GITHUB_PATH
9467
95-
- name: Install torchkbnufft-cpu
96-
if: ${{ matrix.backend == 'torchkbnufft-cpu' || env.ref_backend == 'torchkbnufft-cpu'}}
97-
run: |
98-
${{ env.activate_venv }}
99-
python -m pip install torchkbnufft
100-
101-
10268
- name: Run Tests
10369
shell: bash
10470
run: |
@@ -127,33 +93,22 @@ jobs:
12793
- name: Install mri-nufft and finufft
12894
shell: bash
12995
run: |
130-
${{ env.create_venv }}
131-
${{ env.activate_venv }}
132-
python -m pip install --upgrade pip wheel
133-
python -m pip install -e .[test]
134-
python -m pip install cupy-cuda12x finufft "numpy<2.0"
96+
cd $RUNNER_WORKSPACE
97+
python --version
98+
python -m venv venv
99+
source $RUNNER_WORKSPACE/venv/bin/activate
100+
pip install --upgrade pip wheel
101+
pip install -e mri-nufft[test,finufft]
135102
136-
- name: Install torch with CUDA 12.1
137-
shell: bash
138-
if: ${{ matrix.backend != 'tensorflow'}}
139-
run: |
140-
${{ env.activate_venv }}
141-
${{ env.setup_cuda }}
142-
python -m pip install torch
143103
144104
- name: Install backend
145105
shell: bash
146106
run: |
147-
${{ env.activate_venv }}
148-
if [[ ${{ matrix.backend }} == "torchkbnufft-gpu" ]]; then
149-
python -m pip install torchkbnufft
150-
elif [[ ${{ matrix.backend }} == "tensorflow" ]]; then
151-
python -m pip install tensorflow-mri==0.21.0 tensorflow-probability==0.17.0 tensorflow-io==0.27.0 matplotlib==3.7
152-
elif [[ ${{ matrix.backend }} == "cufinufft" ]]; then
153-
python -m pip install "cufinufft<2.3"
154-
else
155-
python -m pip install ${{ matrix.backend }}
156-
fi
107+
source $RUNNER_WORKSPACE/venv/bin/activate
108+
export CUDA_BIN_PATH=/usr/local/cuda-12.4/
109+
export PATH=/usr/local/cuda-12.4/bin/:${PATH}
110+
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64/:${LD_LIBRARY_PATH}
111+
pip install -e .[${{ matrix.backend }},autodiff]
157112
158113
- name: Run Tests
159114
shell: bash
@@ -268,20 +223,22 @@ jobs:
268223
${{ env.activate_venv }}
269224
python -m pip install --upgrade pip
270225
python -m pip install -e .[extra,test,dev]
271-
python -m pip install finufft pooch brainweb-dl torch fastmri
226+
python -m pip install pooch brainweb-dl torch fastmri
272227
273-
- name: Install GPU related interfaces
228+
- name: Install Python deps
229+
shell: bash
274230
run: |
275231
${{ env.activate_venv }}
276232
${{ env.setup_cuda }}
277-
pip install cupy-cuda12x torch
278-
python -m pip install gpuNUFFT "cufinufft<2.3" sigpy scikit-image fastmri
279-
233+
python -m pip install --upgrade pip
234+
python -m pip install -e .[test,dev,finufft,cufinufft,gpuNUFFT,sigpy,smaps,autodiff,doc]
235+
280236
- name: Run examples
281237
shell: bash
282238
run: |
283239
${{ env.activate_venv }}
284240
export COVERAGE_FILE=coverage_plots
241+
export MRINUFFT_BACKEND=cufinufft
285242
python -m pytest examples -n=4 --cov --cov-branch --cov-report=term --durations=10
286243
287244
- name: Cache brainweb-dl directory
@@ -377,26 +334,26 @@ jobs:
377334
uses: actions/setup-python@v5
378335
with:
379336
python-version: "3.10"
380-
337+
338+
- name: Point to CUDA 12.4
339+
run: |
340+
export CUDA_BIN_PATH=/usr/local/cuda-12.4/
341+
export PATH=/usr/local/cuda-12.4/bin/:${PATH}
342+
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64/:${LD_LIBRARY_PATH}
343+
381344
- name: Install dependencies
382345
shell: bash -l {0}
383346
run: |
384347
${{ env.create_venv }}
385348
${{ env.activate_venv }}
386349
python -m pip install --upgrade pip
387-
python -m pip install .[doc,extra]
388-
python -m pip install finufft
389-
390-
- name: Install GPU related interfaces
391-
run: |
392-
${{ env.activate_venv }}
393-
${{ env.setup_cuda }}
394-
pip install cupy-cuda12x torch
395-
python -m pip install gpuNUFFT "cufinufft<2.3" sigpy scikit-image fastmri
396-
350+
python -m pip install .[doc,finufft,autodiff,gpunufft,cufinufft,sigpy,extra] fastmri
351+
352+
397353
- name: Build API documentation
398354
run: |
399355
${{ env.activate_venv }}
356+
export MRINUFFT_BACKEND=cufinufft
400357
python -m sphinx docs docs_build
401358
402359
- name: Display data

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ To build the documentation locally, you can run the following commands :
146146
cd mri-nufft/docs
147147
# do your changes
148148
cd ..
149+
# you can specify a specfic backend to run the example with an environment variable:
150+
export MRINUFFT_BACKEND=finufft
149151
python -m sphinx-build docs docs_build
150152
# view the documentation in your browser
151153
python -m http.server --directory docs_build 8080
@@ -154,6 +156,8 @@ To build the documentation locally, you can run the following commands :
154156

155157

156158
## Styleguides
159+
### Code
160+
The code base is formatted with [`black`](https://github.com/psf/black) and style guide is enforced with [`ruff`](https://github.com/astral-sh/ruff). You can run `black .` and `ruff check src` to ensure your changes will pass the [linter-check](https://github.com/mind-inria/.github/workflows/style.yml) CI.
157161
### Docstrings
158162
We use Numpy style docstrings. You can find more information about them [here](https://numpydoc.readthedocs.io/en/latest/format.html).
159163

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Usage
5555
5656
## The real deal starts here ##
5757
# Choose your NUFFT backend (installed independently from the package)
58+
# pip install mri-nufft[finufft] will be just fine here
5859
NufftOperator = mrinufft.get_operator("finufft")
5960
6061
# For improved image reconstruction, use density compensation
@@ -88,6 +89,10 @@ MRI-nufft is available on Pypi and can be installed with::
8889
pip install mri-nufft
8990

9091
Additionally, you will have to install at least one NUFFT computation backend. See the `Documentation <https://mind-inria.github.io/mri-nufft/getting_started.html#choosing-a-nufft-backend>`_ for more guidance.
92+
Typically we recommend::
93+
94+
pip install mri-nufft[finufft]
95+
pip install mri-nufft[cufinufft] # if you have a NVIDIA GPU and CUDA>=12
9196

9297

9398
Benchmark

docs/_templates/autosummary/class.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@
3030
{%- endfor %}
3131
{% endif %}
3232
{% endblock %}
33+
34+
.. _sphx_glr_backref_{{fullname}}:
35+
36+
.. minigallery:: {{fullname}}
37+
:add-heading:

docs/_templates/autosummary/function.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@
44

55
.. autofunction:: {{ objname }}
66

7-
.. _sphx_glr_backref_{{fullname}}:
8-
9-
.. minigallery:: {{fullname}}
10-
:add-heading:
7+
.. minigallery:: {{module}}.{{objname}}
8+
:add-heading: Example using ``{{objname}}``:

0 commit comments

Comments
 (0)