depot/third_party/nixpkgs/pkgs/development/python-modules/bambi/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

80 lines
1.4 KiB
Nix

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