Something went wrong. Try again.
lol
Something went wrong. Try again.
2.4 kB · 121 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122{ lib, stdenv, buildPythonPackage, fetchFromGitHub,
# build-system hatchling,
# dependencies httpx, orjson, pydantic, requests, requests-toolbelt, uuid-utils, xxhash, zstandard,
# tests anthropic, attrs, dataclasses-json, multipart, opentelemetry-sdk, pytest-asyncio, pytest-httpx, pytest-socket, pytest-vcr, pytestCheckHook,}:
buildPythonPackage (finalAttrs: { pname = "langsmith"; version = "0.7.32"; pyproject = true;
src = fetchFromGitHub { owner = "langchain-ai"; repo = "langsmith-sdk"; tag = "v${finalAttrs.version}"; hash = "sha256-OFsxQfEIQ0Z82MqWqn8U5kphSk2G89bEfyyXWF7nc84="; };
sourceRoot = "${finalAttrs.src.name}/python";
pythonRelaxDeps = [ "orjson" ];
build-system = [ hatchling ];
dependencies = [ httpx orjson pydantic requests requests-toolbelt uuid-utils xxhash zstandard ];
nativeCheckInputs = [ anthropic attrs dataclasses-json multipart opentelemetry-sdk pytest-asyncio pytest-httpx pytest-socket pytest-vcr pytestCheckHook ];
# evaluation and external tests require OpenAPI key # integration tests are all marked flaky enabledTestPaths = [ "tests/unit_tests" ];
disabledTestMarks = [ "flaky" ];
disabledTests = [ # due to circular import "test_as_runnable" "test_as_runnable_batch" "test_as_runnable_async" "test_as_runnable_async_batch" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # flaky (timing sensitive) "test_refresh_loop_continues_after_500_errors" ];
disabledTestPaths = [ # due to circular import "tests/unit_tests/test_client.py" "tests/unit_tests/evaluation/test_runner.py"
# google-adk isn't packaged (and has an enormous number of dependencies) "tests/unit_tests/wrappers/test_google_adk.py" ];
pythonImportsCheck = [ "langsmith" ];
__darwinAllowLocalNetworking = true;
meta = { 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/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ natsukium sarahec ]; mainProgram = "langsmith"; };})