about summary refs log tree commit diff
path: root/pkgs/development/python-modules/swifter/default.nix
blob: 53c5ea5c508ac0be4c4af7e9fb95dadcd1beb746 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  dask,
  pandas,
  psutil,
  tqdm,
  ipywidgets,
  ray,
}:

buildPythonPackage rec {
  pname = "swifter";
  version = "1.4.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jmcarpenter2";
    repo = "swifter";
    rev = "refs/tags/${version}";
    hash = "sha256-lgdf8E9GGjeLY4ERzxqtjQuYVtdtIZt2HFLSiNBbtX4=";
  };

  build-system = [ setuptools ];

  dependencies = [
    pandas
    psutil
    dask
    tqdm
  ] ++ dask.optional-dependencies.dataframe;

  optional-dependencies = {
    groupby = [ ray ];
    notebook = [ ipywidgets ];
  };

  pythonImportsCheck = [ "swifter" ];

  # tests may hang due to ignoring cpu core limit
  # https://github.com/jmcarpenter2/swifter/issues/221
  doCheck = false;

  meta = {
    description = "Package which efficiently applies any function to a pandas dataframe or series in the fastest available manner";
    homepage = "https://github.com/jmcarpenter2/swifter";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ natsukium ];
  };
}