2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
|
|
|
hypothesis,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
psycopg2,
|
|
|
|
pymysql,
|
|
|
|
python-dateutil,
|
|
|
|
pytz,
|
|
|
|
pyyaml,
|
|
|
|
six,
|
|
|
|
sqlalchemy,
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "siuba";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.4.4";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "machow";
|
|
|
|
repo = "siuba";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-rd/yQH3sbZqQAQ1AN44vChe30GMJuIlZj3Ccfv1m3lU=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
psycopg2
|
|
|
|
pymysql
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
six
|
|
|
|
sqlalchemy
|
|
|
|
];
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
nativeCheckInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2023-10-19 13:55:26 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
# requires running mysql and postgres instances; see docker-compose.yml
|
2023-10-19 13:55:26 +00:00
|
|
|
doCheck = false;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"siuba"
|
|
|
|
"siuba.data"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Use dplyr-like syntax with pandas and SQL";
|
|
|
|
homepage = "https://siuba.org";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://github.com/machow/siuba/releases/tag/v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|