at master 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 setuptools, 7 8 cmdstanpy, 9 numpy, 10 matplotlib, 11 pandas, 12 holidays, 13 tqdm, 14 importlib-resources, 15 16 dask, 17 distributed, 18 19 pytestCheckHook, 20}: 21 22buildPythonPackage rec { 23 pname = "prophet"; 24 version = "1.1.7"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.7"; 28 29 src = fetchFromGitHub { 30 owner = "facebook"; 31 repo = "prophet"; 32 tag = "v${version}"; 33 hash = "sha256-94hxpfpZN3yvDUu+kM7Oc2Yu8+z0Gv6zqYRAwKXgHk4="; 34 }; 35 36 sourceRoot = "${src.name}/python"; 37 38 env.PROPHET_REPACKAGE_CMDSTAN = "false"; 39 40 nativeBuildInputs = [ setuptools ]; 41 42 propagatedBuildInputs = [ 43 cmdstanpy 44 numpy 45 matplotlib 46 pandas 47 holidays 48 tqdm 49 importlib-resources 50 ]; 51 52 optional-dependencies.parallel = [ 53 dask 54 distributed 55 ] 56 ++ dask.optional-dependencies.dataframe; 57 58 preCheck = '' 59 # use the generated files from $out for testing 60 mv prophet/tests . 61 rm -r prophet 62 ''; 63 64 nativeCheckInputs = [ pytestCheckHook ]; 65 66 pythonImportsCheck = [ "prophet" ]; 67 68 meta = { 69 changelog = "https://github.com/facebook/prophet/releases/tag/${src.tag}"; 70 description = "Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth"; 71 homepage = "https://facebook.github.io/prophet/"; 72 license = lib.licenses.mit; 73 maintainers = with lib.maintainers; [ tomasajt ]; 74 }; 75}