mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-20 14:42:28 +02:00
Bullseye (#3008)
This commit is contained in:
@@ -100,7 +100,7 @@ class Config(TypedDict, total=False):
|
||||
def _parse_version(version_str: str) -> tuple[int, int]:
|
||||
"""Parse a version string into a tuple of (major, minor)."""
|
||||
try:
|
||||
major, minor = map(int, version_str.split("."))
|
||||
major, minor = map(int, version_str.split("-")[0].split("."))
|
||||
return (major, minor)
|
||||
except ValueError:
|
||||
raise click.UsageError(f"Invalid version format: {version_str}") from None
|
||||
@@ -159,7 +159,7 @@ def validate_config(config: Config) -> Config:
|
||||
if config.get("python_version"):
|
||||
pyversion = config["python_version"]
|
||||
if not pyversion.count(".") == 1 or not all(
|
||||
part.isdigit() for part in pyversion.split(".")
|
||||
part.isdigit() for part in pyversion.split("-")[0].split(".")
|
||||
):
|
||||
raise click.UsageError(
|
||||
f"Invalid Python version format: {pyversion}. "
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langgraph-cli"
|
||||
version = "0.1.65"
|
||||
version = "0.1.66"
|
||||
description = "CLI for interacting with LangGraph API"
|
||||
authors = []
|
||||
license = "MIT"
|
||||
|
||||
@@ -91,6 +91,12 @@ def test_validate_config():
|
||||
validate_config({"python_version": "3.10"})
|
||||
assert "Minimum required version" in str(exc_info.value)
|
||||
|
||||
config = validate_config({"python_version": "3.11-bullseye", "dependencies": ["."], "graphs": {"agent": "./agent.py:graph"}})
|
||||
assert config["python_version"] == "3.11-bullseye"
|
||||
|
||||
config = validate_config({"python_version": "3.12-slim", "dependencies": ["."], "graphs": {"agent": "./agent.py:graph"}})
|
||||
assert config["python_version"] == "3.12-slim"
|
||||
|
||||
|
||||
def test_validate_config_file():
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
|
||||
Reference in New Issue
Block a user