at master 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # dependencies 7 google-generativeai, 8 joblib, 9 networkx, 10 numpy, 11 opt-einsum, 12 pandas, 13 pyparsing, 14 pyro-ppl, 15 scikit-learn, 16 scipy, 17 statsmodels, 18 torch, 19 tqdm, 20 xgboost, 21 22 # tests 23 pytestCheckHook, 24 pytest-cov-stub, 25 coverage, 26 mock, 27 black, 28}: 29buildPythonPackage rec { 30 pname = "pgmpy"; 31 version = "1.0.0"; 32 pyproject = true; 33 34 src = fetchFromGitHub { 35 owner = "pgmpy"; 36 repo = "pgmpy"; 37 tag = "v${version}"; 38 hash = "sha256-WmRtek3lN7vEfXqoaZDiaNjMQ7R2PmJ/OEwxOV7m5sE="; 39 }; 40 41 dependencies = [ 42 google-generativeai 43 joblib 44 networkx 45 numpy 46 opt-einsum 47 pandas 48 pyparsing 49 pyro-ppl 50 scikit-learn 51 scipy 52 statsmodels 53 torch 54 tqdm 55 xgboost 56 ]; 57 58 disabledTests = [ 59 # flaky: 60 # AssertionError: -45.78899127622197 != -45.788991276221964 61 "test_score" 62 63 # self.assertTrue(np.isclose(coef, dep_coefs[i], atol=1e-4)) 64 # AssertionError: False is not true 65 "test_pillai" 66 67 # requires optional dependency daft 68 "test_to_daft" 69 70 # AssertionError 71 "test_estimate_example_smoke_test" 72 ]; 73 74 nativeCheckInputs = [ 75 pytestCheckHook 76 # xdoctest 77 pytest-cov-stub 78 coverage 79 mock 80 black 81 ]; 82 83 pythonImportsCheck = [ "pgmpy" ]; 84 85 meta = { 86 description = "Python Library for learning (Structure and Parameter), inference (Probabilistic and Causal), and simulations in Bayesian Networks"; 87 homepage = "https://github.com/pgmpy/pgmpy"; 88 changelog = "https://github.com/pgmpy/pgmpy/releases/tag/${src.tag}"; 89 license = lib.licenses.mit; 90 maintainers = with lib.maintainers; [ happysalada ]; 91 }; 92}