summary refs log tree commit diff
path: root/pkgs/development/python-modules/siuba/default.nix
blob: dbaab8c6df6b587af3fbb1e6c1c0ffe6ad89d4f9 (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
61
62
63
64
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, hypothesis
, numpy
, pandas
, psycopg2
, pymysql
, python-dateutil
, pytz
, pyyaml
, six
, sqlalchemy
}:

buildPythonPackage rec {
  pname = "siuba";
  version = "0.4.4";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "machow";
    repo = "siuba";
    rev = "refs/tags/v${version}";
    hash = "sha256-rd/yQH3sbZqQAQ1AN44vChe30GMJuIlZj3Ccfv1m3lU=";
  };

  propagatedBuildInputs = [
    numpy
    pandas
    psycopg2
    pymysql
    python-dateutil
    pytz
    pyyaml
    six
    sqlalchemy
  ];

  nativeCheckInputs = [
    hypothesis
    pytestCheckHook
  ];

  # requires running mysql and postgres instances; see docker-compose.yml
  doCheck = false;

  pythonImportsCheck = [
    "siuba"
    "siuba.data"
  ];

  meta = with lib; {
    description = "Use dplyr-like syntax with pandas and SQL";
    homepage = "https://siuba.org";
    changelog = "https://github.com/machow/siuba/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ bcdarwin ];
  };
}