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