vscode-extensions.github.copilot{*}: bump (#364729)
[NixPkgs.git] / pkgs / development / python-modules / instructor / default.nix
bloba82c88bf0d7a6663abea2883a7b441498bea183f
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   poetry-core,
9   # dependencies
10   aiohttp,
11   docstring-parser,
12   jiter,
13   openai,
14   pydantic,
15   rich,
16   tenacity,
17   typer,
19   # tests
20   anthropic,
21   diskcache,
22   fastapi,
23   google-generativeai,
24   jinja2,
25   pytest-asyncio,
26   pytestCheckHook,
27   python-dotenv,
28   redis,
31 buildPythonPackage rec {
32   pname = "instructor";
33   version = "1.6.4";
34   pyproject = true;
36   src = fetchFromGitHub {
37     owner = "jxnl";
38     repo = "instructor";
39     rev = "refs/tags/${version}";
40     hash = "sha256-iPTZFXypcpO+PkcJHTdpkpiIU589XPcy+aNO/JqASCQ=";
41   };
43   pythonRelaxDeps = [
44     "docstring-parser"
45     "jiter"
46     "pydantic"
47     "tenacity"
48   ];
50   build-system = [ poetry-core ];
52   dependencies = [
53     aiohttp
54     docstring-parser
55     jiter
56     openai
57     pydantic
58     rich
59     tenacity
60     typer
61   ];
63   nativeCheckInputs = [
64     anthropic
65     diskcache
66     fastapi
67     google-generativeai
68     jinja2
69     pytest-asyncio
70     pytestCheckHook
71     python-dotenv
72     redis
73   ];
75   pythonImportsCheck = [ "instructor" ];
77   disabledTests = [
78     # Tests require OpenAI API key
79     "successfully"
80     "test_mode_functions_deprecation_warning"
81     "test_partial"
83     # Requires unpackaged `vertexai`
84     "test_json_preserves_description_of_non_english_characters_in_json_mode"
85   ];
87   disabledTestPaths = [
88     # Tests require OpenAI API key
89     "tests/test_distil.py"
90     "tests/llm/"
91   ];
93   meta = {
94     broken = lib.versionOlder pydantic.version "2"; # ImportError: cannot import name 'TypeAdapter' from 'pydantic'
95     description = "Structured outputs for llm";
96     homepage = "https://github.com/jxnl/instructor";
97     changelog = "https://github.com/jxnl/instructor/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
98     license = lib.licenses.mit;
99     maintainers = with lib.maintainers; [ mic92 ];
100     mainProgram = "instructor";
101   };