1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 cython,
7 fftw,
8 pandas,
9 scikit-learn,
10 numpy,
11 pip,
12 setuptools,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "mrsqm";
18 version = "0.0.7";
19 pyproject = true;
20
21 build-system = [
22 setuptools
23 ];
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchFromGitHub {
28 owner = "mlgig";
29 repo = "mrsqm";
30 tag = "v.${version}";
31 hash = "sha256-5K6vCU0HExnmYNThZNDCbEtII9bUGauxDtKkJXe/85Q=";
32 };
33
34 buildInputs = [ fftw ];
35
36 nativeBuildInputs = [ cython ];
37
38 dependencies = [
39 pandas
40 scikit-learn
41 numpy
42 pip
43 ];
44
45 postPatch = ''
46 substituteInPlace setup.py \
47 --replace-fail "'pytest-runner'" ""
48 substituteInPlace pyproject.toml \
49 --replace-fail "numpy==" "numpy>="
50 '';
51
52 preBuild = ''
53 export HOME=$(mktemp -d)
54 '';
55
56 nativeCheckInputs = [
57 pytestCheckHook
58 ];
59
60 pytestFlagsArray = [
61 "tests/mrsqm"
62 ];
63
64 pythonImportsCheck = [ "mrsqm" ];
65
66 meta = {
67 description = "MrSQM (Multiple Representations Sequence Miner) is a time series classifier";
68 homepage = "https://pypi.org/project/mrsqm";
69 changelog = "https://github.com/mlgig/mrsqm/releases/tag/v.${version}";
70 license = lib.licenses.gpl3Only;
71 maintainers = with lib.maintainers; [ mbalatsko ];
72 };
73}