1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 niapy,
6 numpy,
7 pandas,
8 poetry-core,
9 pytestCheckHook,
10 pythonOlder,
11 pythonRelaxDepsHook,
12 scikit-learn,
13 toml-adapt,
14}:
15
16buildPythonPackage rec {
17 pname = "niaaml";
18 version = "2.0.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "lukapecnik";
25 repo = "NiaAML";
26 rev = "refs/tags/${version}";
27 hash = "sha256-d6UlpMrT0GBZlcD1BCZxInXTdyFMBVltxnSyUFbSy0g=";
28 };
29
30 pythonRelaxDeps = [ "pandas" ];
31
32 nativeBuildInputs = [
33 poetry-core
34 pythonRelaxDepsHook
35 toml-adapt
36 ];
37
38 propagatedBuildInputs = [
39 niapy
40 numpy
41 pandas
42 scikit-learn
43 ];
44
45 # create scikit-learn and niapy deps version consistent
46 preBuild = ''
47 toml-adapt -path pyproject.toml -a change -dep scikit-learn -ver X
48 toml-adapt -path pyproject.toml -a change -dep niapy -ver X
49 '';
50
51 nativeCheckInputs = [ pytestCheckHook ];
52
53 pythonImportsCheck = [ "niaaml" ];
54
55 meta = with lib; {
56 description = "Python automated machine learning framework";
57 homepage = "https://github.com/lukapecnik/NiaAML";
58 changelog = "https://github.com/lukapecnik/NiaAML/releases/tag/${version}";
59 license = licenses.mit;
60 maintainers = with maintainers; [ firefly-cpp ];
61 };
62}