about summary refs log tree commit diff
path: root/pkgs/development/python-modules/linear-operator/default.nix
blob: 918a439c62799a62a924a8dc5d00b7bf1fd55f68 (plain) (blame)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  jaxtyping,
  pytestCheckHook,
  pythonRelaxDepsHook,
  scipy,
  setuptools,
  setuptools-scm,
  torch,
  typeguard,
  wheel,
}:

buildPythonPackage rec {
  pname = "linear-operator";
  version = "0.5.2";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "cornellius-gp";
    repo = "linear_operator";
    rev = "refs/tags/v${version}";
    hash = "sha256-OuE6jx9Q4IU+b2a+mrglRdBOReN1tt/thetNXxwk1GI=";
  };

  nativeBuildInputs = [
    pythonRelaxDepsHook
    setuptools
    setuptools-scm
    wheel
  ];

  propagatedBuildInputs = [
    jaxtyping
    scipy
    torch
    typeguard
  ];

  pythonRelaxDeps = [ "typeguard" ];

  pythonImportsCheck = [ "linear_operator" ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    # flaky numerical tests
    "test_matmul_matrix_broadcast"
    "test_svd"
  ];

  meta = with lib; {
    description = "LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch";
    homepage = "https://github.com/cornellius-gp/linear_operator/";
    license = licenses.mit;
    maintainers = with maintainers; [ veprbl ];
  };
}