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