mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / development / python-modules / skops / default.nix
blob47dfe464fbcd4435817b88e7a8104c815d3b8217
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   setuptools,
7   pytestCheckHook,
8   pytest-cov-stub,
9   huggingface-hub,
10   matplotlib,
11   pandas,
12   scikit-learn,
13   stdenv,
14   streamlit,
15   tabulate,
18 buildPythonPackage rec {
19   pname = "skops";
20   version = "0.10";
21   pyproject = true;
23   disabled = pythonOlder "3.9";
25   src = fetchFromGitHub {
26     owner = "skops-dev";
27     repo = "skops";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-2uX5sGVdTnZEbl0VXI8E7h1pQYQVbpQeUKUchCZpgg4=";
30   };
32   build-system = [ setuptools ];
34   dependencies = [
35     huggingface-hub
36     scikit-learn
37     tabulate
38   ];
40   nativeCheckInputs = [
41     matplotlib
42     pandas
43     pytestCheckHook
44     pytest-cov-stub
45     streamlit
46   ];
47   pytestFlagsArray = [ "skops" ];
48   disabledTests = [
49     # flaky
50     "test_base_case_works_as_expected"
51   ];
52   disabledTestPaths =
53     [
54       # try to download data from Huggingface Hub:
55       "skops/hub_utils/tests"
56       "skops/card/tests"
57       # minor output formatting issue
58       "skops/card/_model_card.py"
59     ]
60     ++ lib.optionals stdenv.hostPlatform.isDarwin [
61       # Segfaults on darwin
62       "skops/io/tests/test_persist.py"
63     ];
65   pythonImportsCheck = [ "skops" ];
67   meta = {
68     description = "Library for saving/loading, sharing, and deploying scikit-learn based models";
69     mainProgram = "skops";
70     homepage = "https://skops.readthedocs.io/en/stable";
71     changelog = "https://github.com/skops-dev/skops/releases/tag/v${version}";
72     license = lib.licenses.mit;
73     maintainers = [ lib.maintainers.bcdarwin ];
74   };