1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 hypothesis,
8 numpy,
9 pandas,
10 psycopg2,
11 pymysql,
12 python-dateutil,
13 pytz,
14 pyyaml,
15 six,
16 sqlalchemy,
17}:
18
19buildPythonPackage rec {
20 pname = "siuba";
21 version = "0.4.4";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "machow";
28 repo = "siuba";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-rd/yQH3sbZqQAQ1AN44vChe30GMJuIlZj3Ccfv1m3lU=";
31 };
32
33 propagatedBuildInputs = [
34 numpy
35 pandas
36 psycopg2
37 pymysql
38 python-dateutil
39 pytz
40 pyyaml
41 six
42 sqlalchemy
43 ];
44
45 nativeCheckInputs = [
46 hypothesis
47 pytestCheckHook
48 ];
49
50 # requires running mysql and postgres instances; see docker-compose.yml
51 doCheck = false;
52
53 pythonImportsCheck = [
54 "siuba"
55 "siuba.data"
56 ];
57
58 meta = with lib; {
59 description = "Use dplyr-like syntax with pandas and SQL";
60 homepage = "https://siuba.org";
61 changelog = "https://github.com/machow/siuba/releases/tag/v${version}";
62 license = licenses.mit;
63 maintainers = with maintainers; [ bcdarwin ];
64 };
65}