2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-10-29 11:11:06 +00:00
|
|
|
arviz,
|
|
|
|
blackjax,
|
2024-06-05 15:53:02 +00:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
formulae,
|
|
|
|
graphviz,
|
2024-10-29 11:11:06 +00:00
|
|
|
numpyro,
|
2024-06-05 15:53:02 +00:00
|
|
|
pandas,
|
|
|
|
pymc,
|
|
|
|
pytestCheckHook,
|
2024-10-29 11:11:06 +00:00
|
|
|
pythonOlder,
|
|
|
|
setuptools-scm,
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bambi";
|
2024-10-29 11:11:06 +00:00
|
|
|
version = "0.14.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-10-29 11:11:06 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
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}";
|
2024-10-29 11:11:06 +00:00
|
|
|
hash = "sha256-kxrNNbZfC96/XHb1I7aUHYZdFJvGR80ZI8ell/0FQXc=";
|
2023-02-09 11:40:11 +00:00
|
|
|
};
|
|
|
|
|
2024-10-29 11:11:06 +00:00
|
|
|
build-system = [ setuptools-scm ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-10-29 11:11:06 +00:00
|
|
|
dependencies = [
|
2023-02-09 11:40:11 +00:00
|
|
|
arviz
|
|
|
|
formulae
|
2023-11-16 04:20:00 +00:00
|
|
|
graphviz
|
2023-02-09 11:40:11 +00:00
|
|
|
pandas
|
|
|
|
pymc
|
|
|
|
];
|
|
|
|
|
2024-10-29 11:11:06 +00:00
|
|
|
# bayeux-ml is not available in nixpkgs
|
|
|
|
# optional-dependencies = {
|
|
|
|
# jax = [ bayeux-ml ];
|
|
|
|
# };
|
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
|
|
|
|
2024-10-29 11:11:06 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
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"
|
2024-10-29 11:11:06 +00:00
|
|
|
"test_model_with_group_specific_effects"
|
|
|
|
"test_model_with_intercept"
|
|
|
|
"test_model_without_intercept"
|
2023-07-15 17:15:38 +00:00
|
|
|
"test_non_distributional_model"
|
|
|
|
"test_normal_with_splines"
|
2023-10-19 13:55:26 +00:00
|
|
|
"test_predict_new_groups_fail"
|
2024-10-29 11:11:06 +00:00
|
|
|
"test_predict_new_groups"
|
|
|
|
"test_predict_offset"
|
2023-10-19 13:55:26 +00:00
|
|
|
"test_set_alias_warnings"
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_subplot_kwargs"
|
|
|
|
"test_transforms"
|
|
|
|
"test_use_hdi"
|
|
|
|
"test_with_group_and_panel"
|
2024-10-29 11:11:06 +00:00
|
|
|
"test_with_groups"
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_with_user_values"
|
2023-02-09 11:40:11 +00:00
|
|
|
];
|
|
|
|
|
2024-10-29 11:11:06 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# bayeux-ml is not available
|
|
|
|
"tests/test_alternative_samplers.py"
|
|
|
|
# Tests require network access
|
|
|
|
"tests/test_interpret.py"
|
|
|
|
"tests/test_interpret_messages.py"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "bambi" ];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High-level Bayesian model-building interface";
|
2024-10-29 11:11:06 +00:00
|
|
|
homepage = "https://bambinos.github.io/bambi";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|