Files
nixpkgs/pkgs/development/python-modules/prophet/default.nix
T
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

75 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
setuptools,
cmdstanpy,
numpy,
matplotlib,
pandas,
holidays,
tqdm,
importlib-resources,
dask,
distributed,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "prophet";
version = "1.1.6";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "facebook";
repo = "prophet";
rev = "v${version}";
hash = "sha256-vvSn2sVs6KZsTAKPuq9irlHgM1BmpkG8LJbvcu8ohd0=";
};
sourceRoot = "${src.name}/python";
env.PROPHET_REPACKAGE_CMDSTAN = "false";
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
cmdstanpy
numpy
matplotlib
pandas
holidays
tqdm
importlib-resources
];
optional-dependencies.parallel = [
dask
distributed
] ++ dask.optional-dependencies.dataframe;
preCheck = ''
# use the generated files from $out for testing
mv prophet/tests .
rm -r prophet
'';
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "prophet" ];
meta = {
changelog = "https://github.com/facebook/prophet/releases/tag/${src.rev}";
description = "Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth";
homepage = "https://facebook.github.io/prophet/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tomasajt ];
};
}