diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cc8c8a6..7e04d77 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 @@ -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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e28fd2e..1116417 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index ac59e02..08d3526 100644 --- a/README.md +++ b/README.md @@ -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+" +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 diff --git a/docs/source/conf.py b/docs/source/conf.py index bc5e556..ffaf3fc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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) diff --git a/docs/source/install.md b/docs/source/install.md index 0dece51..bafa8d4 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -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 | diff --git a/docs/source/usage.md b/docs/source/usage.md index ec51846..a9aa8cf 100644 --- a/docs/source/usage.md +++ b/docs/source/usage.md @@ -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: diff --git a/pyproject.toml b/pyproject.toml index f41a1d9..ed22e0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]