Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 adlfs,
4 appdirs,
5 buildPythonPackage,
6 fastparquet,
7 fetchFromGitHub,
8 fsspec,
9 gcsfs,
10 humanize,
11 importlib-metadata,
12 importlib-resources,
13 jinja2,
14 joblib,
15 pandas,
16 pyarrow,
17 pytest-cases,
18 pytest-parallel,
19 pytestCheckHook,
20 pythonOlder,
21 pyyaml,
22 requests,
23 s3fs,
24 setuptools,
25 setuptools-scm,
26 xxhash,
27}:
28
29buildPythonPackage rec {
30 pname = "pins";
31 version = "0.9.0";
32 pyproject = true;
33
34 disabled = pythonOlder "3.8";
35
36 src = fetchFromGitHub {
37 owner = "rstudio";
38 repo = "pins-python";
39 tag = "v${version}";
40 hash = "sha256-1NoJ2PA0ov9ZOWaZdlajV23UqTelRzfW7jESMsfOxkg=";
41 };
42
43 build-system = [
44 setuptools
45 setuptools-scm
46 ];
47
48 dependencies = [
49 appdirs
50 fsspec
51 humanize
52 importlib-metadata
53 importlib-resources
54 jinja2
55 joblib
56 pandas
57 pyyaml
58 requests
59 xxhash
60 ];
61
62 optional-dependencies = {
63 aws = [ s3fs ];
64 azure = [ adlfs ];
65 gcs = [ gcsfs ];
66 };
67
68 nativeCheckInputs = [
69 fastparquet
70 pyarrow
71 pytest-cases
72 pytest-parallel
73 pytestCheckHook
74 ]
75 ++ lib.flatten (builtins.attrValues optional-dependencies);
76
77 pythonImportsCheck = [ "pins" ];
78
79 enabledTestPaths = [ "pins/tests/" ];
80
81 disabledTestPaths = [
82 # Tests require network access
83 "pins/tests/test_boards.py"
84 "pins/tests/test_compat.py"
85 "pins/tests/test_constructors.py"
86 "pins/tests/test_rsconnect_api.py"
87 ];
88
89 meta = with lib; {
90 description = "Module to publishes data, models and other Python objects";
91 homepage = "https://github.com/rstudio/pins-python";
92 changelog = "https://github.com/rstudio/pins-python/releases/tag/${src.tag}";
93 license = licenses.mit;
94 maintainers = with maintainers; [ fab ];
95 };
96}