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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
writableTmpDirAsHomeHook,
# build-system
hatch-vcs,
hatchling,
# dependencies
matplotlib,
# optional-dependencies
arviz,
ipython,
myst-nb,
pandoc,
sphinx,
sphinx-book-theme,
pytest,
scipy,
# tests
pytestCheckHook,
corner,
}:
buildPythonPackage rec {
pname = "corner";
version = "2.2.3";
pyproject = true;
src = fetchFromGitHub {
owner = "dfm";
repo = "corner.py";
tag = "v${version}";
hash = "sha256-gK2yylteI3VLVJ0p7NB7bR7cirCo2BvFKnYIH3kfyh4=";
};
nativeBuildInputs = [
# During `pythonImportsCheck`, `corner` imports `arviz` which wants to write a stamp file to the
# homedir. It then needs to be writable.
# https://github.com/arviz-devs/arviz/commit/4db612908f588d89bb5bfb6b83a08ada3d54fd02
writableTmpDirAsHomeHook
];
build-system = [
hatch-vcs
hatchling
];
dependencies = [ matplotlib ];
optional-dependencies = {
arviz = [ arviz ];
docs = [
arviz
ipython
myst-nb
pandoc
sphinx
sphinx-book-theme
];
test = [
arviz
pytest
scipy
];
};
pythonImportsCheck = [ "corner" ];
nativeCheckInputs = [ pytestCheckHook ] ++ corner.optional-dependencies.test;
# matplotlib.testing.exceptions.ImageComparisonFailure: images not close
disabledTests = [
"test_1d_fig_argument"
"test_arviz"
"test_basic"
"test_bins"
"test_bins_log"
"test_color"
"test_color_filled"
"test_extended_overplotting"
"test_hist_bin_factor"
"test_labels"
"test_levels2"
"test_lowNfilled"
"test_no_fill_contours"
"test_overplot"
"test_overplot_log"
"test_pandas"
"test_quantiles"
"test_range_fig_arg"
"test_reverse"
"test_reverse_overplotting"
"test_reverse_truths"
"test_smooth1"
"test_tight"
"test_title_quantiles"
"test_title_quantiles_default"
"test_title_quantiles_raises"
"test_titles1"
"test_titles2"
"test_top_ticks"
"test_truths"
];
meta = {
description = "Make some beautiful corner plots";
homepage = "https://github.com/dfm/corner.py";
changelog = "https://github.com/dfm/corner.py/releases/tag/v${version}";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
|