mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
Minor adjustments on Tool publish and docs (#2958)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* fix: fix tool publisher logger when available_exports is found * docs: update docs and templates since we support Python 3.13
This commit is contained in:
@@ -161,7 +161,7 @@ To get started with CrewAI, follow these simple steps:
|
|||||||
|
|
||||||
### 1. Installation
|
### 1. Installation
|
||||||
|
|
||||||
Ensure you have Python >=3.10 <3.13 installed on your system. CrewAI uses [UV](https://docs.astral.sh/uv/) for dependency management and package handling, offering a seamless setup and execution experience.
|
Ensure you have Python >=3.10 <3.14 installed on your system. CrewAI uses [UV](https://docs.astral.sh/uv/) for dependency management and package handling, offering a seamless setup and execution experience.
|
||||||
|
|
||||||
First, install CrewAI:
|
First, install CrewAI:
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Welcome to the {{crew_name}} Crew project, powered by [crewAI](https://crewai.co
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Ensure you have Python >=3.10 <3.13 installed on your system. This project uses [UV](https://docs.astral.sh/uv/) for dependency management and package handling, offering a seamless setup and execution experience.
|
Ensure you have Python >=3.10 <3.14 installed on your system. This project uses [UV](https://docs.astral.sh/uv/) for dependency management and package handling, offering a seamless setup and execution experience.
|
||||||
|
|
||||||
First, if you haven't already, install uv:
|
First, if you haven't already, install uv:
|
||||||
|
|
||||||
|
|||||||
@@ -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.121.1,<1.0.0"
|
"crewai[tools]>=0.121.1,<1.0.0"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Welcome to the {{crew_name}} Crew project, powered by [crewAI](https://crewai.co
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Ensure you have Python >=3.10 <3.13 installed on your system. This project uses [UV](https://docs.astral.sh/uv/) for dependency management and package handling, offering a seamless setup and execution experience.
|
Ensure you have Python >=3.10 <3.14 installed on your system. This project uses [UV](https://docs.astral.sh/uv/) for dependency management and package handling, offering a seamless setup and execution experience.
|
||||||
|
|
||||||
First, if you haven't already, install uv:
|
First, if you haven't already, install uv:
|
||||||
|
|
||||||
|
|||||||
@@ -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.121.1,<1.0.0",
|
"crewai[tools]>=0.121.1,<1.0.0",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ custom tools to power up your crews.
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
Ensure you have Python >=3.10 <3.13 installed on your system. This project
|
Ensure you have Python >=3.10 <3.14 installed on your system. This project
|
||||||
uses [UV](https://docs.astral.sh/uv/) for dependency management and package
|
uses [UV](https://docs.astral.sh/uv/) for dependency management and package
|
||||||
handling, offering a seamless setup and execution experience.
|
handling, offering a seamless setup and execution experience.
|
||||||
|
|
||||||
|
|||||||
@@ -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.121.1"
|
"crewai[tools]>=0.121.1"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
|
|||||||
|
|
||||||
if available_exports:
|
if available_exports:
|
||||||
console.print(
|
console.print(
|
||||||
f"[green]Found these tools to publish: {', '.join(available_exports)}[/green]"
|
f"[green]Found these tools to publish: {', '.join([e['name'] for e in available_exports])}[/green]"
|
||||||
)
|
)
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as temp_build_dir:
|
with tempfile.TemporaryDirectory() as temp_build_dir:
|
||||||
|
|||||||
@@ -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"]
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ def test_publish_when_not_in_sync(mock_is_synced, capsys, tool_command):
|
|||||||
)
|
)
|
||||||
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
||||||
@patch("crewai.cli.tools.main.git.Repository.is_synced", return_value=False)
|
@patch("crewai.cli.tools.main.git.Repository.is_synced", return_value=False)
|
||||||
@patch("crewai.cli.tools.main.extract_available_exports", return_value=["SampleTool"])
|
@patch("crewai.cli.tools.main.extract_available_exports", return_value=[{"name": "SampleTool"}])
|
||||||
def test_publish_when_not_in_sync_and_force(
|
def test_publish_when_not_in_sync_and_force(
|
||||||
mock_available_exports,
|
mock_available_exports,
|
||||||
mock_is_synced,
|
mock_is_synced,
|
||||||
@@ -200,7 +200,7 @@ def test_publish_when_not_in_sync_and_force(
|
|||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
description="A sample tool",
|
description="A sample tool",
|
||||||
encoded_file=unittest.mock.ANY,
|
encoded_file=unittest.mock.ANY,
|
||||||
available_exports=["SampleTool"],
|
available_exports=[{"name": "SampleTool"}],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ def test_publish_when_not_in_sync_and_force(
|
|||||||
)
|
)
|
||||||
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
||||||
@patch("crewai.cli.tools.main.git.Repository.is_synced", return_value=True)
|
@patch("crewai.cli.tools.main.git.Repository.is_synced", return_value=True)
|
||||||
@patch("crewai.cli.tools.main.extract_available_exports", return_value=["SampleTool"])
|
@patch("crewai.cli.tools.main.extract_available_exports", return_value=[{"name": "SampleTool"}])
|
||||||
def test_publish_success(
|
def test_publish_success(
|
||||||
mock_available_exports,
|
mock_available_exports,
|
||||||
mock_is_synced,
|
mock_is_synced,
|
||||||
@@ -251,7 +251,7 @@ def test_publish_success(
|
|||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
description="A sample tool",
|
description="A sample tool",
|
||||||
encoded_file=unittest.mock.ANY,
|
encoded_file=unittest.mock.ANY,
|
||||||
available_exports=["SampleTool"],
|
available_exports=[{"name": "SampleTool"}],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ def test_publish_success(
|
|||||||
read_data=b"sample tarball content",
|
read_data=b"sample tarball content",
|
||||||
)
|
)
|
||||||
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
||||||
@patch("crewai.cli.tools.main.extract_available_exports", return_value=["SampleTool"])
|
@patch("crewai.cli.tools.main.extract_available_exports", return_value=[{"name": "SampleTool"}])
|
||||||
def test_publish_failure(
|
def test_publish_failure(
|
||||||
mock_available_exports,
|
mock_available_exports,
|
||||||
mock_publish,
|
mock_publish,
|
||||||
@@ -304,7 +304,7 @@ def test_publish_failure(
|
|||||||
read_data=b"sample tarball content",
|
read_data=b"sample tarball content",
|
||||||
)
|
)
|
||||||
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
@patch("crewai.cli.plus_api.PlusAPI.publish_tool")
|
||||||
@patch("crewai.cli.tools.main.extract_available_exports", return_value=["SampleTool"])
|
@patch("crewai.cli.tools.main.extract_available_exports", return_value=[{"name": "SampleTool"}])
|
||||||
def test_publish_api_error(
|
def test_publish_api_error(
|
||||||
mock_available_exports,
|
mock_available_exports,
|
||||||
mock_publish,
|
mock_publish,
|
||||||
|
|||||||
Reference in New Issue
Block a user