vscode-extensions.yoavbls.pretty-ts-errors: 0.5.4 -> 0.6.1 (#363464)
[NixPkgs.git] / pkgs / development / python-modules / bambi / default.nix
bloba71d435f862b1413b9449ff0dd2c575ffc71d20a
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
7   # build-system
8   setuptools,
9   setuptools-scm,
11   # dependencies
12   arviz,
13   formulae,
14   graphviz,
15   pandas,
16   pymc,
18   # tests
19   blackjax,
20   numpyro,
21   pytestCheckHook,
24 buildPythonPackage rec {
25   pname = "bambi";
26   version = "0.15.0";
27   pyproject = true;
29   src = fetchFromGitHub {
30     owner = "bambinos";
31     repo = "bambi";
32     tag = version;
33     hash = "sha256-G8RKTccsJRcLgTQPTOXAgK6ViVEwIQydUwdAexEJ2bc=";
34   };
36   build-system = [
37     setuptools
38     setuptools-scm
39   ];
41   dependencies = [
42     arviz
43     formulae
44     graphviz
45     pandas
46     pymc
47   ];
49   optional-dependencies = {
50     jax = [
51       # not (yet) available in nixpkgs (https://github.com/NixOS/nixpkgs/pull/345438)
52       # bayeux-ml
53     ];
54   };
56   nativeCheckInputs = [
57     # bayeux-ml
58     blackjax
59     numpyro
60     pytestCheckHook
61   ];
63   preCheck = ''
64     export HOME=$(mktemp -d)
65   '';
67   disabledTests =
68     [
69       # Tests require network access
70       "test_alias_equal_to_name"
71       "test_average_by"
72       "test_ax"
73       "test_basic"
74       "test_censored_response"
75       "test_custom_prior"
76       "test_data_is_copied"
77       "test_distributional_model"
78       "test_elasticity"
79       "test_extra_namespace"
80       "test_fig_kwargs"
81       "test_gamma_with_splines"
82       "test_group_effects"
83       "test_hdi_prob"
84       "test_legend"
85       "test_model_with_group_specific_effects"
86       "test_model_with_intercept"
87       "test_model_without_intercept"
88       "test_non_distributional_model"
89       "test_normal_with_splines"
90       "test_predict_new_groups_fail"
91       "test_predict_new_groups"
92       "test_predict_offset"
93       "test_set_alias_warnings"
94       "test_subplot_kwargs"
95       "test_transforms"
96       "test_use_hdi"
97       "test_with_group_and_panel"
98       "test_with_groups"
99       "test_with_user_values"
100     ]
101     ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
102       # Python crash (in matplotlib)
103       # Fatal Python error: Aborted
104       "test_categorical_response"
105       "test_multiple_hsgp_and_by"
106       "test_multiple_outputs_with_alias"
107       "test_plot_priors"
108       "test_term_transformations"
109     ];
111   disabledTestPaths = [
112     # bayeux-ml is not available
113     "tests/test_alternative_samplers.py"
114     # Tests require network access
115     "tests/test_interpret.py"
116     "tests/test_interpret_messages.py"
117   ];
119   pythonImportsCheck = [ "bambi" ];
121   meta = {
122     description = "High-level Bayesian model-building interface";
123     homepage = "https://bambinos.github.io/bambi";
124     changelog = "https://github.com/bambinos/bambi/releases/tag/${src.tag}";
125     license = lib.licenses.mit;
126     maintainers = with lib.maintainers; [ bcdarwin ];
127   };