Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest
- name: Test with pytest
run: |
cd src/praisonai && python -m pytest
16 changes: 8 additions & 8 deletions .github/workflows/test-comprehensive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,28 @@ jobs:

case $TEST_TYPE in
"unit")
python tests/test_runner.py --pattern unit
cd src/praisonai && python tests/test_runner.py --pattern unit
;;
"integration")
python tests/test_runner.py --pattern integration
cd src/praisonai && python tests/test_runner.py --pattern integration
;;
"fast")
python tests/test_runner.py --pattern fast
cd src/praisonai && python tests/test_runner.py --pattern fast
;;
"performance")
python tests/test_runner.py --pattern "performance"
cd src/praisonai && python tests/test_runner.py --pattern "performance"
;;
"frameworks")
python tests/test_runner.py --pattern frameworks
cd src/praisonai && python tests/test_runner.py --pattern frameworks
;;
"autogen")
python tests/test_runner.py --pattern autogen
cd src/praisonai && python tests/test_runner.py --pattern autogen
;;
"crewai")
python tests/test_runner.py --pattern crewai
cd src/praisonai && python tests/test_runner.py --pattern crewai
;;
"all"|*)
python tests/test_runner.py --pattern all
cd src/praisonai && python tests/test_runner.py --pattern all
;;
esac

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,27 @@ jobs:

- name: Run Unit Tests
run: |
python -m pytest tests/unit/ -v --tb=short --disable-warnings --cov=praisonai --cov-report=term-missing
cd src/praisonai && python -m pytest tests/unit/ -v --tb=short --disable-warnings --cov=praisonai --cov-report=term-missing

- name: Run Integration Tests
run: |
python -m pytest tests/integration/ -v --tb=short --disable-warnings
cd src/praisonai && python -m pytest tests/integration/ -v --tb=short --disable-warnings

- name: Run AutoGen Framework Tests
run: |
echo "🤖 Testing AutoGen Framework Integration..."
python tests/test_runner.py --pattern autogen --verbose || echo "⚠️ AutoGen tests completed with issues"
cd src/praisonai && python tests/test_runner.py --pattern autogen --verbose || echo "⚠️ AutoGen tests completed with issues"
continue-on-error: true

- name: Run CrewAI Framework Tests
run: |
echo "⛵ Testing CrewAI Framework Integration..."
python tests/test_runner.py --pattern crewai --verbose || echo "⚠️ CrewAI tests completed with issues"
cd src/praisonai && python tests/test_runner.py --pattern crewai --verbose || echo "⚠️ CrewAI tests completed with issues"
continue-on-error: true

- name: Run Legacy Tests
run: |
python -m pytest tests/test.py -v --tb=short --disable-warnings
cd src/praisonai && python -m pytest tests/test.py -v --tb=short --disable-warnings

- name: Upload Coverage Reports
if: matrix.python-version == '3.11'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ jobs:
}

# Test basic agent functionality
timeout_run python src/praisonai-agents/basic-agents.py
timeout_run python ${{ github.workspace }}/src/praisonai-agents/basic-agents.py

# Test async functionality
timeout_run python src/praisonai-agents/async_example.py
timeout_run python ${{ github.workspace }}/src/praisonai-agents/async_example.py

# Test knowledge/RAG functionality
timeout_run python src/praisonai-agents/knowledge-agents.py
timeout_run python ${{ github.workspace }}/src/praisonai-agents/knowledge-agents.py

# Test MCP functionality
timeout_run python src/praisonai-agents/mcp-basic.py
timeout_run python ${{ github.workspace }}/src/praisonai-agents/mcp-basic.py

# Test UI functionality
timeout_run python src/praisonai-agents/ui.py
timeout_run python ${{ github.workspace }}/src/praisonai-agents/ui.py

echo "✅ Example script testing completed"
continue-on-error: true
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
import time
import sys
import statistics
sys.path.insert(0, 'src/praisonai-agents')
sys.path.insert(0, 'src/praisonai')

print('🏃 Testing agent creation performance...')
times = []
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Test ${{ matrix.framework }} Framework
run: |
echo "🧪 Testing ${{ matrix.framework }} framework integration with Python ${{ matrix.python-version }}"
python tests/test_runner.py --pattern ${{ matrix.framework }} --verbose --coverage
cd src/praisonai && python tests/test_runner.py --pattern ${{ matrix.framework }} --verbose --coverage
continue-on-error: false

- name: Generate Framework Test Report
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-real.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ jobs:
if: ${{ github.event.inputs.framework == 'autogen' || github.event.inputs.framework == 'all' }}
run: |
echo "🤖 Running REAL AutoGen tests (⚠️ API costs may apply)"
python -m pytest tests/e2e/autogen/ -v -m real --tb=short
cd src/praisonai && python -m pytest tests/e2e/autogen/ -v -m real --tb=short
continue-on-error: false

