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
118
119
120
121
122
123
124
|
{
lib,
stdenv,
pkgs,
buildPythonPackage,
rerun,
python,
# nativeBuildInputs
rustPlatform,
# dependencies
attrs,
numpy,
opencv4,
pillow,
pyarrow,
semver,
typing-extensions,
# tests
datafusion,
inline-snapshot,
polars,
pytest-snapshot,
pytestCheckHook,
tomli,
torch,
}:
buildPythonPackage {
pname = "rerun-sdk";
pyproject = true;
inherit (rerun)
src
version
cargoDeps
postPatch
;
nativeBuildInputs = [
pkgs.protobuf # for protoc
rerun
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
dependencies = [
attrs
numpy
opencv4
pillow
pyarrow
semver
typing-extensions
];
buildAndTestSubdir = "rerun_py";
# https://github.com/NixOS/nixpkgs/issues/289340
#
# Alternatively, one could
# dontUsePythonImportsCheck = true;
# dontUsePytestCheck = true;
postInstall = ''
rm $out/${python.sitePackages}/rerun_sdk.pth
ln -s rerun_sdk/rerun $out/${python.sitePackages}/rerun
'';
pythonImportsCheck = [ "rerun" ];
nativeCheckInputs = [
datafusion
inline-snapshot
polars
pytest-snapshot
pytestCheckHook
tomli
torch
];
inherit (rerun) addDlopenRunpaths addDlopenRunpathsPhase;
postPhases = lib.optionals stdenv.hostPlatform.isLinux [ "addDlopenRunpathsPhase" ];
disabledTests = [
# ConnectionError: Connection: connecting to server: transport error
"test_isolated_streams"
"test_send_dataframe_roundtrip"
"test_server_with_dataset_files"
"test_server_with_dataset_prefix"
"test_server_with_multiple_datasets"
# TypeError: 'Snapshot' object is not callable
"test_schema_recording"
];
disabledTestPaths = [
# "fixture 'benchmark' not found"
"tests/python/log_benchmark/test_log_benchmark.py"
# ValueError: Failed to start Rerun server: Error loading RRD: couldn't decode "/build/source/tests/assets/rrd/dataset/file4.rrd"
"rerun_py/tests/e2e_redap_tests"
# ConnectionError: Connection: connecting to server: transport error
"rerun_py/tests/api_sandbox/"
# RuntimeError: Failed to load URDF file: No elements found
"rerun_py/tests/unit/test_urdf_tree.py"
];
__darwinAllowLocalNetworking = true;
meta = {
description = "Python bindings for `rerun` (an interactive visualization tool for stream data)";
inherit (rerun.meta)
changelog
homepage
license
maintainers
;
mainProgram = "rerun";
};
}
|