Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 2 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ jobs:
python-version: "3.12"
cache: pip

# MITTENS v2 (mittens-dmri) builds from GitHub with Rust
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Install MPAT with the docs and test extras
run: |
python -m pip install --upgrade pip maturin
python -m pip install --upgrade pip
python -m pip install -e ".[docs,test]"

# rendered animations and the phantom's chains are reused while the scripts and
Expand Down Expand Up @@ -75,10 +71,9 @@ jobs:
with:
python-version: "3.12"
cache: pip
- uses: dtolnay/rust-toolchain@stable
- name: Install
run: |
python -m pip install --upgrade pip maturin
python -m pip install --upgrade pip
python -m pip install -e ".[docs]"
- name: Check external links
env:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip

# MITTENS v2 (mittens-dmri) builds from GitHub with Rust
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Install MPAT with the test extra
run: |
python -m pip install --upgrade pip maturin
python -m pip install --upgrade pip
python -m pip install -e ".[test]"

- name: Run the tests
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ mpat sub-01_dwi.nii.gz sub-01_dwi.bval sub-01_dwi.bvec sub-01_T1w.nii.gz out/ --
## Install

```bash
pip install maturin # MITTENS v2 builds with Rust (https://rustup.rs)
pip install "mpat-tractography[viewer] @ git+<this repository>"
pip install "mpat-tractography[viewer] @ git+https://github.com/rokemlab/MPAT.git"
```

MITTENS v2 (`mittens-dmri`) is not on PyPI yet, so pip builds it from GitHub with your Rust toolchain.
MITTENS v2 (`mittens-dmri`) comes from PyPI as a prebuilt wheel for Linux, macOS and Windows, so no
compiler is needed.

## Options

Expand Down
7 changes: 6 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@
html_sidebars = {"**": []} # navigation lives in the header; pages use the full width
html_show_sourcelink = False

linkcheck_ignore = [r"https://github\.com/rokemlab/MPAT.*"]
linkcheck_ignore = [
r"https://github\.com/rokemlab/MPAT.*",
# AGU (Wiley) and SIAM answer automated requests with 403 Forbidden; their DOIs resolve
r"https://doi\.org/10\.1029/",
r"https://doi\.org/10\.1137/",
]

# ------------------------------------------------------------------ build environment
# the `mpat` console script lives next to the interpreter running Sphinx (virtualenvs)
Expand Down
10 changes: 6 additions & 4 deletions docs/source/install.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Installation

MPAT needs Python 3.10 or newer. It depends on [MITTENS](https://github.com/mattcieslak/MITTENS)
v2 (`mittens-dmri`), which is not on PyPI yet, so pip builds it from GitHub. That build needs a
Rust toolchain ([rustup.rs](https://rustup.rs)) and `maturin`:
MPAT needs Python 3.10 or newer. Install it from GitHub:

```bash
pip install maturin
pip install "mpat-tractography[viewer] @ git+https://github.com/rokemlab/MPAT.git"
```

It depends on [MITTENS](https://github.com/mattcieslak/MITTENS) v2 (`mittens-dmri`), which pip
installs from PyPI as a prebuilt wheel for Linux (x86_64, aarch64), macOS (Intel, Apple Silicon)
and Windows, so no compiler is needed. On other platforms pip builds it from source, which needs a
Rust toolchain ([rustup.rs](https://rustup.rs)).

Extras:

| extra | for |
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## From Python

MPAT runs on top of a pyAFQ
[`ParticipantAFQ`](https://tractometry.org/pyAFQ/reference/api.html), or every participant of a
[`ParticipantAFQ`](https://tractometry.org/pyAFQ/reference/api/AFQ/api/participant/index.html#AFQ.api.participant.ParticipantAFQ), or every participant of a
`GroupAFQ`. pyAFQ computes the derivatives MPAT needs: the fODF, the tissue PVE and brain
mask, the white/grey-matter interface, and the bundle ROIs warped to the subject. MPAT then
replaces the tracking and segmentation:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ license = { text = "BSD-3-Clause" }
dependencies = [
"numpy>=1.26", "scipy>=1.11", "nibabel>=5", "numba>=0.59", "dipy>=1.9", "scikit-image",
"pyAFQ>=3.4", "trx-python",
# MITTENS v2 is not on PyPI yet (it builds with a Rust toolchain via maturin)
"mittens-dmri @ git+https://github.com/mattcieslak/MITTENS.git",
# MITTENS v2: prebuilt wheels on PyPI. Naming the pre-release lets pip pick it without --pre
"mittens-dmri>=2.0.0a1",
]

[project.optional-dependencies]
Expand Down
Loading