- name: Run Real CrewAI Tests
if: ${{ github.event.inputs.framework == 'crewai' || github.event.inputs.framework == 'all' }}
run: |
echo "⛵ Running REAL CrewAI tests (⚠️ API costs may apply)"
python -m pytest tests/e2e/crewai/ -v -m real --tb=short
cd src/praisonai && python -m pytest tests/e2e/crewai/ -v -m real --tb=short
continue-on-error: false

- name: Generate Real Test Report
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ jobs:
- name: Find Researcher Role Source
run: |
echo "🔍 Hunting for the mysterious 'Researcher' role..."
cd src/praisonai
python -c "
import os
import yaml
import glob

print('📋 Searching for Researcher role in all YAML files:')
yaml_files = glob.glob('tests/*.yaml')
yaml_files = glob.glob('src/praisonai/tests/*.yaml')
Comment thread
MervinPraison marked this conversation as resolved.

for yaml_file in yaml_files:
try:
Expand Down Expand Up @@ -139,6 +140,7 @@ jobs:
- name: Trace AutoGen Execution Path
run: |
echo "🔍 Tracing AutoGen execution to find where it diverges..."
cd src/praisonai
python -c "
import os
import sys
Expand All @@ -163,7 +165,7 @@ jobs:

# Load the YAML to check what it contains
import yaml
with open('tests/autogen-agents.yaml', 'r') as f:
with open('src/praisonai/tests/autogen-agents.yaml', 'r') as f:
config = yaml.safe_load(f)

framework = agents_gen.framework or config.get('framework')
Expand Down Expand Up @@ -209,13 +211,14 @@ jobs:
- name: Debug YAML Loading and Roles
run: |
echo "🔍 Tracing YAML file loading and role creation..."
cd src/praisonai
python -c "
import os
import sys
import yaml
sys.path.insert(0, '.')

print('📁 Available YAML files in tests/:')
print('📁 Available YAML files in src/praisonai/tests/:')
import glob
yaml_files = glob.glob('tests/*.yaml')
for f in yaml_files:
Expand Down Expand Up @@ -297,6 +300,7 @@ jobs:
- name: Debug PraisonAIModel API Key Flow
run: |
echo "🔍 Testing PraisonAIModel API key handling..."
cd src/praisonai
python -c "
import os
import sys
Expand Down Expand Up @@ -351,12 +355,13 @@ jobs:
- name: Test Direct PraisonAI Execution
run: |
echo "🧪 Testing direct PraisonAI execution (what works locally)..."
python -m praisonai tests/autogen-agents.yaml
python -m praisonai src/praisonai/tests/autogen-agents.yaml
continue-on-error: true

- name: Comprehensive Execution Debug
run: |
echo "🔍 Comprehensive debugging of PraisonAI execution path..."
cd src/praisonai
python -c "
import os
import sys
Expand All @@ -376,10 +381,10 @@ jobs:
print(f' {f}')

print()
print('📋 Files in tests/ directory:')
print('📋 Files in src/praisonai/tests/ directory:')
for f in os.listdir('tests'):
if f.endswith('.yaml'):
print(f' tests/{f}')
print(f' src/praisonai/tests/{f}')

# Check if root agents.yaml exists
print()
Expand All @@ -401,7 +406,7 @@ jobs:
from praisonai.agents_generator import AgentsGenerator

# Test with full path
test_file = 'tests/autogen-agents.yaml'
test_file = 'src/praisonai/tests/autogen-agents.yaml'
print(f' Using test file: {test_file}')
print(f' File exists: {os.path.exists(test_file)}')

Expand Down Expand Up @@ -465,11 +470,11 @@ jobs:
- name: Run Fast Tests
run: |
# Run the fastest, most essential tests
python tests/test_runner.py --pattern fast
cd src/praisonai && python tests/test_runner.py --pattern fast

- name: Run Legacy Example Tests
run: |
python -m pytest tests/test.py -v --tb=short --disable-warnings
cd src/praisonai && python -m pytest tests/test.py -v --tb=short --disable-warnings
continue-on-error: true

- name: Restore Root Config Files
Expand Down
5 changes: 4 additions & 1 deletion src/praisonai-agents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ all = [
"praisonaiagents[llm]",
"praisonaiagents[mcp]",
"praisonaiagents[api]"
]
]

[tool.setuptools]
packages = ["praisonaiagents"]
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/praisonai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Homepage = "https://docs.praison.ai"
Repository = "https://github.com/mervinpraison/PraisonAI"

[tool.setuptools]
packages = ["PraisonAI"]
packages = ["praisonai"]

[tool.poetry.dependencies]
python = ">=3.10,<3.13"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading