From 643b464914762ec890e6a3945ec557dc4793fb74 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 4 Oct 2024 16:44:01 +0200 Subject: [PATCH] python312Packages.instructor: 1.3.7 -> 1.5.0 Diff: https://github.com/jxnl/instructor/compare/refs/tags/1.3.7...1.5.0 Changelog: https://github.com/jxnl/instructor/releases/tag/v1.5.0 --- .../python-modules/instructor/default.nix | 50 +++++++++++-------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/instructor/default.nix b/pkgs/development/python-modules/instructor/default.nix index 31207450761f..b6b51142e80e 100644 --- a/pkgs/development/python-modules/instructor/default.nix +++ b/pkgs/development/python-modules/instructor/default.nix @@ -1,38 +1,42 @@ { lib, - aiohttp, - anthropic, buildPythonPackage, - docstring-parser, fetchFromGitHub, + + # build-system + poetry-core, + + # dependencies + aiohttp, + docstring-parser, jiter, openai, - poetry-core, pydantic, - pytest-examples, - pytest-asyncio, - pytestCheckHook, - fastapi, - diskcache, - redis, - pythonOlder, rich, tenacity, typer, + + # tests + anthropic, + diskcache, + fastapi, + google-generativeai, + jinja2, + pytest-asyncio, + pytestCheckHook, + redis, }: buildPythonPackage rec { pname = "instructor"; - version = "1.3.7"; + version = "1.5.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "jxnl"; repo = "instructor"; rev = "refs/tags/${version}"; - hash = "sha256-XouTXv8wNPPBKVs2mCue1o4hfHlPlq6uXBuDXiZLIHI="; + hash = "sha256-UrLbKDaQu2ioQHqKKS8SdRTpQj+Z0w+bcLrRuZT3DC0="; }; pythonRelaxDeps = [ @@ -57,12 +61,13 @@ buildPythonPackage rec { nativeCheckInputs = [ anthropic - fastapi - redis diskcache + fastapi + google-generativeai + jinja2 pytest-asyncio - pytest-examples pytestCheckHook + redis ]; pythonImportsCheck = [ "instructor" ]; @@ -72,6 +77,9 @@ buildPythonPackage rec { "successfully" "test_mode_functions_deprecation_warning" "test_partial" + + # Requires unpackaged `vertexai` + "test_json_preserves_description_of_non_english_characters_in_json_mode" ]; disabledTestPaths = [ @@ -80,12 +88,12 @@ buildPythonPackage rec { "tests/llm/" ]; - meta = with lib; { + meta = { description = "Structured outputs for llm"; homepage = "https://github.com/jxnl/instructor"; changelog = "https://github.com/jxnl/instructor/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ mic92 ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ mic92 ]; mainProgram = "instructor"; }; }