1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, funcy
5, matplotlib
6, tabulate
7, pytestCheckHook
8, pytest-mock
9, pytest-test-utils
10, pythonOlder
11, setuptools-scm
12}:
13
14buildPythonPackage rec {
15 pname = "dvc-render";
16 version = "0.0.9";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "iterative";
23 repo = pname;
24 rev = "refs/tags/${version}";
25 hash = "sha256-ZUIyNg+PTj5CWC65RqB1whnB+pUp1yNJQj43iSBcyvU=";
26 };
27
28 SETUPTOOLS_SCM_PRETEND_VERSION = version;
29
30 nativeBuildInputs = [
31 setuptools-scm
32 ];
33
34 passthru.optional-dependencies = {
35 table = [
36 tabulate
37 ];
38 markdown = [
39 tabulate
40 matplotlib
41 ];
42 };
43
44 checkInputs = [
45 funcy
46 pytestCheckHook
47 pytest-mock
48 pytest-test-utils
49 ]
50 ++ passthru.optional-dependencies.table
51 ++ passthru.optional-dependencies.markdown;
52
53 pythonImportsCheck = [
54 "dvc_render"
55 ];
56
57 meta = with lib; {
58 description = "Library for rendering DVC plots";
59 homepage = "https://github.com/iterative/dvc-render";
60 license = licenses.asl20;
61 maintainers = with maintainers; [ fab anthonyroussel ];
62 };
63}