nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 setuptools-scm,
9
10 # dependencies
11 numpy,
12 packaging,
13 pandas,
14 scipy,
15
16 # tests
17 pytestCheckHook,
18}:
19
20buildPythonPackage (finalAttrs: {
21 pname = "formulae";
22 version = "0.6.1";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "bambinos";
27 repo = "formulae";
28 tag = finalAttrs.version;
29 hash = "sha256-RrG0jkQAGq04cQ1MY5W0j76++tu7NerLC/HHpVVa5xQ=";
30 };
31
32 build-system = [
33 setuptools
34 setuptools-scm
35 ];
36
37 dependencies = [
38 numpy
39 packaging
40 pandas
41 scipy
42 ];
43
44 nativeCheckInputs = [ pytestCheckHook ];
45
46 disabledTests = [
47 # use assertions of form `assert pytest.approx(...)`, which is now disallowed:
48 "test_basic"
49 "test_degree"
50 # AssertionError
51 "test_evalenv_equality"
52 ];
53
54 pythonImportsCheck = [
55 "formulae"
56 "formulae.matrices"
57 ];
58
59 meta = {
60 homepage = "https://bambinos.github.io/formulae";
61 description = "Formulas for mixed-effects models in Python";
62 changelog = "https://github.com/bambinos/formulae/releases/tag/${finalAttrs.src.tag}";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ bcdarwin ];
65 };
66})