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
|
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
# build-system
cython,
pdm-backend,
setuptools,
# dependencies
igraph,
leidenalg,
matplotlib,
pandas,
pyarrow,
scipy,
spacy,
spacy-lookups-data,
toolz,
tqdm,
wasabi,
# tests
en_core_web_sm,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "textnets";
version = "0.10.4";
pyproject = true;
src = fetchFromGitHub {
owner = "jboynyc";
repo = "textnets";
tag = "v${version}";
hash = "sha256-GbJH+6EqfP+miqpYitnBwNDO6uQQq3h9Fy58nVaF1vw=";
};
build-system = [
cython
pdm-backend
setuptools
];
pythonRelaxDeps = [
"toolz"
];
dependencies = [
igraph
leidenalg
matplotlib
pandas
pyarrow
scipy
spacy
spacy-lookups-data
toolz
tqdm
wasabi
];
nativeCheckInputs = [
en_core_web_sm
pytestCheckHook
];
disabledTests = [
# https://github.com/jboynyc/textnets/issues/66
"test_textnet_save_and_load"
];
pythonImportsCheck = [ "textnets" ];
# Enable the package to find the cythonized .so files during testing. See #255262
# Set MPLBACKEND=agg for headless matplotlib on darwin. See #350784
preCheck = ''
rm -r textnets
export MPLBACKEND=agg
'';
meta = {
description = "Text analysis with networks";
homepage = "https://textnets.readthedocs.io";
changelog = "https://github.com/jboynyc/textnets/blob/v${version}/HISTORY.rst";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ jboy ];
};
}
|