1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 niapy,
6 nltk,
7 numpy,
8 pandas,
9 plotly,
10 poetry-core,
11 pytestCheckHook,
12 pythonOlder,
13 scikit-learn,
14 tomli,
15}:
16
17buildPythonPackage rec {
18 pname = "niaarm";
19 version = "0.3.12";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchFromGitHub {
25 owner = "firefly-cpp";
26 repo = "NiaARM";
27 rev = "refs/tags/${version}";
28 hash = "sha256-rYFfLtPJgIdSjRIzDIQeHwoQm9NrI6nM3/BF7wAMr1Y=";
29 };
30
31 pythonRelaxDeps = [ "scikit-learn" ];
32
33 nativeBuildInputs = [ poetry-core ];
34
35 propagatedBuildInputs = [
36 niapy
37 nltk
38 numpy
39 pandas
40 plotly
41 scikit-learn
42 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
43
44 disabledTests = [
45 # Test requires extra nltk data dependency
46 "test_text_mining"
47 ];
48
49 nativeCheckInputs = [ pytestCheckHook ];
50
51 pythonImportsCheck = [ "niaarm" ];
52
53 meta = with lib; {
54 description = "Minimalistic framework for Numerical Association Rule Mining";
55 mainProgram = "niaarm";
56 homepage = "https://github.com/firefly-cpp/NiaARM";
57 changelog = "https://github.com/firefly-cpp/NiaARM/blob/${version}/CHANGELOG.md";
58 license = licenses.mit;
59 maintainers = with maintainers; [ firefly-cpp ];
60 };
61}