1{
2 lib,
3 astor,
4 buildPythonPackage,
5 fetchFromGitHub,
6 git,
7 hatch-vcs,
8 hatchling,
9 interface-meta,
10 numpy,
11 pandas,
12 pytestCheckHook,
13 pythonOlder,
14 scipy,
15 sympy,
16 typing-extensions,
17 wrapt,
18}:
19
20buildPythonPackage rec {
21 pname = "formulaic";
22 version = "1.0.1";
23 pyproject = true;
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchFromGitHub {
28 owner = "matthewwardrop";
29 repo = "formulaic";
30 rev = "refs/tags/v${version}";
31 hash = "sha256-qivWv1LtFkW55tVKD/Zjd8Q5gVbxhDpZ0inkV6NR7bA=";
32 };
33
34 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
35
36 nativeBuildInputs = [
37 hatchling
38 hatch-vcs
39 ];
40
41 propagatedBuildInputs = [
42 astor
43 numpy
44 pandas
45 scipy
46 wrapt
47 typing-extensions
48 interface-meta
49 sympy
50 ];
51
52 nativeCheckInputs = [ pytestCheckHook ];
53
54 pythonImportsCheck = [ "formulaic" ];
55
56 disabledTestPaths = [ "tests/transforms/test_poly.py" ];
57
58 meta = with lib; {
59 description = "High-performance implementation of Wilkinson formulas";
60 homepage = "https://matthewwardrop.github.io/formulaic/";
61 changelog = "https://github.com/matthewwardrop/formulaic/releases/tag/v${version}";
62 license = licenses.mit;
63 maintainers = with maintainers; [ swflint ];
64 };
65}