diff options
author | Liam Timms | 2020-06-04 18:09:14 -0400 |
---|---|---|
committer | Liam Timms | 2020-06-04 18:09:14 -0400 |
commit | d8929d56bd221a263582fa1516cccc18055c40ec (patch) | |
tree | 71b2aa4a34694b9206b841c79866093297d682fe | |
parent | 578b9601b95506fc509335c80484a7c0630036c6 (diff) | |
download | aur-d8929d56bd221a263582fa1516cccc18055c40ec.tar.gz |
adding patch (see: https://github.com/nipy/nipype/issues/3223) and check function
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch | 44 | ||||
-rw-r--r-- | PKGBUILD | 24 |
3 files changed, 68 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = python-nipype pkgdesc = Neuroimaging in python pipelines and interfaces pkgver = 1.5.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/nipy/nipype arch = any license = Apache @@ -37,7 +37,9 @@ pkgbase = python-nipype optdepends = fsl optdepends = spm12 source = nipype-1.5.0.tar.gz::https://github.com/nipy/nipype/archive/1.5.0.tar.gz + source = 0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch sha256sums = dbbe74ac99740da749350a6957326bd78d6ba388694b0c09cd92575f111576af + sha256sums = 50dd1c4093399d05fdf0f6558f5d31ef6fdfd30771c23c54314e190e18a217d2 pkgname = python-nipype diff --git a/0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch b/0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch new file mode 100644 index 000000000000..5755cc762750 --- /dev/null +++ b/0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch @@ -0,0 +1,44 @@ +From dc230ef7c9e6261164d66124f82918807473a81d Mon Sep 17 00:00:00 2001 +From: Chris Markiewicz <markiewicz@stanford.edu> +Date: Thu, 4 Jun 2020 13:30:11 -0400 +Subject: [PATCH] DOC: Skip BIDSDataGrabber doctest if pybids is missing + +--- + nipype/conftest.py | 1 + + nipype/interfaces/io.py | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/nipype/conftest.py b/nipype/conftest.py +index b099fd007..7323e7284 100644 +--- a/nipype/conftest.py ++++ b/nipype/conftest.py +@@ -17,6 +17,7 @@ shutil.copytree(NIPYPE_DATADIR, data_dir) + def add_np(doctest_namespace): + doctest_namespace["np"] = numpy + doctest_namespace["os"] = os ++ doctest_namespace["pytest"] = pytest + doctest_namespace["datadir"] = data_dir + + +diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py +index d9b578caa..2b2510f16 100644 +--- a/nipype/interfaces/io.py ++++ b/nipype/interfaces/io.py +@@ -2895,6 +2895,14 @@ class BIDSDataGrabber(LibraryBaseInterface, IOBase): + + Examples + -------- ++ ++ .. setup:: ++ ++ >>> try: ++ ... import bids ++ ... except ImportError: ++ ... pytest.skip() ++ + By default, the BIDSDataGrabber fetches anatomical and functional images + from a project, and makes BIDS entities (e.g. subject) available for + filtering outputs. +-- +2.27.0 + @@ -10,7 +10,7 @@ pkgname=python-nipype _name=${pkgname/python-/} pkgver=1.5.0 -pkgrel=1 +pkgrel=2 pkgdesc='Neuroimaging in python pipelines and interfaces' arch=('any') url='https://github.com/nipy/nipype' @@ -18,8 +18,9 @@ license=('Apache') depends=('python-click' 'python-networkx' 'python-nibabel' 'python-numpy' 'python-packaging' 'python-prov' 'python-pydot' 'python-pydotplus' 'python-dateutil' 'python-rdflib>=5.0.0' 'python-scipy' 'python-simplejson' 'python-traits' 'python-filelock' 'python-matplotlib' 'python-numpydoc' 'python-future' 'python-funcsigs' 'python-pytest' 'python-mock' 'python-etelemetry>=0.2.0') makedepends=('python-sphinx' 'python-sphinxcontrib-napoleon') optdepends=('python-pybids' 'python-dipy' 'ants-git' '3dslicer' 'afni' 'freesurfer' 'fsl' 'spm12') -source=("${_name}-${pkgver}.tar.gz::https://github.com/nipy/${_name}/archive/${pkgver}.tar.gz") -sha256sums=('dbbe74ac99740da749350a6957326bd78d6ba388694b0c09cd92575f111576af') +source=("${_name}-${pkgver}.tar.gz::https://github.com/nipy/${_name}/archive/${pkgver}.tar.gz" "0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch") +sha256sums=('dbbe74ac99740da749350a6957326bd78d6ba388694b0c09cd92575f111576af' + '50dd1c4093399d05fdf0f6558f5d31ef6fdfd30771c23c54314e190e18a217d2') _setpaths(){ @@ -44,6 +45,14 @@ _setpaths(){ } +prepare() { + + mv 0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch ${srcdir}/${_name}-${pkgver} + cd ${srcdir}/${_name}-${pkgver} + + patch --forward --strip=1 --input=0001-DOC-Skip-BIDSDataGrabber-doctest-if-pybids-is-missin.patch +} + build() { @@ -55,6 +64,15 @@ build() { } +check() { + + cd ${srcdir}/${_name}-${pkgver} + + _setpaths + echo "MATLABCMD: ${MATLABCMD}" + + pytest -v --doctest-modules nipype +} package() { |