summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/arch/default.nix
blob: d1554c0a58a34b6708ed1664d3ad3886d4486361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  cython,
  numpy,
  pandas,
  property-cached,
  pytestCheckHook,
  scipy,
  setuptools,
  setuptools-scm,
  statsmodels,
}:

buildPythonPackage rec {
  pname = "arch";
  version = "7.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "bashtage";
    repo = "arch";
    tag = "v${version}";
    hash = "sha256-3H/6mdPg8rg+N1wecqLDzc7Ot3SnUVpOagns4PsTD/Q=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace-fail 'PytestRemovedIn8Warning' 'PytestRemovedIn9Warning'
    substituteInPlace pyproject.toml \
      --replace-fail '"setuptools_scm[toml]>=8.0.3,<9",' '"setuptools_scm[toml]",'
  '';

  build-system = [
    setuptools
    setuptools-scm
    cython
  ];

  dependencies = [
    numpy
    pandas
    property-cached
    scipy
    statsmodels
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTestPaths = [
    # Skip long-running/failing tests
    "arch/tests/univariate/test_forecast.py"
    "arch/tests/univariate/test_mean.py"
  ];

  pythonImportsCheck = [ "arch" ];

  meta = {
    description = "Autoregressive Conditional Heteroskedasticity (ARCH) and other tools for financial econometrics";
    homepage = "https://github.com/bashtage/arch";
    changelog = "https://github.com/bashtage/arch/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ jherland ];
  };
}