depot/third_party/nixpkgs/pkgs/development/python-modules/langsmith/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

90 lines
1.8 KiB
Nix

{ lib
, attr
, buildPythonPackage
, fetchFromGitHub
, freezegun
, orjson
, poetry-core
, pydantic
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
, requests
}:
buildPythonPackage rec {
pname = "langsmith";
version = "0.1.10";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langsmith-sdk";
rev = "refs/tags/v${version}";
hash = "sha256-9My/0DPN6AwAFoAiTdl6jd2GtX4fpFIgpnZe/WzAi9c=";
};
sourceRoot = "${src.name}/python";
pythonRelaxDeps = [
"orjson"
];
nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = [
orjson
pydantic
requests
];
nativeCheckInputs = [
attr
freezegun
pytest-asyncio
pytestCheckHook
];
disabledTests = [
# These tests require network access
"integration_tests"
# due to circular import
"test_as_runnable"
"test_as_runnable_batch"
"test_as_runnable_async"
"test_as_runnable_async_batch"
# requires git repo
"test_git_info"
# Tests require OpenAI API key
"test_chat_async_api"
"test_chat_sync_api"
"test_completions_async_api"
"test_completions_sync_api"
];
disabledTestPaths = [
# due to circular import
"tests/integration_tests/test_client.py"
"tests/unit_tests/test_client.py"
];
pythonImportsCheck = [
"langsmith"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform";
homepage = "https://github.com/langchain-ai/langsmith-sdk";
changelog = "https://github.com/langchain-ai/langsmith-sdk/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
}