mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
feat: Start migrating to UV
This commit is contained in:
110
pyproject.toml
110
pyproject.toml
@@ -1,75 +1,53 @@
|
|||||||
[tool.poetry]
|
[project]
|
||||||
name = "crewai"
|
name = "crewai"
|
||||||
version = "0.67.1"
|
version = "0.67.1"
|
||||||
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."
|
||||||
authors = ["Joao Moura <joao@crewai.com>"]
|
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
packages = [{ include = "crewai", from = "src" }]
|
requires-python = ">=3.10,<=3.13"
|
||||||
|
authors = [
|
||||||
|
{ name = "Joao Moura", email = "joao@crewai.com" }
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"pydantic>=2.4.2",
|
||||||
|
"langchain>=0.2.16",
|
||||||
|
"openai>=1.13.3",
|
||||||
|
"opentelemetry-api>=1.22.0",
|
||||||
|
"opentelemetry-sdk>=1.22.0",
|
||||||
|
"opentelemetry-exporter-otlp-proto-http>=1.22.0",
|
||||||
|
"instructor>=1.3.3",
|
||||||
|
"regex>=2024.9.11",
|
||||||
|
"crewai-tools>=0.12.1",
|
||||||
|
"click>=8.1.7",
|
||||||
|
"python-dotenv>=1.0.0",
|
||||||
|
"appdirs>=1.4.4",
|
||||||
|
"jsonref>=1.1.0",
|
||||||
|
"agentops>=0.3.0",
|
||||||
|
"embedchain>=0.1.114",
|
||||||
|
"json-repair>=0.25.2",
|
||||||
|
"auth0-python>=4.7.1",
|
||||||
|
"litellm>=1.44.22",
|
||||||
|
"pyvis>=0.3.2",
|
||||||
|
"uv>=0.4.18",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.urls]
|
[tool.uv]
|
||||||
Homepage = "https://crewai.com"
|
dev-dependencies = [
|
||||||
Documentation = "https://docs.crewai.com"
|
"mypy>=1.10.0",
|
||||||
Repository = "https://github.com/crewAIInc/crewAI"
|
"autoflake>=2.2.1",
|
||||||
|
"pre-commit>=3.6.0",
|
||||||
|
"mkdocs>=1.4.3",
|
||||||
|
"mkdocstrings>=0.22.0",
|
||||||
|
"mkdocstrings-python>=1.1.2",
|
||||||
|
"mkdocs-material>=9.5.7",
|
||||||
|
"mkdocs-material-extensions>=1.3.1",
|
||||||
|
"pillow>=10.2.0",
|
||||||
|
"cairosvg>=2.7.1",
|
||||||
|
"crewai-tools>=0.12.1",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[project.scripts]
|
||||||
python = ">=3.10,<=3.13"
|
|
||||||
pydantic = "^2.4.2"
|
|
||||||
langchain = "^0.2.16"
|
|
||||||
openai = "^1.13.3"
|
|
||||||
opentelemetry-api = "^1.22.0"
|
|
||||||
opentelemetry-sdk = "^1.22.0"
|
|
||||||
opentelemetry-exporter-otlp-proto-http = "^1.22.0"
|
|
||||||
instructor = "1.3.3"
|
|
||||||
regex = "^2024.9.11"
|
|
||||||
crewai-tools = { version = "^0.12.1", optional = true }
|
|
||||||
click = "^8.1.7"
|
|
||||||
python-dotenv = "^1.0.0"
|
|
||||||
appdirs = "^1.4.4"
|
|
||||||
jsonref = "^1.1.0"
|
|
||||||
agentops = { version = "^0.3.0", optional = true }
|
|
||||||
embedchain = "^0.1.114"
|
|
||||||
json-repair = "^0.25.2"
|
|
||||||
auth0-python = "^4.7.1"
|
|
||||||
poetry = "^1.8.3"
|
|
||||||
litellm = "^1.44.22"
|
|
||||||
pyvis = "^0.3.2"
|
|
||||||
|
|
||||||
[tool.poetry.extras]
|
|
||||||
tools = ["crewai-tools"]
|
|
||||||
agentops = ["agentops"]
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
|
||||||
isort = "^5.13.2"
|
|
||||||
mypy = "1.10.0"
|
|
||||||
autoflake = "^2.2.1"
|
|
||||||
pre-commit = "^3.6.0"
|
|
||||||
mkdocs = "^1.4.3"
|
|
||||||
mkdocstrings = "^0.22.0"
|
|
||||||
mkdocstrings-python = "^1.1.2"
|
|
||||||
mkdocs-material = { extras = ["imaging"], version = "^9.5.7" }
|
|
||||||
mkdocs-material-extensions = "^1.3.1"
|
|
||||||
pillow = "^10.2.0"
|
|
||||||
cairosvg = "^2.7.1"
|
|
||||||
crewai-tools = "^0.12.1"
|
|
||||||
|
|
||||||
[tool.poetry.group.test.dependencies]
|
|
||||||
pytest = "^8.0.0"
|
|
||||||
pytest-vcr = "^1.0.2"
|
|
||||||
python-dotenv = "1.0.0"
|
|
||||||
pytest-asyncio = "^0.23.7"
|
|
||||||
pytest-subprocess = "^1.5.2"
|
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
|
||||||
crewai = "crewai.cli.cli:crewai"
|
crewai = "crewai.cli.cli:crewai"
|
||||||
|
|
||||||
[tool.mypy]
|
|
||||||
ignore_missing_imports = true
|
|
||||||
disable_error_code = 'import-untyped'
|
|
||||||
exclude = ["cli/templates"]
|
|
||||||
|
|
||||||
[tool.bandit]
|
|
||||||
exclude_dirs = ["src/crewai/cli/templates"]
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["hatchling"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "hatchling.build"
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import click
|
|||||||
|
|
||||||
def evaluate_crew(n_iterations: int, model: str) -> None:
|
def evaluate_crew(n_iterations: int, model: str) -> None:
|
||||||
"""
|
"""
|
||||||
Test and Evaluate the crew by running a command in the Poetry environment.
|
Test and Evaluate the crew by running a command in the UV environment.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
n_iterations (int): The number of iterations to test the crew.
|
n_iterations (int): The number of iterations to test the crew.
|
||||||
model (str): The model to test the crew with.
|
model (str): The model to test the crew with.
|
||||||
"""
|
"""
|
||||||
command = ["poetry", "run", "test", str(n_iterations), model]
|
command = ["uv", "run", "test", str(n_iterations), model]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if n_iterations <= 0:
|
if n_iterations <= 0:
|
||||||
|
|||||||
@@ -8,10 +8,7 @@ def install_crew() -> None:
|
|||||||
Install the crew by running the Poetry command to lock and install.
|
Install the crew by running the Poetry command to lock and install.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
subprocess.run(["poetry", "lock"], check=True, capture_output=False, text=True)
|
subprocess.run(["uv", "sync"], check=True, capture_output=False, text=True)
|
||||||
subprocess.run(
|
|
||||||
["poetry", "install"], check=True, capture_output=False, text=True
|
|
||||||
)
|
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
click.echo(f"An error occurred while running the crew: {e}", err=True)
|
click.echo(f"An error occurred while running the crew: {e}", err=True)
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import click
|
|||||||
|
|
||||||
def plot_flow() -> None:
|
def plot_flow() -> None:
|
||||||
"""
|
"""
|
||||||
Plot the flow by running a command in the Poetry environment.
|
Plot the flow by running a command in the UV environment.
|
||||||
"""
|
"""
|
||||||
command = ["poetry", "run", "plot_flow"]
|
command = ["uv", "run", "plot_flow"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
|
|
||||||
@@ -9,7 +10,7 @@ def replay_task_command(task_id: str) -> None:
|
|||||||
Args:
|
Args:
|
||||||
task_id (str): The ID of the task to replay from.
|
task_id (str): The ID of the task to replay from.
|
||||||
"""
|
"""
|
||||||
command = ["poetry", "run", "replay", task_id]
|
command = ["uv", "run", "replay", task_id]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ def run_crew() -> None:
|
|||||||
"""
|
"""
|
||||||
Run the crew by running a command in the Poetry environment.
|
Run the crew by running a command in the Poetry environment.
|
||||||
"""
|
"""
|
||||||
command = ["poetry", "run", "run_crew"]
|
command = ["uv", "run", "run_crew"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import click
|
|||||||
|
|
||||||
def run_flow() -> None:
|
def run_flow() -> None:
|
||||||
"""
|
"""
|
||||||
Run the flow by running a command in the Poetry environment.
|
Run the flow by running a command in the UV environment.
|
||||||
"""
|
"""
|
||||||
command = ["poetry", "run", "run_flow"]
|
command = ["uv", "run", "run_flow"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
[tool.poetry]
|
[project]
|
||||||
name = "{{folder_name}}"
|
name = "{{folder_name}}"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "{{name}} using crewAI"
|
description = "{{name}} using crewAI"
|
||||||
authors = ["Your Name <you@example.com>"]
|
authors = [{ name = "Your Name", email = "you@example.com" }]
|
||||||
|
requires-python = ">=3.10,<=3.13"
|
||||||
|
dependencies = [
|
||||||
|
"crewai[tools]>=0.67.1,<1.0.0"
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[project.scripts]
|
||||||
python = ">=3.10,<=3.13"
|
|
||||||
crewai = { extras = ["tools"], version = ">=0.67.1,<1.0.0" }
|
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
|
||||||
{{folder_name}} = "{{folder_name}}.main:run"
|
{{folder_name}} = "{{folder_name}}.main:run"
|
||||||
run_crew = "{{folder_name}}.main:run"
|
run_crew = "{{folder_name}}.main:run"
|
||||||
train = "{{folder_name}}.main:train"
|
train = "{{folder_name}}.main:train"
|
||||||
@@ -17,5 +16,5 @@ replay = "{{folder_name}}.main:replay"
|
|||||||
test = "{{folder_name}}.main:test"
|
test = "{{folder_name}}.main:test"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["hatchling"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "hatchling.build"
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
[tool.poetry]
|
[project]
|
||||||
name = "{{folder_name}}"
|
name = "{{folder_name}}"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "{{name}} using crewAI"
|
description = "{{name}} using crewAI"
|
||||||
authors = ["Your Name <you@example.com>"]
|
authors = ["Your Name <you@example.com>"]
|
||||||
|
requires-python = ">=3.10,<=3.13"
|
||||||
|
dependencies = [
|
||||||
|
"crewai[tools]>=0.67.1,<1.0.0"
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[project.scripts]
|
||||||
python = ">=3.10,<=3.13"
|
|
||||||
crewai = { extras = ["tools"], version = ">=0.67.1,<1.0.0" }
|
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
|
||||||
{{folder_name}} = "{{folder_name}}.main:main"
|
{{folder_name}} = "{{folder_name}}.main:main"
|
||||||
|
run_crew = "{{folder_name}}.main:main"
|
||||||
train = "{{folder_name}}.main:train"
|
train = "{{folder_name}}.main:train"
|
||||||
replay = "{{folder_name}}.main:replay"
|
replay = "{{folder_name}}.main:replay"
|
||||||
test = "{{folder_name}}.main:test"
|
test = "{{folder_name}}.main:test"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["hatchling"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
import base64
|
import base64
|
||||||
from pathlib import Path
|
|
||||||
import click
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import click
|
||||||
|
from rich.console import Console
|
||||||
|
|
||||||
from crewai.cli.command import BaseCommand, PlusAPIMixin
|
|
||||||
from crewai.cli import git
|
from crewai.cli import git
|
||||||
|
from crewai.cli.command import BaseCommand, PlusAPIMixin
|
||||||
from crewai.cli.utils import (
|
from crewai.cli.utils import (
|
||||||
get_project_name,
|
|
||||||
get_project_description,
|
get_project_description,
|
||||||
|
get_project_name,
|
||||||
get_project_version,
|
get_project_version,
|
||||||
tree_copy,
|
tree_copy,
|
||||||
tree_find_and_replace,
|
tree_find_and_replace,
|
||||||
)
|
)
|
||||||
from rich.console import Console
|
|
||||||
|
|
||||||
console = Console()
|
console = Console()
|
||||||
|
|
||||||
@@ -82,7 +83,7 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
|
|||||||
|
|
||||||
with tempfile.TemporaryDirectory() as temp_build_dir:
|
with tempfile.TemporaryDirectory() as temp_build_dir:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["poetry", "build", "-f", "sdist", "--output", temp_build_dir],
|
["uv", "build", "-f", "sdist", "--output", temp_build_dir],
|
||||||
check=True,
|
check=True,
|
||||||
capture_output=False,
|
capture_output=False,
|
||||||
)
|
)
|
||||||
@@ -162,7 +163,7 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
|
|||||||
repository_handle = f"crewai-{repository['handle']}"
|
repository_handle = f"crewai-{repository['handle']}"
|
||||||
|
|
||||||
add_repository_command = [
|
add_repository_command = [
|
||||||
"poetry",
|
"uv",
|
||||||
"source",
|
"source",
|
||||||
"add",
|
"add",
|
||||||
"--priority=explicit",
|
"--priority=explicit",
|
||||||
@@ -178,7 +179,7 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
|
|||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
add_repository_credentials_command = [
|
add_repository_credentials_command = [
|
||||||
"poetry",
|
"uv",
|
||||||
"config",
|
"config",
|
||||||
f"http-basic.{repository_handle}",
|
f"http-basic.{repository_handle}",
|
||||||
credentials["username"],
|
credentials["username"],
|
||||||
@@ -201,7 +202,7 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
|
|||||||
pypi_index_handle = f"crewai-{repository_handle}"
|
pypi_index_handle = f"crewai-{repository_handle}"
|
||||||
|
|
||||||
add_package_command = [
|
add_package_command = [
|
||||||
"poetry",
|
"uv",
|
||||||
"add",
|
"add",
|
||||||
"--source",
|
"--source",
|
||||||
pypi_index_handle,
|
pypi_index_handle,
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import click
|
|||||||
|
|
||||||
def train_crew(n_iterations: int, filename: str) -> None:
|
def train_crew(n_iterations: int, filename: str) -> None:
|
||||||
"""
|
"""
|
||||||
Train the crew by running a command in the Poetry environment.
|
Train the crew by running a command in the UV environment.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
n_iterations (int): The number of iterations to train the crew.
|
n_iterations (int): The number of iterations to train the crew.
|
||||||
"""
|
"""
|
||||||
command = ["poetry", "run", "train", str(n_iterations), filename]
|
command = ["uv", "run", "train", str(n_iterations), filename]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if n_iterations <= 0:
|
if n_iterations <= 0:
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
|
import importlib.metadata
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import click
|
|
||||||
import sys
|
import sys
|
||||||
import importlib.metadata
|
from functools import reduce
|
||||||
|
from typing import Any, Dict, List
|
||||||
|
|
||||||
|
import click
|
||||||
|
from rich.console import Console
|
||||||
|
|
||||||
from crewai.cli.authentication.utils import TokenManager
|
from crewai.cli.authentication.utils import TokenManager
|
||||||
from functools import reduce
|
|
||||||
from rich.console import Console
|
|
||||||
from typing import Any, Dict, List
|
|
||||||
|
|
||||||
if sys.version_info >= (3, 11):
|
if sys.version_info >= (3, 11):
|
||||||
import tomllib
|
import tomllib
|
||||||
|
|||||||
Reference in New Issue
Block a user