evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / guidance / default.nix
blobcb153aab3b64d203adf57261bb3beed793f50a45
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pytestCheckHook,
6   pythonOlder,
7   pybind11,
8   setuptools,
9   wheel,
10   aiohttp,
11   diskcache,
12   fastapi,
13   gptcache,
14   msal,
15   numpy,
16   openai,
17   ordered-set,
18   platformdirs,
19   protobuf,
20   pyformlang,
21   requests,
22   tiktoken,
23   torch,
24   uvicorn,
27 buildPythonPackage rec {
28   pname = "guidance";
29   version = "0.1.16";
30   pyproject = true;
32   disabled = pythonOlder "3.8";
34   src = fetchFromGitHub {
35     owner = "guidance-ai";
36     repo = "guidance";
37     rev = "refs/tags/${version}";
38     hash = "sha256-dPakdT97cuLv4OwdaUFncopD5X6uXGyUjwzqn9fxnhU=";
39   };
41   nativeBuildInputs = [ pybind11 ];
43   build-system = [
44     setuptools
45     wheel
46   ];
48   dependencies = [
49     aiohttp
50     diskcache
51     fastapi
52     gptcache
53     msal
54     numpy
55     openai
56     ordered-set
57     platformdirs
58     protobuf
59     pyformlang
60     requests
61     tiktoken
62     uvicorn
63   ];
65   nativeCheckInputs = [
66     pytestCheckHook
67     torch
68   ];
70   disabledTests = [
71     # require network access
72     "test_select_simple"
73     "test_commit_point"
74     "test_token_healing"
75     "test_fstring"
76     "test_fstring_custom"
77     "test_token_count"
78     "test_gpt2"
79     "test_recursion_error"
80     "test_openai_class_detection"
81     "test_openai_chat_without_roles"
83     # flaky tests
84     "test_remote_mock_gen" # frequently fails when building packages in parallel
85   ];
87   disabledTestPaths = [
88     # require network access
89     "tests/library/test_gen.py"
90   ];
92   preCheck = ''
93     export HOME=$TMPDIR
94   '';
96   pythonImportsCheck = [ "guidance" ];
98   __darwinAllowLocalNetworking = true;
100   meta = with lib; {
101     description = "Guidance language for controlling large language models";
102     homepage = "https://github.com/guidance-ai/guidance";
103     changelog = "https://github.com/guidance-ai/guidance/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
104     license = licenses.mit;
105     maintainers = with maintainers; [ natsukium ];
106   };