2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, setuptools
|
2023-02-09 11:40:11 +00:00
|
|
|
, arviz
|
|
|
|
, formulae
|
|
|
|
, graphviz
|
|
|
|
, pandas
|
|
|
|
, pymc
|
2023-11-16 04:20:00 +00:00
|
|
|
, blackjax
|
|
|
|
, numpyro
|
|
|
|
, pytestCheckHook
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bambi";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.13.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bambinos";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = "bambi";
|
2023-02-09 11:40:11 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-9+uTyV3mQlHOKAjXohwkhTzNe/+I5XR/LuH1ZYvhc8I=";
|
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
|
2023-11-16 04:20:00 +00:00
|
|
|
graphviz
|
2023-02-09 11:40:11 +00:00
|
|
|
pandas
|
|
|
|
pymc
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
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
|
2023-10-19 13:55:26 +00:00
|
|
|
"test_alias_equal_to_name"
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_average_by"
|
|
|
|
"test_ax"
|
|
|
|
"test_basic"
|
|
|
|
"test_censored_response"
|
2023-07-15 17:15:38 +00:00
|
|
|
"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"
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_elasticity"
|
2023-10-19 13:55:26 +00:00
|
|
|
"test_extra_namespace"
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_fig_kwargs"
|
2023-07-15 17:15:38 +00:00
|
|
|
"test_gamma_with_splines"
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_group_effects"
|
|
|
|
"test_hdi_prob"
|
|
|
|
"test_legend"
|
2023-07-15 17:15:38 +00:00
|
|
|
"test_non_distributional_model"
|
|
|
|
"test_normal_with_splines"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_predict_offset"
|
2023-10-19 13:55:26 +00:00
|
|
|
"test_predict_new_groups"
|
|
|
|
"test_predict_new_groups_fail"
|
|
|
|
"test_set_alias_warnings"
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_subplot_kwargs"
|
|
|
|
"test_transforms"
|
|
|
|
"test_use_hdi"
|
|
|
|
"test_with_groups"
|
|
|
|
"test_with_group_and_panel"
|
|
|
|
"test_with_user_values"
|
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";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://github.com/bambinos/bambi/releases/tag/${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|