depot/third_party/nixpkgs/pkgs/development/python-modules/langsmith/default.nix

75 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, freezegun
, poetry-core
, pydantic
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "langsmith";
version = "0.0.83";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langsmith-sdk";
rev = "refs/tags/v${version}";
hash = "sha256-WRrwekh4pcn3I0U/A2Q91ePrRx2RUC3XX+z4bez0BzU=";
};
sourceRoot = "${src.name}/python";
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
pydantic
requests
];
nativeCheckInputs = [
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"
];
disabledTestPaths = [
# due to circular import
"tests/integration_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 ];
};
}