2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, arviz
|
2023-02-22 10:55:15 +00:00
|
|
|
, blackjax
|
2023-02-09 11:40:11 +00:00
|
|
|
, formulae
|
|
|
|
, graphviz
|
|
|
|
, numpy
|
2023-02-22 10:55:15 +00:00
|
|
|
, numpyro
|
2023-02-09 11:40:11 +00:00
|
|
|
, pandas
|
|
|
|
, pymc
|
|
|
|
, scipy
|
2023-07-15 17:15:38 +00:00
|
|
|
, setuptools
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bambi";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.10.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bambinos";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-D04eTAlckEqgKA+59BRljlyneHYoqqZvLYmt/gBLHcU=";
|
2023-02-09 11:40:11 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
arviz
|
|
|
|
formulae
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
pymc
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
blackjax
|
|
|
|
graphviz
|
|
|
|
numpyro
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
disabledTests = [
|
2023-07-15 17:15:38 +00:00
|
|
|
# Tests require network access
|
|
|
|
"test_custom_prior"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_data_is_copied"
|
2023-07-15 17:15:38 +00:00
|
|
|
"test_distributional_model"
|
|
|
|
"test_gamma_with_splines"
|
|
|
|
"test_non_distributional_model_with_categories"
|
|
|
|
"test_non_distributional_model"
|
|
|
|
"test_normal_with_splines"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_predict_offset"
|
2023-07-15 17:15:38 +00:00
|
|
|
# Assertion issue
|
|
|
|
"test_custom_likelihood_function"
|
2023-02-09 11:40:11 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bambi"
|
|
|
|
];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://bambinos.github.io/bambi";
|
|
|
|
description = "High-level Bayesian model-building interface";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|