aboutsummaryrefslogtreecommitdiff
blob: 6dae8d191d5090d348bddd1d7d0ffa747e13a70d (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..10} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1

DESCRIPTION="A Python-based module for creating flexible and robust spike sorting pipelines."
HOMEPAGE="https://github.com/SpikeInterface/spikeinterface"
SRC_URI="https://github.com/SpikeInterface/spikeinterface/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="extractors full test"

RDEPEND="
	dev-python/joblib[${PYTHON_USEDEP}]
	dev-python/neo[${PYTHON_USEDEP}]
	dev-python/numpy[${PYTHON_USEDEP}]
	dev-python/probeinterface[${PYTHON_USEDEP}]
	dev-python/threadpoolctl[${PYTHON_USEDEP}]
	dev-python/tqdm[${PYTHON_USEDEP}]
	extractors? (
		dev-python/pynwb[${PYTHON_USEDEP}]
		dev-python/lxml[${PYTHON_USEDEP}]
		dev-python/scipy[${PYTHON_USEDEP}]
	)
	full? (
		dev-python/distinctipy[${PYTHON_USEDEP}]
		dev-python/h5py[${PYTHON_USEDEP}]
		dev-python/matplotlib[${PYTHON_USEDEP}]
		dev-python/networkx[${PYTHON_USEDEP}]
		dev-python/pandas[${PYTHON_USEDEP}]
		dev-python/scipy[${PYTHON_USEDEP}]
		dev-python/xarray[${PYTHON_USEDEP}]
		dev-python/zarr[${PYTHON_USEDEP}]
		sci-libs/scikit-learn[${PYTHON_USEDEP}]
	)
"
# Also wants:
# # Extractors:
# 	MEArec
# 	pyedflib
# 	sonpy
# 	dev-python/hdf5storage (in ::science, masked)

distutils_enable_tests pytest

# Test failures reported upstream:
# https://github.com/SpikeInterface/spikeinterface/issues/307
python_test() {
	# Network sandboxing, mostly (?)
	local EPYTEST_DESELECT=(
		spikeinterface/core/tests/test_datasets.py::test_download_dataset
		spikeinterface/sortingcomponents/tests/test_motion_estimation.py::test_motion_functions
		spikeinterface/sortingcomponents/tests/test_motion_estimation.py::test_estimate_motion_rigid
		spikeinterface/sortingcomponents/tests/test_motion_estimation.py::test_estimate_motion_non_rigid
		spikeinterface/comparison/tests/test_multisortingcomparison.py::test_compare_multiple_sorters
		spikeinterface/curation/tests/test_sortingview_curation.py::test_sortingview_curation
		spikeinterface/exporters/tests/test_export_to_phy.py::test_export_to_phy
		spikeinterface/exporters/tests/test_export_to_phy.py::test_export_to_phy_by_sparsity
		spikeinterface/exporters/tests/test_report.py::test_export_report
		spikeinterface/extractors/tests/test_neoextractors.py
		spikeinterface/sorters/tests/test_launcher.py::test_run_sorters_with_dict
		spikeinterface/sorters/tests/test_launcher.py::test_sorter_installation
		spikeinterface/sorters/tests/test_runsorter.py::test_run_sorter_local
		spikeinterface/sorters/tests/test_runsorter.py::test_run_sorter_docker
		spikeinterface/sorters/tests/test_runsorter.py::test_run_sorter_singularity
		spikeinterface/sorters/tests/test_si_based_sorters.py::SpykingCircus2SorterCommonTestSuite
		spikeinterface/sorters/tests/test_si_based_sorters.py::Tridesclous2SorterCommonTestSuite::test_with_class
		spikeinterface/sorters/tests/test_si_based_sorters.py::Tridesclous2SorterCommonTestSuite::test_with_run
		spikeinterface/sortingcomponents/tests/test_clustering.py::test_find_cluster_from_peaks
		spikeinterface/sortingcomponents/tests/test_features_from_peaks.py::test_features_from_peaks
		spikeinterface/sortingcomponents/tests/test_peak_detection.py::test_detect_peaks
		spikeinterface/sortingcomponents/tests/test_peak_localization.py::test_localize_peaks
		spikeinterface/sortingcomponents/tests/test_peak_pipeline.py::test_run_peak_pipeline
		spikeinterface/sortingcomponents/tests/test_peak_selection.py::test_detect_peaks
		spikeinterface/sortingcomponents/tests/test_template_matching.py::test_find_spikes_from_templates
		spikeinterface/widgets/tests/test_widgets.py::TestWidgets
	)
	# Reported upstream:
	# https://github.com/SpikeInterface/spikeinterface/issues/307#issuecomment-1410840998
	EPYTEST_DESELECT+=(
		spikeinterface/sorters/tests/test_launcher.py::test_collect_sorting_outputs
	)
	local EPYTEST_IGNORE=(
		spikeinterface/widgets/_legacy_mpl_widgets/tests/*
	)
	epytest
}