aboutsummaryrefslogtreecommitdiff
blob: 14f931258731c80269433fff6370b10dd465bd16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{8..10} )

inherit distutils-r1

DESCRIPTION="Fast and easy statistical learning on NeuroImaging data"
HOMEPAGE="http://nilearn.github.io/"
SRC_URI="https://github.com/nilearn/nilearn/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"

RDEPEND="
	>=dev-python/joblib-0.15[${PYTHON_USEDEP}]
	dev-python/lxml[${PYTHON_USEDEP}]
	>=dev-python/matplotlib-3[${PYTHON_USEDEP}]
	>=dev-python/numpy-1.18[${PYTHON_USEDEP}]
	>=dev-python/pandas-1[${PYTHON_USEDEP}]
	>=dev-python/requests-2[${PYTHON_USEDEP}]
	>=dev-python/scipy-1.5[${PYTHON_USEDEP}]
	>=sci-libs/nibabel-3[${PYTHON_USEDEP}]
	>=sci-libs/scikit-learn-0.22[${PYTHON_USEDEP}]
"

PATCHES=( "${FILESDIR}/${P}-tests.patch" )

distutils_enable_tests pytest

EPYTEST_IGNORE=(
	"examples/05_glm_second_level/plot_second_level_association_test.py"
	"examples/05_glm_second_level/plot_second_level_one_sample_test.py"
	"examples/05_glm_second_level/plot_second_level_two_sample_test.py"
)
# Reported upstream:
# https://github.com/nilearn/nilearn/issues/3232
EPYTEST_DESELECT=(
	"nilearn/decoding/tests/test_decoder.py::test_decoder_dummy_classifier"
	"nilearn/interfaces/fmriprep/tests/test_load_confounds.py::test_nilearn_standardize[False-True-zscore]"
	"nilearn/interfaces/fmriprep/tests/test_load_confounds.py::test_nilearn_standardize[False-True-psc]"
	"nilearn/interfaces/fmriprep/tests/test_load_confounds.py::test_nilearn_standardize[True-True-zscore]"
	"nilearn/interfaces/fmriprep/tests/test_load_confounds.py::test_nilearn_standardize[True-True-psc]"
)

python_test() {
	echo "backend: Agg" > matplotlibrc
	MPLCONFIGDIR=. epytest
}