Skip to content

Commit 4bba927

Browse files
Merge pull request #524 from MervinPraison/develop
Remove unused agent files and clean up test directory by deleting obs…
2 parents 8944902 + 6e3c9b7 commit 4bba927

File tree

211 files changed

+178
-566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+178
-566
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ jobs:
3737
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3838
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3939
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
40-
# - name: Test with pytest
41-
# run: |
42-
# pytest
40+
- name: Test with pytest
41+
run: |
42+
cd src/praisonai && python -m pytest

.github/workflows/test-comprehensive.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,28 +67,28 @@ jobs:
6767
6868
case $TEST_TYPE in
6969
"unit")
70-
python tests/test_runner.py --pattern unit
70+
cd src/praisonai && python tests/test_runner.py --pattern unit
7171
;;
7272
"integration")
73-
python tests/test_runner.py --pattern integration
73+
cd src/praisonai && python tests/test_runner.py --pattern integration
7474
;;
7575
"fast")
76-
python tests/test_runner.py --pattern fast
76+
cd src/praisonai && python tests/test_runner.py --pattern fast
7777
;;
7878
"performance")
79-
python tests/test_runner.py --pattern "performance"
79+
cd src/praisonai && python tests/test_runner.py --pattern "performance"
8080
;;
8181
"frameworks")
82-
python tests/test_runner.py --pattern frameworks
82+
cd src/praisonai && python tests/test_runner.py --pattern frameworks
8383
;;
8484
"autogen")
85-
python tests/test_runner.py --pattern autogen
85+
cd src/praisonai && python tests/test_runner.py --pattern autogen
8686
;;
8787
"crewai")
88-
python tests/test_runner.py --pattern crewai
88+
cd src/praisonai && python tests/test_runner.py --pattern crewai
8989
;;
9090
"all"|*)
91-
python tests/test_runner.py --pattern all
91+
cd src/praisonai && python tests/test_runner.py --pattern all
9292
;;
9393
esac
9494

.github/workflows/test-core.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,27 @@ jobs:
4343
4444
- name: Run Unit Tests
4545
run: |
46-
python -m pytest tests/unit/ -v --tb=short --disable-warnings --cov=praisonai --cov-report=term-missing
46+
cd src/praisonai && python -m pytest tests/unit/ -v --tb=short --disable-warnings --cov=praisonai --cov-report=term-missing
4747
4848
- name: Run Integration Tests
4949
run: |
50-
python -m pytest tests/integration/ -v --tb=short --disable-warnings
50+
cd src/praisonai && python -m pytest tests/integration/ -v --tb=short --disable-warnings
5151
5252
- name: Run AutoGen Framework Tests
5353
run: |
5454
echo "🤖 Testing AutoGen Framework Integration..."
55-
python tests/test_runner.py --pattern autogen --verbose || echo "⚠️ AutoGen tests completed with issues"
55+
cd src/praisonai && python tests/test_runner.py --pattern autogen --verbose || echo "⚠️ AutoGen tests completed with issues"
5656
continue-on-error: true
5757

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

6464
- name: Run Legacy Tests
6565
run: |
66-
python -m pytest tests/test.py -v --tb=short --disable-warnings
66+
cd src/praisonai && python -m pytest tests/test.py -v --tb=short --disable-warnings
6767
6868
- name: Upload Coverage Reports
6969
if: matrix.python-version == '3.11'

.github/workflows/test-extended.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ jobs:
5252
}
5353
5454
# Test basic agent functionality
55-
timeout_run python src/praisonai-agents/basic-agents.py
55+
timeout_run python ${{ github.workspace }}/src/praisonai-agents/basic-agents.py
5656
5757
# Test async functionality
58-
timeout_run python src/praisonai-agents/async_example.py
58+
timeout_run python ${{ github.workspace }}/src/praisonai-agents/async_example.py
5959
6060
# Test knowledge/RAG functionality
61-
timeout_run python src/praisonai-agents/knowledge-agents.py
61+
timeout_run python ${{ github.workspace }}/src/praisonai-agents/knowledge-agents.py
6262
6363
# Test MCP functionality
64-
timeout_run python src/praisonai-agents/mcp-basic.py
64+
timeout_run python ${{ github.workspace }}/src/praisonai-agents/mcp-basic.py
6565
6666
# Test UI functionality
67-
timeout_run python src/praisonai-agents/ui.py
67+
timeout_run python ${{ github.workspace }}/src/praisonai-agents/ui.py
6868
6969
echo "✅ Example script testing completed"
7070
continue-on-error: true
@@ -100,7 +100,7 @@ jobs:
100100
import time
101101
import sys
102102
import statistics
103-
sys.path.insert(0, 'src/praisonai-agents')
103+
sys.path.insert(0, 'src/praisonai')
104104
105105
print('🏃 Testing agent creation performance...')
106106
times = []

.github/workflows/test-frameworks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Test ${{ matrix.framework }} Framework
6161
run: |
6262
echo "🧪 Testing ${{ matrix.framework }} framework integration with Python ${{ matrix.python-version }}"
63-
python tests/test_runner.py --pattern ${{ matrix.framework }} --verbose --coverage
63+
cd src/praisonai && python tests/test_runner.py --pattern ${{ matrix.framework }} --verbose --coverage
6464
continue-on-error: false
6565

