Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/integration-cross-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ jobs:
- name: Run PraisonAI integration tests
run: |
cd PraisonAI/src/praisonai
python -m pytest tests/integration/test_aiui_* -v --timeout=300
python -m pytest tests/integration/test_aiui_* -v

- name: Run PraisonAIUI integration tests
run: |
cd PraisonAIUI
if [ -f tests/integration/test_agentic_roundtrip.py ]; then
python -m pytest tests/integration/test_agentic_roundtrip.py -v --timeout=300
python -m pytest tests/integration/test_agentic_roundtrip.py -v
fi
if [ -f tests/test_feature_sdk_backends.py ]; then
python -m pytest tests/test_feature_sdk_backends.py -v --timeout=300
python -m pytest tests/test_feature_sdk_backends.py -v
fi

- name: Test Pattern C CLI
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
run: |
cd PraisonAI/src/praisonai
if [ -n "$OPENAI_API_KEY" ]; then
python -m pytest tests/integration/test_aiui_host_agentic.py -v --timeout=600
python -m pytest tests/integration/test_aiui_host_agentic.py -v
else
echo "OPENAI_API_KEY not available, skipping agentic tests"
fi
6 changes: 6 additions & 0 deletions src/praisonai-agents/praisonaiagents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def _get_lazy_cache():
# ============================================================================

_LAZY_IMPORTS = {
# Version information (lazy loaded to avoid file I/O on import)
'__version__': ('praisonaiagents._version', '__version__'),

# Tools (moved from eager imports for lazy loading)
'Tools': ('praisonaiagents.tools.tools', 'Tools'),
'BaseTool': ('praisonaiagents.tools.base', 'BaseTool'),
Expand Down Expand Up @@ -775,6 +778,9 @@ def warmup(include_litellm: bool = False, include_openai: bool = True) -> dict:
# ============================================================================

__all__ = [
# Version information
'__version__',

# Core classes - the essentials
'Agent',
'AgentTeam', # Primary class for multi-agent coordination (v1.0+)
Expand Down
51 changes: 51 additions & 0 deletions src/praisonai-agents/praisonaiagents/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""
Version utilities for praisonaiagents package.

This module provides version information by reading from pyproject.toml
to avoid duplication and ensure the single source of truth.
"""

import re
from pathlib import Path


def get_version() -> str:
"""
Get the version string from pyproject.toml.

Returns:
str: Version string (e.g., "1.6.52")

Raises:
RuntimeError: If version cannot be found or parsed
"""
try:
# Get the package root (praisonaiagents directory)
package_root = Path(__file__).parent
# Go up to src/praisonai-agents directory
pyproject_path = package_root.parent / "pyproject.toml"

if not pyproject_path.exists():
raise RuntimeError(f"pyproject.toml not found at {pyproject_path}")

content = pyproject_path.read_text()

# Look for version = "X.Y.Z" pattern
match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)
if not match:
raise RuntimeError("Version not found in pyproject.toml")

return match.group(1)

except Exception as e:
# Fallback to "unknown" to avoid breaking imports
import warnings
warnings.warn(
f"Failed to read version from pyproject.toml: {e}. Using 'unknown'.",
RuntimeWarning
)
return "unknown"


# Cache the version to avoid reading the file multiple times
__version__ = get_version()
3 changes: 1 addition & 2 deletions src/praisonai-agents/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
addopts = -v --tb=short --timeout=60
timeout_method = thread
addopts = -v --tb=short
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
Expand Down
223 changes: 0 additions & 223 deletions src/praisonai/praisonai/deploy.py

This file was deleted.

Loading
Loading