From 5891a8e987b1889d1d302764a17f259de279b405 Mon Sep 17 00:00:00 2001 From: Maksym Balatsko Date: Tue, 26 Sep 2023 03:29:56 -0700 Subject: [PATCH] python3Packages.tbats: init at 1.1.3 --- .../python-modules/tbats/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/tbats/default.nix diff --git a/pkgs/development/python-modules/tbats/default.nix b/pkgs/development/python-modules/tbats/default.nix new file mode 100644 index 000000000000..8976fef859d3 --- /dev/null +++ b/pkgs/development/python-modules/tbats/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, numpy +, pmdarima +, scikit-learn +, scipy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "tbats"; + version = "1.1.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "intive-DataScience"; + repo = "tbats"; + rev = version; + hash = "sha256-f6QqDq/ffbnFBZRAT6KQRlqvZZSE+Pff2/o+htVabZI="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + numpy + pmdarima + scikit-learn + scipy + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + pytestFlagsArray = [ + # test_R folder is just for comparison of results with R lib + # we need only test folder + "test/" + + # several tests has same name, so we use --deselect instead of disableTests + + # Test execution is too long > 15 min + "--deselect=test/tbats/TBATS_test.py::TestTBATS::test_fit_predict_trigonometric_seasonal" + ]; + + pythonImportsCheck = [ "tbats" ]; + + meta = with lib; { + description = "BATS and TBATS forecasting methods"; + homepage = "https://github.com/intive-DataScience/tbats"; + changelog = "https://github.com/intive-DataScience/tbats/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ mbalatsko ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aac55bdb2680..c12e94a8358b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12704,6 +12704,8 @@ self: super: with self; { taxi = callPackage ../development/python-modules/taxi { }; + tbats = callPackage ../development/python-modules/tbats { }; + tblib = callPackage ../development/python-modules/tblib { }; tblite = callPackage ../development/libraries/science/chemistry/tblite/python.nix {