diff options
Diffstat (limited to 'pkgs/development/python-modules/prophet/default.nix')
-rw-r--r-- | pkgs/development/python-modules/prophet/default.nix | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/pkgs/development/python-modules/prophet/default.nix b/pkgs/development/python-modules/prophet/default.nix index 889f835861e..5a8e2dfc1fc 100644 --- a/pkgs/development/python-modules/prophet/default.nix +++ b/pkgs/development/python-modules/prophet/default.nix @@ -2,71 +2,58 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub -, fetchpatch - , setuptools , cmdstanpy , numpy , matplotlib , pandas -, lunarcalendar -, convertdate , holidays -, python-dateutil , tqdm , importlib-resources +, dask +, distributed + , pytestCheckHook }: buildPythonPackage rec { pname = "prophet"; - version = "1.1.4"; - format = "pyproject"; + version = "1.1.5"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "facebook"; repo = "prophet"; - rev = "refs/tags/v${version}"; - hash = "sha256-pbJ0xL5wDZ+rKgtQQTJPsB1Mu2QXo3S9MMpiYkURsz0="; + rev = version; + hash = "sha256-liTg5Hm+FPpRQajBnnJKBh3JPGyu0Hflntf0isj1FiQ="; }; - patches = [ - # TODO: remove when bumping version from 1.1.4 - (fetchpatch { - name = "fix-stan-file-temp-dest.patch"; - url = "https://github.com/facebook/prophet/commit/374676500795aec9d5cbc7fe5f7a96bf00489809.patch"; - hash = "sha256-sfiQ2V3ZEF0WM9oM1FkL/fhZesQJ1i2EUPYJMdDA2UM="; - relative = "python"; - }) - ]; - - sourceRoot = "${src.name}/python"; + sourceRoot = "source/python"; env.PROPHET_REPACKAGE_CMDSTAN = "false"; nativeBuildInputs = [ setuptools ]; - # TODO: update when bumping version from 1.1.4 propagatedBuildInputs = [ cmdstanpy numpy matplotlib pandas - lunarcalendar - convertdate holidays - python-dateutil tqdm importlib-resources ]; + passthru.optional-dependencies.parallel = [ dask distributed ] ++ dask.optional-dependencies.dataframe; + preCheck = '' - # the generated stan_model directory only exists in build/lib* - cd build/lib* + # use the generated files from $out for testing + mv prophet/tests . + rm -r prophet ''; nativeCheckInputs = [ pytestCheckHook ]; @@ -74,11 +61,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "prophet" ]; meta = { - homepage = "https://facebook.github.io/prophet/"; + changelog = "https://github.com/facebook/prophet/releases/tag/${src.rev}"; description = "A tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth"; - changelog = "https://github.com/facebook/prophet/releases/tag/v${version}"; + homepage = "https://facebook.github.io/prophet/"; license = lib.licenses.mit; - platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ tomasajt ]; + platforms = lib.platforms.linux; # cmdstanpy doesn't currently build on darwin }; } |