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