1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 wheel,
7 scipy,
8 numpy,
9 pydoe,
10 unittestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "pwlf";
15 version = "2.2.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "cjekel";
20 repo = "piecewise_linear_fit_py";
21 rev = "v${version}";
22 hash = "sha256-gjdahulpHjBmOlKOCPF9WmrWe4jn/+0oVI4o09EX7qE=";
23 };
24
25 nativeBuildInputs = [
26 setuptools
27 wheel
28 ];
29
30 propagatedBuildInputs = [
31 scipy
32 numpy
33 pydoe
34 ];
35
36 nativeCheckInputs = [ unittestCheckHook ];
37
38 pythonImportsCheck = [ "pwlf" ];
39
40 meta = with lib; {
41 description = "Fit piecewise linear data for a specified number of line segments";
42 homepage = "https://jekel.me/piecewise_linear_fit_py/";
43 changelog = "https://github.com/cjekel/piecewise_linear_fit_py/blob/${src.rev}/CHANGELOG.md";
44 license = licenses.mit;
45 maintainers = with maintainers; [ doronbehar ];
46 };
47}