mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-07 15:18:29 +00:00
Compare commits
4 Commits
v1.0.0a2
...
devin/1746
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f0623d31c | ||
|
|
6db161465b | ||
|
|
2f7cba6b23 | ||
|
|
5bc01b15a0 |
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
@@ -13,8 +13,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: true # Stop testing on subsequent Python versions if an earlier one fails
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.10', '3.11', '3.12']
|
python-version: ['3.10', '3.11', '3.12', '3.13']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -28,7 +29,12 @@ jobs:
|
|||||||
run: uv python install ${{ matrix.python-version }}
|
run: uv python install ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install the project
|
- name: Install the project
|
||||||
|
if: matrix.python-version != '3.13'
|
||||||
run: uv sync --dev --all-extras
|
run: uv sync --dev --all-extras
|
||||||
|
|
||||||
|
- name: Install the project (Python 3.13)
|
||||||
|
if: matrix.python-version == '3.13'
|
||||||
|
run: uv sync --dev # Skip all-extras for Python 3.13 due to onnxruntime compatibility
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest --block-network --timeout=60 -vv
|
run: uv run pytest --block-network --timeout=60 -vv
|
||||||
|
|||||||
22
Dockerfile.test
Normal file
22
Dockerfile.test
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
FROM python:3.13-slim-bookworm
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Health check
|
||||||
|
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD python -c "import crewai" || exit 1
|
||||||
|
|
||||||
|
# Improved installation process
|
||||||
|
RUN pip install --upgrade pip && pip install --no-cache-dir -U pip setuptools wheel && rm -rf /root/.cache/pip/* \
|
||||||
|
|| { echo 'Installation failed'; exit 1; }
|
||||||
|
|
||||||
|
# Copy the current directory contents into the container
|
||||||
|
COPY . /app/
|
||||||
|
|
||||||
|
# Install the package with error handling
|
||||||
|
RUN pip install -e . || { echo 'Package installation failed'; exit 1; }
|
||||||
|
|
||||||
|
# Version confirmation
|
||||||
|
RUN python -c "import crewai; assert crewai.__version__, 'Version check failed'"
|
||||||
|
|
||||||
|
# Test importing the package
|
||||||
|
CMD ["python", "-c", "import crewai; print(f'Successfully imported crewai version {crewai.__version__}')"]
|
||||||
@@ -3,7 +3,7 @@ name = "crewai"
|
|||||||
version = "0.119.0"
|
version = "0.119.0"
|
||||||
description = "Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks."
|
description = "Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10,<3.13"
|
requires-python = ">=3.10,<3.14"
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Joao Moura", email = "joao@crewai.com" }
|
{ name = "Joao Moura", email = "joao@crewai.com" }
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "{{folder_name}}"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "{{name}} using crewAI"
|
description = "{{name}} using crewAI"
|
||||||
authors = [{ name = "Your Name", email = "you@example.com" }]
|
authors = [{ name = "Your Name", email = "you@example.com" }]
|
||||||
requires-python = ">=3.10,<3.13"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crewai[tools]>=0.119.0,<1.0.0"
|
"crewai[tools]>=0.119.0,<1.0.0"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "{{folder_name}}"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "{{name}} using crewAI"
|
description = "{{name}} using crewAI"
|
||||||
authors = [{ name = "Your Name", email = "you@example.com" }]
|
authors = [{ name = "Your Name", email = "you@example.com" }]
|
||||||
requires-python = ">=3.10,<3.13"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crewai[tools]>=0.119.0,<1.0.0",
|
"crewai[tools]>=0.119.0,<1.0.0",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "{{folder_name}}"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Power up your crews with {{folder_name}}"
|
description = "Power up your crews with {{folder_name}}"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10,<3.13"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crewai[tools]>=0.119.0"
|
"crewai[tools]>=0.119.0"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ class TestDeployCommand(unittest.TestCase):
|
|||||||
[project]
|
[project]
|
||||||
name = "test_project"
|
name = "test_project"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.10,<3.13"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = ["crewai"]
|
dependencies = ["crewai"]
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
@@ -250,7 +250,7 @@ class TestDeployCommand(unittest.TestCase):
|
|||||||
[project]
|
[project]
|
||||||
name = "test_project"
|
name = "test_project"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.10,<3.13"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = ["crewai"]
|
dependencies = ["crewai"]
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|||||||
39
tests/test_python_compatibility.py
Normal file
39
tests/test_python_compatibility.py
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
"""Tests for Python version compatibility."""
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from packaging import version
|
||||||
|
|
||||||
|
|
||||||
|
def validate_python_version():
|
||||||
|
"""Validate that the current Python version is supported."""
|
||||||
|
min_version = (3, 10)
|
||||||
|
max_version = (3, 14)
|
||||||
|
current = sys.version_info[:2]
|
||||||
|
|
||||||
|
if not (min_version <= current < max_version):
|
||||||
|
raise RuntimeError(
|
||||||
|
f"This package requires Python {min_version[0]}.{min_version[1]} to "
|
||||||
|
f"{max_version[0]}.{max_version[1]-1}. You have Python {current[0]}.{current[1]}"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_python_version_compatibility():
|
||||||
|
"""Test that the package supports the current Python version."""
|
||||||
|
assert isinstance(sys.version_info, tuple), "Version Information must be a tuple"
|
||||||
|
|
||||||
|
current_version = version.parse(f"{sys.version_info.major}.{sys.version_info.minor}")
|
||||||
|
assert current_version >= version.parse("3.10"), "Python version too old"
|
||||||
|
assert current_version < version.parse("3.14"), "Python version too new"
|
||||||
|
|
||||||
|
# This test will fail if the package doesn't support the current Python version
|
||||||
|
import crewai
|
||||||
|
|
||||||
|
# Print the Python version for debugging
|
||||||
|
print(f"Python version: {sys.version}")
|
||||||
|
|
||||||
|
# Print the crewai version for debugging
|
||||||
|
print(f"CrewAI version: {crewai.__version__}")
|
||||||
|
|
||||||
|
# Validate Python version
|
||||||
|
validate_python_version()
|
||||||
2
uv.lock
generated
2
uv.lock
generated
@@ -1,5 +1,5 @@
|
|||||||
version = 1
|
version = 1
|
||||||
requires-python = ">=3.10, <3.13"
|
requires-python = ">=3.10, <3.14"
|
||||||
resolution-markers = [
|
resolution-markers = [
|
||||||
"python_full_version < '3.11' and platform_python_implementation == 'PyPy' and platform_system == 'Darwin' and sys_platform == 'darwin'",
|
"python_full_version < '3.11' and platform_python_implementation == 'PyPy' and platform_system == 'Darwin' and sys_platform == 'darwin'",
|
||||||
"python_full_version < '3.11' and platform_machine == 'aarch64' and platform_python_implementation == 'PyPy' and platform_system == 'Linux' and sys_platform == 'darwin'",
|
"python_full_version < '3.11' and platform_machine == 'aarch64' and platform_python_implementation == 'PyPy' and platform_system == 'Linux' and sys_platform == 'darwin'",
|
||||||
|
|||||||
Reference in New Issue
Block a user