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