mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
refactor: implement PEP 621 dynamic versioning (#3068)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "crewai"
|
name = "crewai"
|
||||||
version = "0.134.0"
|
dynamic = ["version"]
|
||||||
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.14"
|
requires-python = ">=3.10,<3.14"
|
||||||
@@ -117,6 +117,9 @@ torchvision = [
|
|||||||
{ index = "pytorch", marker = "python_version < '3.13'" },
|
{ index = "pytorch", marker = "python_version < '3.13'" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.hatch.version]
|
||||||
|
path = "src/crewai/__init__.py"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|||||||
@@ -31,4 +31,5 @@ __all__ = [
|
|||||||
"Knowledge",
|
"Knowledge",
|
||||||
"TaskOutput",
|
"TaskOutput",
|
||||||
"LLMGuardrail",
|
"LLMGuardrail",
|
||||||
|
"__version__",
|
||||||
]
|
]
|
||||||
|
|||||||
17
tests/cli/test_version.py
Normal file
17
tests/cli/test_version.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
"""Test for version management."""
|
||||||
|
|
||||||
|
from crewai import __version__
|
||||||
|
from crewai.cli.version import get_crewai_version
|
||||||
|
|
||||||
|
|
||||||
|
def test_dynamic_versioning_consistency():
|
||||||
|
"""Test that dynamic versioning provides consistent version across all access methods."""
|
||||||
|
cli_version = get_crewai_version()
|
||||||
|
package_version = __version__
|
||||||
|
|
||||||
|
# Both should return the same version string
|
||||||
|
assert cli_version == package_version
|
||||||
|
|
||||||
|
# Version should not be empty
|
||||||
|
assert package_version is not None
|
||||||
|
assert len(package_version.strip()) > 0
|
||||||
Reference in New Issue
Block a user