python3Packages.langchain*: bulk update (#394752)
This commit is contained in:
@@ -37,14 +37,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-community";
|
||||
version = "0.3.19";
|
||||
version = "0.3.20";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-community==${version}";
|
||||
hash = "sha256-U7L60GyxRQL9ze22Wy7g6ZdI/IFyAtUe1bRCconv6pg=";
|
||||
hash = "sha256-6YLy7G1kZIqHAGMUIQoGCfDO2ZuVgNEtpkOI1o8eFvc=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/community";
|
||||
@@ -122,6 +122,11 @@ buildPythonPackage rec {
|
||||
"test_group_dependencies"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# ValueError: Received unsupported arguments {'strict': None}
|
||||
"tests/unit_tests/chat_models/test_cloudflare_workersai.py"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
|
||||
@@ -28,21 +28,18 @@
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
syrupy,
|
||||
|
||||
# passthru
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-core";
|
||||
version = "0.3.47";
|
||||
version = "0.3.49";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-core==${version}";
|
||||
hash = "sha256-UUsT8RvBK4TJNrAwXjv/LPzHrgTEoSewUb+8pHG6Xa8=";
|
||||
hash = "sha256-s1vZ7G6Wzywf3euwX/RdCPkgzxvZTYVG0udGpHTIiQc=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/core";
|
||||
@@ -95,11 +92,9 @@ buildPythonPackage rec {
|
||||
doCheck = true;
|
||||
});
|
||||
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"^langchain-core==([0-9.]+)$"
|
||||
];
|
||||
updateScript = {
|
||||
command = [ ./update.sh ];
|
||||
supportedFeatures = [ "commit" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts jq
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
declare -ar packages=(
|
||||
langchain
|
||||
langchain-azure-dynamic-sessions
|
||||
langchain-chroma
|
||||
langchain-community
|
||||
langchain-core
|
||||
langchain-groq
|
||||
langchain-huggingface
|
||||
langchain-mongodb
|
||||
langchain-ollama
|
||||
langchain-openai
|
||||
langchain-tests
|
||||
langchain-text-splitters
|
||||
)
|
||||
|
||||
tags=$(git ls-remote --tags --refs "https://github.com/langchain-ai/langchain" | cut --delimiter=/ --field=3-)
|
||||
|
||||
# Will be printed as JSON at the end to list what needs updating
|
||||
updates=""
|
||||
|
||||
for package in ${packages[@]}
|
||||
do
|
||||
pyPackage="python3Packages.$package"
|
||||
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion $pyPackage" | tr -d '"')"
|
||||
newVersion=$(echo "$tags" | grep -Po "(?<=$package==)\d+\.\d+\.\d+$" | sort --version-sort --reverse | head -1 )
|
||||
if [[ "$newVersion" != "$oldVersion" ]]; then
|
||||
update-source-version $pyPackage "$newVersion"
|
||||
updates+="{
|
||||
\"attrPath\": \"$pyPackage\",
|
||||
\"oldVersion\": \"$oldVersion\",
|
||||
\"newVersion\": \"$newVersion\",
|
||||
\"files\": [
|
||||
\"$PWD/pkgs/development/python-modules/${package}/default.nix\"
|
||||
]
|
||||
},"
|
||||
fi
|
||||
done
|
||||
# Remove trailing comma
|
||||
updates=${updates%,}
|
||||
# Print the updates in JSON format
|
||||
echo "[ $updates ]"
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-groq";
|
||||
version = "0.3.1";
|
||||
version = "0.3.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-groq==${version}";
|
||||
hash = "sha256-kdqgX2fnagVL+W6dRJwnpngcJK2q4E4nk8r4+zIwPt4=";
|
||||
hash = "sha256-KsKT7+jpTTiSVMZWcIwW7+1BCL7rpZHg/OX3PNLI6As=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/partners/groq";
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
pdm-backend,
|
||||
poetry-core,
|
||||
|
||||
# dependencies
|
||||
@@ -21,19 +22,22 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-ollama";
|
||||
version = "0.2.3";
|
||||
version = "0.3.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-ollama==${version}";
|
||||
hash = "sha256-G7faykRlpfmafSnSe/CdPW87uCtofBp7mLzbxZgBBhM=";
|
||||
hash = "sha256-KsQV2jM2rXbFg+ZlDnpw8sD3Nm8C37BWo+DkDTaMDtQ=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/partners/ollama";
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
build-system = [
|
||||
pdm-backend
|
||||
poetry-core
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
# Each component release requests the exact latest core.
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-openai";
|
||||
version = "0.3.8";
|
||||
version = "0.3.11";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-openai==${version}";
|
||||
hash = "sha256-ooqIUHel/tAI0jNI/j7OXD9ytAH3pXQ3QN5YMhFt2ac=";
|
||||
hash = "sha256-yIYVRn9IHjxBSxnBOTayYrIxw8ZbAeuawu3gKk9gA0M=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/partners/openai";
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
|
||||
# build-system
|
||||
pdm-backend,
|
||||
@@ -24,14 +23,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-tests";
|
||||
version = "0.3.13";
|
||||
version = "0.3.17";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-tests==${version}";
|
||||
hash = "sha256-N209wUGdlHkOZynhSSE+ZHylL7cK+8H3PfZIG/wvMd0=";
|
||||
hash = "sha256-jhdCpZsRvCxDIfaZpdqAdx+rxJTU6QHDgNKc4w7XmR8=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/standard-tests";
|
||||
@@ -62,11 +61,8 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"^langchain-tests==([0-9.]+)$"
|
||||
];
|
||||
passthru = {
|
||||
inherit (langchain-core) updateScript;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-text-splitters";
|
||||
version = "0.3.6";
|
||||
version = "0.3.7";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain-text-splitters==${version}";
|
||||
hash = "sha256-mYaIVE/v+t7TJw/l87IJcFh893OTIew6jl6OVj0gXCo=";
|
||||
hash = "sha256-tIX1nxmXU3xhJuM2Q3Tm4fbCoJwI0A8+G1aSyLcoNo0=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/text-splitters";
|
||||
|
||||
@@ -41,14 +41,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain";
|
||||
version = "0.3.20";
|
||||
version = "0.3.21";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
tag = "langchain==${version}";
|
||||
hash = "sha256-N209wUGdlHkOZynhSSE+ZHylL7cK+8H3PfZIG/wvMd0=";
|
||||
hash = "sha256-Up/pH2TxLPiPO49oIa2ZlNeH3TyN9sZSlNsqOIRmlxc=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/langchain";
|
||||
|
||||
Reference in New Issue
Block a user