Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / bayesian-optimization / default.nix
blobc41181ca7b04424383538ee2a2d24b42e14e1a95
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , python
5 , scikitlearn
6 , scipy
7 , pytest
8 , isPy27
9 }:
11 buildPythonPackage rec {
12   pname = "bayesian-optimization";
13   version = "1.2.0";
14   disabled = isPy27;
16   src = fetchFromGitHub {
17     owner = "fmfn";
18     repo = "BayesianOptimization";
19     rev = version;
20     sha256 = "01mg9npiqh1qmq5ldnbpjmr8qkiw827msiv3crpkhbj4bdzasbfm";
21   };
23   propagatedBuildInputs = [
24     scikitlearn
25     scipy
26   ];
28   checkInputs = [ pytest ];
29   checkPhase = ''
30     # New sklearn broke one test: https://github.com/fmfn/BayesianOptimization/issues/243
31     pytest tests -k "not test_suggest_with_one_observation"
32   '';
34   meta = with lib; {
35     description = "A Python implementation of global optimization with gaussian processes";
36     homepage = "https://github.com/fmfn/BayesianOptimization";
37     license = licenses.mit;
38     maintainers = [ maintainers.juliendehos ];
39   };