python312Packages.langchain-tests: rename from langchain-standard-tests

This commit is contained in:
natsukium 2025-01-22 19:42:31 +09:00
parent c8fd1c540f
commit 54fa47bf3f
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53
8 changed files with 33 additions and 21 deletions

View File

@ -13,7 +13,7 @@
pydantic,
# tests
langchain-standard-tests,
langchain-tests,
pytest-asyncio,
pytestCheckHook,
}:
@ -55,7 +55,7 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
langchain-standard-tests
langchain-tests
pytest-asyncio
pytestCheckHook
];

View File

@ -25,7 +25,7 @@
# tests
httpx,
langchain-standard-tests,
langchain-tests,
lark,
pandas,
pytest-asyncio,
@ -82,7 +82,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
httpx
langchain-standard-tests
langchain-tests
lark
pandas
pytest-asyncio

View File

@ -22,6 +22,8 @@
freezegun,
grandalf,
httpx,
langchain-core,
langchain-tests,
numpy,
pytest-asyncio,
pytest-mock,
@ -66,10 +68,14 @@ buildPythonPackage rec {
pythonImportsCheck = [ "langchain_core" ];
# avoid infinite recursion
doCheck = false;
nativeCheckInputs = [
freezegun
grandalf
httpx
langchain-tests
numpy
pytest-asyncio
pytest-mock
@ -80,13 +86,10 @@ buildPythonPackage rec {
pytestFlagsArray = [ "tests/unit_tests" ];
# don't add langchain-standard-tests to nativeCheckInputs
# to avoid circular import
preCheck = ''
export PYTHONPATH=${src}/libs/standard-tests:$PYTHONPATH
'';
passthru = {
tests.pytest = langchain-core.overridePythonAttrs (_: {
doCheck = true;
});
# Updates to core tend to drive updates in everything else
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell

View File

@ -11,7 +11,7 @@
ollama,
# testing
langchain-standard-tests,
langchain-tests,
pytestCheckHook,
pytest-asyncio,
syrupy,
@ -41,7 +41,7 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
langchain-standard-tests
langchain-tests
pytestCheckHook
pytest-asyncio
syrupy

View File

@ -13,7 +13,7 @@
# tests
freezegun,
langchain-standard-tests,
langchain-tests,
lark,
pandas,
pytest-asyncio,
@ -55,7 +55,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
freezegun
langchain-standard-tests
langchain-tests
lark
pandas
pytest-asyncio

View File

@ -1,6 +1,7 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
poetry-core,
@ -16,16 +17,22 @@
# tests
numpy,
pytest-asyncio,
pytest-socket,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "langchain-standard-tests";
pname = "langchain-tests";
version = "0.3.8";
pyproject = true;
# this is an internal library, so there are no tags
# sync source with langchain-core for easy updates
inherit (langchain-core) src version;
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
tag = "langchain-tests==${version}";
hash = "sha256-IZJo4EZFVKinBQdacM5xQ8ip3qTB64eqwZ9n+Z5mzWY=";
};
sourceRoot = "${src.name}/libs/standard-tests";
build-system = [ poetry-core ];
@ -33,16 +40,17 @@ buildPythonPackage rec {
dependencies = [
httpx
langchain-core
pytest-asyncio
pytest-socket
syrupy
];
buildInputs = [ pytest ];
pythonImportsCheck = [ "langchain_standard_tests" ];
pythonImportsCheck = [ "langchain_tests" ];
nativeBuildInputs = [
numpy
pytest-asyncio
pytestCheckHook
];

View File

@ -331,6 +331,7 @@ mapAliases ({
keyring_24 = throw "keyring_24 has been removed, use keyring instead"; # added 2025-01-01
ldap = python-ldap; # added 2022-09-16
lammps-cython = throw "lammps-cython no longer builds and is unmaintained"; # added 2021-07-04
langchain-standard-tests = langchain-tests; # added 2025-01-22
langchainplus-sdk = langsmith; # added 2023-08-01
lazr_config = lazr-config; # added 2023-11-03
lazr_delegates = lazr-delegates; # added 2023-11-03

View File

@ -7112,7 +7112,7 @@ self: super: with self; {
langchain-openai = callPackage ../development/python-modules/langchain-openai { };
langchain-standard-tests = callPackage ../development/python-modules/langchain-standard-tests { };
langchain-tests = callPackage ../development/python-modules/langchain-tests { };
langchain-text-splitters = callPackage ../development/python-modules/langchain-text-splitters { };