From 02a345973c2124429fcb916d51b2120ccfcc75ad Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Mon, 3 Nov 2025 00:08:02 +0100 Subject: neuroscience: python-nitransforms: Update to 25.1.0. * guix-science/packages/neuroscience.scm (python-nitransforms): Update to 25.1.0. [source]: Switch to git. [arguments]: Enable check. --- guix-science/packages/neuroscience.scm | 62 ++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/guix-science/packages/neuroscience.scm b/guix-science/packages/neuroscience.scm index 6dad6a0..69ca360 100644 --- a/guix-science/packages/neuroscience.scm +++ b/guix-science/packages/neuroscience.scm @@ -1517,22 +1517,62 @@ and semantically clear code.") (define-public python-nitransforms (package (name "python-nitransforms") - (version "24.1.4") ;NOTE: Version 25 requires numpy>=2.1. + (version "25.1.0") (source (origin - (method url-fetch) - (uri (pypi-uri "nitransforms" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/nipy/nitransforms") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0il1m5faf5k1s92wk6kwnfck07fw7j7i2418rcr6s60byjca98hd")))) + (base32 "1aiffnp9bvxqav6rkdhw49nph416shzbciha3chbag03f9w2pw02")))) (build-system pyproject-build-system) (arguments (list - #:tests? #f)) ;Requires external data. - (propagated-inputs (list python-h5py - python-lxml - python-nibabel - python-numpy - python-scipy)) + #:test-flags + #~(list + ;; No traceback. + "--ignore=nitransforms/linear.py" + "--ignore=nitransforms/nonlinear.py" + ;; Requires external data. + "--ignore=nitransforms/tests/test_base.py" + "--ignore=nitransforms/tests/test_io.py" + "--ignore=nitransforms/tests/test_io_itk.py" + "--ignore=nitransforms/tests/test_resampling.py" + "--ignore=nitransforms/tests/test_surface.py" + "--deselect=nitransforms/tests/test_cli.py::test_apply_linear" + "--deselect=nitransforms/tests/test_cli.py::test_apply_nl" + "--deselect=nitransforms/tests/test_conversions.py::test_fsl2lta_conversions" + "--deselect=nitransforms/tests/test_conversions.py::test_itk2lta_conversions" + "--deselect=nitransforms/tests/test_conversions.py::test_lta2fsl_conversions" + "--deselect=nitransforms/tests/test_linear.py::test_loadsave" + "--deselect=nitransforms/tests/test_linear.py::test_linear_save" + "--deselect=nitransforms/tests/test_linear.py::test_mulmat_operator" + "--deselect=nitransforms/tests/test_nonlinear.py::test_densefield_map" + "--deselect=nitransforms/tests/test_nonlinear.py::test_displacements_to_filename" + "--deselect=nitransforms/tests/test_nonlinear.py::test_bspline_map_gridpoints" + "--deselect=nitransforms/tests/test_nonlinear.py::test_bsplines_references") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-pyproject + (lambda _ + (substitute* "pyproject.toml" + ;; Relax minimum version for numpy. + (("\"numpy.*>=.*\",") + "\"numpy\",") + ;; Do not stop after first test failure. + (("-svx") + "-sv")))) + (add-before 'build 'set-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" + #$version))) + (add-before 'check 'set-home + (lambda _ + (setenv "HOME" "/tmp")))))) + (propagated-inputs (list python-h5py python-lxml python-nibabel + python-numpy python-scipy)) (native-inputs (list python-pytest python-pytest-cov python-pytest-env @@ -1540,7 +1580,7 @@ and semantically clear code.") python-setuptools python-setuptools-scm)) (home-page "https://nitransforms.readthedocs.io") - (synopsis "Neuroimaging spatial transforms in Python.") + (synopsis "Neuroimaging spatial transforms in Python") (description "@code{niworkflows} is capable of converting between formats and resampling images to apply transforms generated by the most popular neuroimaging packages -- cgit v1.2.3