1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 setuptools,
8 attrs,
9 imagehash,
10 matplotlib,
11 multimethod,
12 networkx,
13 numpy,
14 pandas,
15 pillow,
16 pydot,
17 pygraphviz,
18 shapely,
19}:
20
21buildPythonPackage rec {
22 pname = "visions";
23 version = "0.7.6";
24 pyproject = true;
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchFromGitHub {
29 owner = "dylan-profiler";
30 repo = "visions";
31 rev = "5fe9dd0c2a5ada0162a005c880bac5296686a5aa"; # no 0.7.6 tag in github
32 hash = "sha256-SZzDXm+faAvrfSOT0fwwAf9IH7upNybwKxbjw1CrHj8=";
33 };
34
35 nativeBuildInputs = [ setuptools ];
36
37 propagatedBuildInputs = [
38 attrs
39 imagehash
40 multimethod
41 networkx
42 numpy
43 pandas
44 ];
45
46 optional-dependencies = {
47 type-geometry = [ shapely ];
48 type-image-path = [
49 imagehash
50 pillow
51 ];
52 plotting = [
53 matplotlib
54 pydot
55 pygraphviz
56 ];
57 };
58
59 nativeCheckInputs = [
60 pytestCheckHook
61 ] ++ lib.flatten (builtins.attrValues optional-dependencies);
62
63 disabledTestPaths = [
64 # requires running Apache Spark:
65 "tests/spark_/typesets/test_spark_standard_set.py"
66 ];
67
68 pythonImportsCheck = [
69 "visions"
70 ];
71
72 meta = with lib; {
73 description = "Type system for data analysis in Python";
74 homepage = "https://dylan-profiler.github.io/visions";
75 license = licenses.bsdOriginal;
76 maintainers = with maintainers; [ bcdarwin ];
77 };
78}