nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 pytestCheckHook,
7 scipy,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "tensorly";
13 version = "0.9.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "tensorly";
18 repo = "tensorly";
19 tag = version;
20 hash = "sha256-A6Zlp8fa7XFgf4qpg7SEtNLlYSNtDGLuRUEfzD+crQc=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [
26 numpy
27 scipy
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [
33 "tensorly"
34 "tensorly.base"
35 "tensorly.cp_tensor"
36 "tensorly.tucker_tensor"
37 "tensorly.tt_tensor"
38 "tensorly.tt_matrix"
39 "tensorly.parafac2_tensor"
40 "tensorly.tenalg"
41 "tensorly.decomposition"
42 "tensorly.regression"
43 "tensorly.solvers"
44 "tensorly.metrics"
45 "tensorly.random"
46 "tensorly.datasets"
47 "tensorly.plugins"
48 "tensorly.contrib"
49 ];
50
51 enabledTestPaths = [ "tensorly" ];
52
53 disabledTests = [
54 # this can fail on hydra and other peoples machines, check with others before re-enabling
55 # AssertionError: Partial_SVD took too long, maybe full_matrices set wrongly
56 "test_svd_time"
57 ];
58
59 meta = {
60 description = "Tensor learning in Python";
61 homepage = "https://tensorly.org/";
62 changelog = "https://github.com/tensorly/tensorly/releases/tag/${version}";
63 license = lib.licenses.bsd3;
64 maintainers = with lib.maintainers; [ bcdarwin ];
65 };
66}