6666
- name: Generate Framework Test Report

.github/workflows/test-real.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ jobs:
7878
if: ${{ github.event.inputs.framework == 'autogen' || github.event.inputs.framework == 'all' }}
7979
run: |
8080
echo "🤖 Running REAL AutoGen tests (⚠️ API costs may apply)"
81-
python -m pytest tests/e2e/autogen/ -v -m real --tb=short
81+
cd src/praisonai && python -m pytest tests/e2e/autogen/ -v -m real --tb=short
8282
continue-on-error: false
8383

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

9191
- name: Generate Real Test Report

.github/workflows/unittest.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@ jobs:
9191
- name: Find Researcher Role Source
9292
run: |
9393
echo "🔍 Hunting for the mysterious 'Researcher' role..."
94+
cd src/praisonai
9495
python -c "
9596
import os
9697
import yaml
9798
import glob
9899
99100
print('📋 Searching for Researcher role in all YAML files:')
100-
yaml_files = glob.glob('tests/*.yaml')
101+
yaml_files = glob.glob('src/praisonai/tests/*.yaml')
101102
102103
for yaml_file in yaml_files:
103104
try:
@@ -139,6 +140,7 @@ jobs:
139140
- name: Trace AutoGen Execution Path
140141
run: |
141142
echo "🔍 Tracing AutoGen execution to find where it diverges..."
143+
cd src/praisonai
142144
python -c "
143145
import os
144146
import sys
@@ -163,7 +165,7 @@ jobs:
163165
164166
# Load the YAML to check what it contains
165167
import yaml
166-
with open('tests/autogen-agents.yaml', 'r') as f:
168+
with open('src/praisonai/tests/autogen-agents.yaml', 'r') as f:
167169
config = yaml.safe_load(f)
168170
169171
framework = agents_gen.framework or config.get('framework')
@@ -209,13 +211,14 @@ jobs:
209211
- name: Debug YAML Loading and Roles
210212
run: |
211213
echo "🔍 Tracing YAML file loading and role creation..."
214+
cd src/praisonai
212215
python -c "
213216
import os
214217
import sys
215218
import yaml
216219
sys.path.insert(0, '.')
217220
218-
print('📁 Available YAML files in tests/:')
221+
print('📁 Available YAML files in src/praisonai/tests/:')
219222
import glob
220223
yaml_files = glob.glob('tests/*.yaml')
221224
for f in yaml_files:
@@ -297,6 +300,7 @@ jobs:
297300
- name: Debug PraisonAIModel API Key Flow
298301
run: |
299302
echo "🔍 Testing PraisonAIModel API key handling..."
303+
cd src/praisonai
300304
python -c "
301305
import os
302306
import sys
@@ -351,12 +355,13 @@ jobs:
351355
- name: Test Direct PraisonAI Execution
352356
run: |
353357
echo "🧪 Testing direct PraisonAI execution (what works locally)..."
354-
python -m praisonai tests/autogen-agents.yaml
358+
python -m praisonai src/praisonai/tests/autogen-agents.yaml
355359
continue-on-error: true
356360

357361
- name: Comprehensive Execution Debug
358362
run: |
359363
echo "🔍 Comprehensive debugging of PraisonAI execution path..."
364+
cd src/praisonai
360365
python -c "
361366
import os
362367
import sys
@@ -376,10 +381,10 @@ jobs:
376381
print(f' {f}')
377382
378383
print()
379-
print('📋 Files in tests/ directory:')
384+
print('📋 Files in src/praisonai/tests/ directory:')
380385
for f in os.listdir('tests'):
381386
if f.endswith('.yaml'):
382-
print(f' tests/{f}')
387+
print(f' src/praisonai/tests/{f}')
383388
384389
# Check if root agents.yaml exists
385390
print()
@@ -401,7 +406,7 @@ jobs:
401406
from praisonai.agents_generator import AgentsGenerator
402407
403408
# Test with full path
404-
test_file = 'tests/autogen-agents.yaml'
409+
test_file = 'src/praisonai/tests/autogen-agents.yaml'
405410
print(f' Using test file: {test_file}')
406411
print(f' File exists: {os.path.exists(test_file)}')
407412
@@ -465,11 +470,11 @@ jobs:
465470
- name: Run Fast Tests
466471
run: |
467472
# Run the fastest, most essential tests
468-
python tests/test_runner.py --pattern fast
473+
cd src/praisonai && python tests/test_runner.py --pattern fast
469474
470475
- name: Run Legacy Example Tests
471476
run: |
472-
python -m pytest tests/test.py -v --tb=short --disable-warnings
477+
cd src/praisonai && python -m pytest tests/test.py -v --tb=short --disable-warnings
473478
continue-on-error: true
474479

475480
- name: Restore Root Config Files

src/praisonai-agents/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,7 @@ all = [
5353
"praisonaiagents[llm]",
5454
"praisonaiagents[mcp]",
5555
"praisonaiagents[api]"
56-
]
56+
]
57+
58+
[tool.setuptools]
59+
packages = ["praisonaiagents"]
File renamed without changes.

0 commit comments

Comments
 (0)