Skip to content

Commit

Permalink
Squash merge bk into replace-tox-with-uv
Browse files Browse the repository at this point in the history
Signed-off-by: Teo <[email protected]>
  • Loading branch information
teocns committed Dec 27, 2024
1 parent 892c843 commit 92d1bff
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 56 deletions.
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ readme = "README.md"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -34,29 +35,25 @@ dependencies = [
"opentelemetry-api>=1.22.0,<2.0.0",
"opentelemetry-sdk>=1.22.0,<2.0.0",
"opentelemetry-exporter-otlp-proto-http>=1.22.0,<2.0.0",
"typing-extensions>=4.9.0; python_version >= '3.8'",
"pydantic>=2.7.4,<3.0.0; python_version < '3.13'",
"pydantic-core>=2.23.4; python_version >= '3.8' and python_version < '3.13'"
# "typing-extensions>=4.9.0; python_version >= '3.8'",
# "pydantic>=2.7.4,<3.0.0; python_version < '3.13'",
# "pydantic-core>=2.23.4; python_version >= '3.8' and python_version < '3.13'"
]

[project.optional-dependencies]
# Optional LangChain integration for end users
langchain = [
"langchain>=0.2.14; python_version >= '3.8.1' and python_version < '3.13'",
"langchain-core>=0.3.0; python_version >= '3.8.1' and python_version < '3.13'",
"openai>=1.58.1; python_version < '3.13'"
]

# LangChain testing dependencies
test-langchain = [
"langchain-core>=0.3.0; python_version >= '3.8.1' and python_version < '3.13'",
"langchain>=0.2.14; python_version >= '3.8.1' and python_version < '3.13'"
"openai>=1.58.1; python_version >= '3.8.1' and python_version < '3.13'",
"openai<1.0.0; python_version < '3.8.1'" # For Python 3.7 compatibility
]

[dependency-groups]
test = [
"openai",
"langchain",
# ... Add all dependencies that are required for testing here
]
# CI dependencies
ci = [
Expand All @@ -67,6 +64,9 @@ ci = [
Homepage = "https://github.com/AgentOps-AI/agentops"
Issues = "https://github.com/AgentOps-AI/agentops/issues"

# [project.scripts]
# test-versions = "bash -c 'for v in 3.7 3.8 3.9 3.10 3.11 3.12; do ./test_python_versions.sh $v || exit 1; done'"

[tool.uv]
compile-bytecode = true # Enable bytecode compilation for better performance

Expand Down
46 changes: 0 additions & 46 deletions test_python_versions.sh

This file was deleted.

15 changes: 15 additions & 0 deletions tests/test_packaging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

echo "Testing installation and dependency satisfaction of all extras including dev packages across Python versions"
echo "----------------------------------------"
for version in 3.7 3.8 3.9 3.10 3.11 3.12 3.13; do
uv sync --dev --quiet --python=$version --all-extras
if [ $? -eq 0 ]; then
echo "✅ Python $version OK"
else
echo "❌ Python $version FAIL"
fi
echo "----------------------------------------"
rm -rf .venv
done
echo "🏁 All Python version tests completed"

0 comments on commit 92d1bff

Please sign in to comment.