1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, niapy
5, numpy
6, pandas
7, poetry-core
8, scikit-learn
9, toml-adapt
10, pytestCheckHook
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "niaclass";
16 version = "0.1.4";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "lukapecnik";
23 repo = "NiaClass";
24 rev = "refs/tags/${version}";
25 sha256 = "sha256-md1e/cOIOQKoB760E5hjzjCsC5tS1CzgqAPTeVtrmuo=";
26 };
27
28 nativeBuildInputs = [
29 poetry-core
30 toml-adapt
31 ];
32
33 propagatedBuildInputs = [
34 niapy
35 numpy
36 pandas
37 scikit-learn
38 ];
39
40 # create scikit-learn dep version consistent
41 preBuild = ''
42 toml-adapt -path pyproject.toml -a change -dep scikit-learn -ver X
43 '';
44
45 checkInputs = [
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [
50 "niaclass"
51 ];
52
53 meta = with lib; {
54 description = "A framework for solving classification tasks using Nature-inspired algorithms";
55 homepage = "https://github.com/lukapecnik/NiaClass";
56 license = licenses.mit;
57 maintainers = with maintainers; [ firefly-cpp ];
58 };
59}
60