pygeai-orchestration 0.1.0b2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygeai_orchestration-0.1.0b2/BUILD.md +318 -0
- pygeai_orchestration-0.1.0b2/CHANGELOG.md +29 -0
- pygeai_orchestration-0.1.0b2/CONTRIBUTING.md +262 -0
- pygeai_orchestration-0.1.0b2/LICENSE +8 -0
- pygeai_orchestration-0.1.0b2/MANIFEST.in +12 -0
- pygeai_orchestration-0.1.0b2/PKG-INFO +290 -0
- pygeai_orchestration-0.1.0b2/README.md +260 -0
- pygeai_orchestration-0.1.0b2/docs/patterns_guide.md +313 -0
- pygeai_orchestration-0.1.0b2/docs/quickstart.md +139 -0
- pygeai_orchestration-0.1.0b2/docs/source/api/core.rst +125 -0
- pygeai_orchestration-0.1.0b2/docs/source/api/exceptions.rst +73 -0
- pygeai_orchestration-0.1.0b2/docs/source/api/patterns.rst +44 -0
- pygeai_orchestration-0.1.0b2/docs/source/changelog.rst +94 -0
- pygeai_orchestration-0.1.0b2/docs/source/contributing.rst +158 -0
- pygeai_orchestration-0.1.0b2/docs/source/examples.rst +329 -0
- pygeai_orchestration-0.1.0b2/docs/source/index.rst +73 -0
- pygeai_orchestration-0.1.0b2/docs/source/patterns.rst +380 -0
- pygeai_orchestration-0.1.0b2/docs/source/quickstart.rst +251 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/__init__.py +99 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/__init__.py +7 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/__main__.py +11 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/commands/__init__.py +13 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/commands/base.py +192 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/error_handler.py +123 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/formatters.py +419 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/geai_orch.py +270 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/interactive.py +265 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/cli/texts/help.py +169 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/__init__.py +130 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/base/__init__.py +23 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/base/agent.py +121 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/base/geai_agent.py +144 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/base/geai_orchestrator.py +77 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/base/orchestrator.py +142 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/base/pattern.py +161 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/base/tool.py +149 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/common/__init__.py +18 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/common/context.py +140 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/common/memory.py +176 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/common/message.py +50 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/common/state.py +181 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/composition.py +190 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/config.py +356 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/exceptions.py +400 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/handlers.py +380 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/utils/__init__.py +37 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/utils/cache.py +138 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/utils/config.py +94 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/utils/logging.py +57 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/utils/metrics.py +184 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/core/utils/validators.py +140 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/dev/__init__.py +15 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/dev/debug.py +288 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/dev/templates.py +321 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/dev/testing.py +301 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/patterns/__init__.py +15 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/patterns/multi_agent.py +237 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/patterns/planning.py +219 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/patterns/react.py +221 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/patterns/reflection.py +134 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/patterns/tool_use.py +170 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/__init__.py +1 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_base_classes.py +187 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_cache.py +184 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_cli_formatters.py +232 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_common.py +214 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_composition.py +265 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_config.py +301 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_dev_utils.py +337 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_exceptions.py +327 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_handlers.py +307 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_metrics.py +171 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration/tests/test_patterns.py +165 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration.egg-info/PKG-INFO +290 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration.egg-info/SOURCES.txt +83 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration.egg-info/dependency_links.txt +1 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration.egg-info/entry_points.txt +2 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration.egg-info/requires.txt +11 -0
- pygeai_orchestration-0.1.0b2/pygeai_orchestration.egg-info/top_level.txt +1 -0
- pygeai_orchestration-0.1.0b2/pyproject.toml +33 -0
- pygeai_orchestration-0.1.0b2/requirements.txt +7 -0
- pygeai_orchestration-0.1.0b2/setup.cfg +4 -0
- pygeai_orchestration-0.1.0b2/snippets/multi_agent_snippet.py +26 -0
- pygeai_orchestration-0.1.0b2/snippets/react_snippet.py +17 -0
- pygeai_orchestration-0.1.0b2/snippets/reflection_snippet.py +15 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# Build Guide for PyGEAI-Orchestration
|
|
2
|
+
|
|
3
|
+
This document outlines the build, test, and release process for PyGEAI-Orchestration.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Python >= 3.10
|
|
10
|
+
- pip
|
|
11
|
+
- virtualenv (recommended)
|
|
12
|
+
- Git
|
|
13
|
+
|
|
14
|
+
### Local Development Environment
|
|
15
|
+
|
|
16
|
+
1. **Clone the repository:**
|
|
17
|
+
```bash
|
|
18
|
+
git clone https://github.com/genexus-books/pygeai-orchestration.git
|
|
19
|
+
cd pygeai-orchestration
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
2. **Create and activate virtual environment:**
|
|
23
|
+
```bash
|
|
24
|
+
python -m venv venv
|
|
25
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
3. **Install dependencies:**
|
|
29
|
+
```bash
|
|
30
|
+
pip install -r requirements.txt
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. **Install in editable mode:**
|
|
34
|
+
```bash
|
|
35
|
+
pip install -e .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
5. **Verify installation:**
|
|
39
|
+
```bash
|
|
40
|
+
geai-orch --help
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Building the Package
|
|
44
|
+
|
|
45
|
+
### Build from Source
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Clean previous builds
|
|
49
|
+
rm -rf build/ dist/ *.egg-info
|
|
50
|
+
|
|
51
|
+
# Build wheel and source distribution
|
|
52
|
+
python -m build
|
|
53
|
+
|
|
54
|
+
# Or using setuptools directly
|
|
55
|
+
python setup.py sdist bdist_wheel
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Build Output
|
|
59
|
+
|
|
60
|
+
Build artifacts are created in:
|
|
61
|
+
- `dist/` - Wheel (`.whl`) and source distribution (`.tar.gz`)
|
|
62
|
+
- `build/` - Temporary build files
|
|
63
|
+
- `*.egg-info/` - Package metadata
|
|
64
|
+
|
|
65
|
+
## Testing
|
|
66
|
+
|
|
67
|
+
### Run All Tests
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
python testing.py
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Run Unit Tests Only
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
python testing.py --unit
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Run Specific Test Module
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python -m unittest pygeai_orchestration.tests.patterns.test_reflection -v
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Run Integration Tests
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python testing.py --integration
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Coverage Report
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Run tests with coverage
|
|
95
|
+
python testing.py --coverage
|
|
96
|
+
|
|
97
|
+
# View HTML coverage report
|
|
98
|
+
open htmlcov/index.html # On macOS
|
|
99
|
+
# or
|
|
100
|
+
xdg-open htmlcov/index.html # On Linux
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Code Quality Checks
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# PEP 8 compliance
|
|
107
|
+
flake8 pygeai_orchestration --max-line-length=120
|
|
108
|
+
|
|
109
|
+
# Type checking (if using mypy)
|
|
110
|
+
mypy pygeai_orchestration
|
|
111
|
+
|
|
112
|
+
# Security checks (if using bandit)
|
|
113
|
+
bandit -r pygeai_orchestration
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Documentation
|
|
117
|
+
|
|
118
|
+
### Build Sphinx Documentation
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
cd docs
|
|
122
|
+
make html
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
View documentation:
|
|
126
|
+
```bash
|
|
127
|
+
open _build/html/index.html
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Generate Markdown Documentation
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
cd docs
|
|
134
|
+
sphinx-build -b markdown source build/markdown
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Update Documentation
|
|
138
|
+
|
|
139
|
+
After making changes:
|
|
140
|
+
```bash
|
|
141
|
+
./scripts/update_docs.sh
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Version Management
|
|
145
|
+
|
|
146
|
+
### Bump Version
|
|
147
|
+
|
|
148
|
+
For regular releases:
|
|
149
|
+
```bash
|
|
150
|
+
python scripts/bump_version.py <major|minor|patch>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
For beta releases:
|
|
154
|
+
```bash
|
|
155
|
+
python scripts/bump_beta_version.py
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Version Scheme
|
|
159
|
+
|
|
160
|
+
- **Stable releases**: `X.Y.Z` (e.g., `1.2.3`)
|
|
161
|
+
- **Beta releases**: `X.Y.ZbN` (e.g., `0.1.0b1`)
|
|
162
|
+
|
|
163
|
+
Following [Semantic Versioning](https://semver.org/):
|
|
164
|
+
- **MAJOR**: Breaking changes
|
|
165
|
+
- **MINOR**: New features, backward compatible
|
|
166
|
+
- **PATCH**: Bug fixes, backward compatible
|
|
167
|
+
|
|
168
|
+
## Release Process
|
|
169
|
+
|
|
170
|
+
### Pre-release Checklist
|
|
171
|
+
|
|
172
|
+
- [ ] All tests passing
|
|
173
|
+
- [ ] Coverage >= 80%
|
|
174
|
+
- [ ] Documentation updated
|
|
175
|
+
- [ ] CHANGELOG.md updated
|
|
176
|
+
- [ ] Version bumped
|
|
177
|
+
- [ ] No security vulnerabilities
|
|
178
|
+
|
|
179
|
+
### Beta Release
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# 1. Update version
|
|
183
|
+
python scripts/bump_beta_version.py
|
|
184
|
+
|
|
185
|
+
# 2. Update CHANGELOG.md
|
|
186
|
+
# Add release notes under appropriate version
|
|
187
|
+
|
|
188
|
+
# 3. Commit changes
|
|
189
|
+
git commit -m "release: version 0.1.0b1"
|
|
190
|
+
|
|
191
|
+
# 4. Create tag
|
|
192
|
+
git tag v0.1.0b1
|
|
193
|
+
git push origin v0.1.0b1
|
|
194
|
+
|
|
195
|
+
# 5. Build package
|
|
196
|
+
python -m build
|
|
197
|
+
|
|
198
|
+
# 6. Upload to TestPyPI (optional)
|
|
199
|
+
python -m twine upload --repository testpypi dist/*
|
|
200
|
+
|
|
201
|
+
# 7. Upload to PyPI
|
|
202
|
+
python -m twine upload dist/*
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Stable Release
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# 1. Update version
|
|
209
|
+
python scripts/bump_version.py minor # or major/patch
|
|
210
|
+
|
|
211
|
+
# 2. Update CHANGELOG.md
|
|
212
|
+
# Move [Unreleased] items to new version section
|
|
213
|
+
|
|
214
|
+
# 3. Commit changes
|
|
215
|
+
git commit -m "release: version 1.0.0"
|
|
216
|
+
|
|
217
|
+
# 4. Create tag
|
|
218
|
+
git tag v1.0.0
|
|
219
|
+
git push origin v1.0.0
|
|
220
|
+
|
|
221
|
+
# 5. Build and upload
|
|
222
|
+
python -m build
|
|
223
|
+
python -m twine upload dist/*
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### GitHub Release
|
|
227
|
+
|
|
228
|
+
After pushing tag, create GitHub release:
|
|
229
|
+
1. Go to repository > Releases > Draft new release
|
|
230
|
+
2. Select the tag
|
|
231
|
+
3. Add release notes from CHANGELOG.md
|
|
232
|
+
4. Attach build artifacts (optional)
|
|
233
|
+
5. Publish release
|
|
234
|
+
|
|
235
|
+
## CI/CD
|
|
236
|
+
|
|
237
|
+
### GitHub Actions Workflows
|
|
238
|
+
|
|
239
|
+
Automated workflows in `.github/workflows/`:
|
|
240
|
+
|
|
241
|
+
- **test.yml**: Run tests on push/PR
|
|
242
|
+
- **coverage.yml**: Generate coverage reports
|
|
243
|
+
- **integration-tests.yml**: Run integration tests
|
|
244
|
+
- **docs.yml**: Build and deploy documentation
|
|
245
|
+
- **publish-beta.yml**: Publish beta to PyPI
|
|
246
|
+
- **publish.yml**: Publish stable to PyPI
|
|
247
|
+
- **codeql.yml**: Security scanning
|
|
248
|
+
|
|
249
|
+
### Triggering Workflows
|
|
250
|
+
|
|
251
|
+
- **Tests**: Automatic on push to any branch
|
|
252
|
+
- **Coverage**: Automatic on push to main/unstable
|
|
253
|
+
- **Beta Publish**: Manual or on beta tag push
|
|
254
|
+
- **Stable Publish**: Manual or on stable tag push
|
|
255
|
+
|
|
256
|
+
## Docker Build (Optional)
|
|
257
|
+
|
|
258
|
+
If Docker support is added:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Build image
|
|
262
|
+
docker build -t pygeai-orchestration:latest .
|
|
263
|
+
|
|
264
|
+
# Run tests in container
|
|
265
|
+
docker run --rm pygeai-orchestration:latest python testing.py
|
|
266
|
+
|
|
267
|
+
# Run CLI in container
|
|
268
|
+
docker run --rm -it pygeai-orchestration:latest geai-orch --help
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Troubleshooting
|
|
272
|
+
|
|
273
|
+
### Common Issues
|
|
274
|
+
|
|
275
|
+
**Import errors after installation:**
|
|
276
|
+
```bash
|
|
277
|
+
pip uninstall pygeai-orchestration
|
|
278
|
+
pip install -e .
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Tests failing:**
|
|
282
|
+
```bash
|
|
283
|
+
# Clear test cache
|
|
284
|
+
rm -rf
|
|
285
|
+
python testing.py --unit
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Build artifacts not clean:**
|
|
289
|
+
```bash
|
|
290
|
+
# Clean all build artifacts
|
|
291
|
+
rm -rf build/ dist/ *.egg-info __pycache__ htmlcov .coverage
|
|
292
|
+
find . -type d -name __pycache__ -exec rm -rf {} +
|
|
293
|
+
find . -type f -name "*.pyc" -delete
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
## Development Scripts
|
|
297
|
+
|
|
298
|
+
Utility scripts in `scripts/`:
|
|
299
|
+
|
|
300
|
+
- `bump_version.py` - Version management
|
|
301
|
+
- `bump_beta_version.py` - Beta version bumping
|
|
302
|
+
- `check_coverage.sh` - Validate coverage thresholds
|
|
303
|
+
- `validate_test_coverage.py` - Test coverage validation
|
|
304
|
+
- `validate_test_integration.py` - Integration test validation
|
|
305
|
+
- `update_docs.sh` - Documentation update automation
|
|
306
|
+
|
|
307
|
+
## Resources
|
|
308
|
+
|
|
309
|
+
- [Python Packaging Guide](https://packaging.python.org/)
|
|
310
|
+
- [Setuptools Documentation](https://setuptools.pypa.io/)
|
|
311
|
+
- [PyPI Publishing](https://packaging.python.org/tutorials/packaging-projects/)
|
|
312
|
+
- [Semantic Versioning](https://semver.org/)
|
|
313
|
+
|
|
314
|
+
## Support
|
|
315
|
+
|
|
316
|
+
For build issues, contact:
|
|
317
|
+
- Email: geai-sdk@globant.com
|
|
318
|
+
- Issues: [GitHub Issues](https://github.com/genexus-books/pygeai-orchestration/issues)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to PyGEAI-Orchestration will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial project structure and configuration
|
|
12
|
+
- Core base classes for agents, orchestrators, and patterns
|
|
13
|
+
- CLI framework with `geai-orch` command
|
|
14
|
+
- Reflection pattern for iterative improvement
|
|
15
|
+
- Tool Use pattern for function calling
|
|
16
|
+
- ReAct pattern for reasoning and acting
|
|
17
|
+
- Planning pattern for multi-step execution
|
|
18
|
+
- Multi-Agent pattern for collaborative workflows
|
|
19
|
+
- Comprehensive test suite with unit and integration tests
|
|
20
|
+
- Documentation and examples for all patterns
|
|
21
|
+
- GitHub Actions CI/CD workflows
|
|
22
|
+
|
|
23
|
+
## [0.1.0b1] - 2026-02-05
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Initial beta release of PyGEAI-Orchestration
|
|
27
|
+
- Foundation for agentic AI orchestration patterns
|
|
28
|
+
- Integration with PyGEAI SDK
|
|
29
|
+
- Basic project structure and tooling
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Contributing to PyGEAI-Orchestration
|
|
2
|
+
|
|
3
|
+
Thank you for contributing to **PyGEAI-Orchestration**, the agentic AI orchestration framework for [Globant Enterprise AI](https://wiki.genexus.com/enterprise-ai/wiki?8,Table+of+contents%3AEnterprise+AI). This document outlines the guidelines for contributing to the project. All contributors are expected to follow these guidelines to ensure a consistent and high-quality codebase.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
PyGEAI-Orchestration provides orchestration patterns for building agentic AI systems on top of PyGEAI and Globant Enterprise AI. The project uses Python (>=3.10), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and maintains a [Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
8
|
+
|
|
9
|
+
## How to Contribute
|
|
10
|
+
|
|
11
|
+
### 1. Fork and Clone (or Request Access)
|
|
12
|
+
|
|
13
|
+
If the repository allows forking:
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/<your-username>/pygeai-orchestration.git
|
|
16
|
+
cd pygeai-orchestration
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If not, contact the maintainers at [geai-sdk@globant.com](mailto:geai-sdk@globant.com) to request contributor access.
|
|
20
|
+
|
|
21
|
+
### 2. Set Up Development Environment
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Create virtual environment
|
|
25
|
+
python -m venv venv
|
|
26
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
27
|
+
|
|
28
|
+
# Install dependencies
|
|
29
|
+
pip install -r requirements.txt
|
|
30
|
+
|
|
31
|
+
# Install in editable mode
|
|
32
|
+
pip install -e .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3. Create a Branch
|
|
36
|
+
|
|
37
|
+
Create a branch for your changes:
|
|
38
|
+
```bash
|
|
39
|
+
git checkout -b feature/your-feature-name
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use descriptive branch names:
|
|
43
|
+
- `feature/add-reflection-pattern`
|
|
44
|
+
- `bugfix/fix-agent-coordination`
|
|
45
|
+
- `docs/update-planning-guide`
|
|
46
|
+
|
|
47
|
+
### 4. Make Changes
|
|
48
|
+
|
|
49
|
+
Implement your changes following these guidelines:
|
|
50
|
+
|
|
51
|
+
#### Code Style
|
|
52
|
+
- Adhere to [PEP 8](https://www.python.org/dev/peps/pep-0008/)
|
|
53
|
+
- Use type hints for all function parameters and return values
|
|
54
|
+
- Maximum line length: 120 characters
|
|
55
|
+
- Use meaningful variable and function names
|
|
56
|
+
|
|
57
|
+
#### Docstrings
|
|
58
|
+
All public classes, methods, and functions must include docstrings:
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
def orchestrate_agents(
|
|
62
|
+
session: Session,
|
|
63
|
+
agents: list[Agent],
|
|
64
|
+
task: str,
|
|
65
|
+
max_iterations: int = 10
|
|
66
|
+
) -> OrchestrationResult:
|
|
67
|
+
"""
|
|
68
|
+
Orchestrates multiple agents to collaboratively solve a task.
|
|
69
|
+
|
|
70
|
+
This method coordinates agent interactions, manages communication flow,
|
|
71
|
+
and aggregates results from multiple agents working on the same task.
|
|
72
|
+
|
|
73
|
+
:param session: Session - Active PyGEAI session for API access.
|
|
74
|
+
:param agents: list[Agent] - List of agents to coordinate.
|
|
75
|
+
:param task: str - The task description to be solved.
|
|
76
|
+
:param max_iterations: int - Maximum number of coordination cycles. Defaults to 10.
|
|
77
|
+
:return: OrchestrationResult - Contains final output and execution metadata.
|
|
78
|
+
:raises ValueError: If agents list is empty or session is invalid.
|
|
79
|
+
:raises OrchestrationError: If coordination fails after max_iterations.
|
|
80
|
+
"""
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### Testing
|
|
84
|
+
- Write unit tests for all new features
|
|
85
|
+
- Tests must be in the appropriate `tests/` subdirectory
|
|
86
|
+
- Use `unittest` framework
|
|
87
|
+
- Aim for >80% code coverage
|
|
88
|
+
|
|
89
|
+
Test format:
|
|
90
|
+
```python
|
|
91
|
+
class TestReflectionPattern(TestCase):
|
|
92
|
+
"""
|
|
93
|
+
python -m unittest pygeai_orchestration.tests.patterns.test_reflection.TestReflectionPattern
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
def test_basic_reflection(self):
|
|
97
|
+
# Test implementation
|
|
98
|
+
pass
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Documentation
|
|
102
|
+
New features must include:
|
|
103
|
+
- Updates to relevant documentation in `docs/`
|
|
104
|
+
- Pattern examples in `snippets/`
|
|
105
|
+
- Docstrings for all public APIs
|
|
106
|
+
- Updates to `README.md` if needed
|
|
107
|
+
|
|
108
|
+
#### Changelog
|
|
109
|
+
Update `CHANGELOG.md` under the `[Unreleased]` section:
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
## [Unreleased]
|
|
113
|
+
|
|
114
|
+
### Added
|
|
115
|
+
- Reflection pattern with iterative improvement strategies
|
|
116
|
+
- Multi-agent coordination with consensus mechanisms
|
|
117
|
+
|
|
118
|
+
### Fixed
|
|
119
|
+
- Bug in tool registry parameter validation
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
- Improved planning algorithm for better step decomposition
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### 5. Test Your Changes
|
|
126
|
+
|
|
127
|
+
Run the test suite:
|
|
128
|
+
```bash
|
|
129
|
+
# Run all tests
|
|
130
|
+
python testing.py
|
|
131
|
+
|
|
132
|
+
# Run specific test
|
|
133
|
+
python -m unittest pygeai_orchestration.tests.patterns.test_reflection -v
|
|
134
|
+
|
|
135
|
+
# Check coverage
|
|
136
|
+
python testing.py --coverage
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Verify code style:
|
|
140
|
+
```bash
|
|
141
|
+
# Using flake8
|
|
142
|
+
flake8 pygeai_orchestration --max-line-length=120
|
|
143
|
+
|
|
144
|
+
# Using ruff (if available)
|
|
145
|
+
ruff check pygeai_orchestration
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 6. Commit Changes
|
|
149
|
+
|
|
150
|
+
Use conventional commit prefixes:
|
|
151
|
+
|
|
152
|
+
| Prefix | Purpose |
|
|
153
|
+
|-------------|---------------------------------------------------------|
|
|
154
|
+
| `feat:` | New features (patterns, orchestrators, etc.) |
|
|
155
|
+
| `fix:` | Bug fixes |
|
|
156
|
+
| `refactor:` | Code restructuring without behavior changes |
|
|
157
|
+
| `docs:` | Documentation updates |
|
|
158
|
+
| `test:` | Test additions or modifications |
|
|
159
|
+
| `build:` | Build scripts, CI/CD, packaging |
|
|
160
|
+
| `perf:` | Performance improvements |
|
|
161
|
+
|
|
162
|
+
Examples:
|
|
163
|
+
```bash
|
|
164
|
+
git commit -m "feat: add reflection pattern with self-critique"
|
|
165
|
+
git commit -m "fix: resolve agent coordination deadlock"
|
|
166
|
+
git commit -m "docs: update multi-agent pattern examples"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 7. Push and Create Pull Request
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
git push origin feature/your-feature-name
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Create a pull request with:
|
|
176
|
+
- Clear title describing the change
|
|
177
|
+
- Detailed description of what was changed and why
|
|
178
|
+
- References to related issues
|
|
179
|
+
- Screenshots/examples if applicable
|
|
180
|
+
|
|
181
|
+
## Development Guidelines
|
|
182
|
+
|
|
183
|
+
### Architecture Principles
|
|
184
|
+
|
|
185
|
+
1. **No Code Duplication**: Always import from PyGEAI rather than duplicating code
|
|
186
|
+
2. **Pattern Isolation**: Each pattern should be self-contained in its module
|
|
187
|
+
3. **Composability**: Patterns should be composable where it makes sense
|
|
188
|
+
4. **Extensibility**: Design for easy addition of new patterns
|
|
189
|
+
|
|
190
|
+
### Dependency Management
|
|
191
|
+
|
|
192
|
+
- Core dependency: `pygeai >= 0.7.0`
|
|
193
|
+
- Import from PyGEAI for all reusable components:
|
|
194
|
+
```python
|
|
195
|
+
from pygeai.cli.commands import Command, Option, ArgumentsEnum
|
|
196
|
+
from pygeai.cli.parsers import CommandParser
|
|
197
|
+
from pygeai.core.base.session import get_session
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Adding New Patterns
|
|
201
|
+
|
|
202
|
+
When adding a new orchestration pattern:
|
|
203
|
+
|
|
204
|
+
1. Create pattern directory: `pygeai_orchestration/patterns/your_pattern/`
|
|
205
|
+
2. Implement core components:
|
|
206
|
+
- `agent.py` - Pattern-specific agent class
|
|
207
|
+
- `orchestrator.py` - Orchestration logic
|
|
208
|
+
- Additional modules as needed
|
|
209
|
+
3. Add CLI command in `pygeai_orchestration/cli/commands/`
|
|
210
|
+
4. Write tests in `pygeai_orchestration/tests/patterns/`
|
|
211
|
+
5. Add examples in `snippets/your_pattern/`
|
|
212
|
+
6. Document in `docs/patterns/your-pattern.md`
|
|
213
|
+
|
|
214
|
+
### Testing Requirements
|
|
215
|
+
|
|
216
|
+
- Unit tests for all pattern components
|
|
217
|
+
- Integration tests for end-to-end workflows
|
|
218
|
+
- CLI command tests
|
|
219
|
+
- Mock PyGEAI sessions for unit tests
|
|
220
|
+
- Real integration tests (marked appropriately)
|
|
221
|
+
|
|
222
|
+
### Documentation Standards
|
|
223
|
+
|
|
224
|
+
- All public APIs must have complete docstrings
|
|
225
|
+
- Pattern documentation must include:
|
|
226
|
+
- Conceptual overview
|
|
227
|
+
- Use cases
|
|
228
|
+
- Code examples
|
|
229
|
+
- API reference
|
|
230
|
+
- Best practices
|
|
231
|
+
|
|
232
|
+
## Code Review Process
|
|
233
|
+
|
|
234
|
+
1. All changes require at least one review
|
|
235
|
+
2. CI/CD checks must pass
|
|
236
|
+
3. Code coverage must not decrease
|
|
237
|
+
4. Documentation must be updated
|
|
238
|
+
5. Changelog must be updated
|
|
239
|
+
|
|
240
|
+
## Release Process
|
|
241
|
+
|
|
242
|
+
Releases are managed by maintainers:
|
|
243
|
+
|
|
244
|
+
1. Version bump in `pyproject.toml`
|
|
245
|
+
2. Update `CHANGELOG.md`
|
|
246
|
+
3. Create release tag
|
|
247
|
+
4. Publish to PyPI
|
|
248
|
+
|
|
249
|
+
## Getting Help
|
|
250
|
+
|
|
251
|
+
- Email: [geai-sdk@globant.com](mailto:geai-sdk@globant.com)
|
|
252
|
+
- Issues: [GitHub Issues](https://github.com/genexus-books/pygeai-orchestration/issues)
|
|
253
|
+
- Discussions: [GitHub Discussions](https://github.com/genexus-books/pygeai-orchestration/discussions)
|
|
254
|
+
|
|
255
|
+
## Code of Conduct
|
|
256
|
+
|
|
257
|
+
- Be respectful and inclusive
|
|
258
|
+
- Provide constructive feedback
|
|
259
|
+
- Focus on what is best for the community
|
|
260
|
+
- Show empathy towards other community members
|
|
261
|
+
|
|
262
|
+
Thank you for contributing to PyGEAI-Orchestration!
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
Copyright © 2026 Globant
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include CONTRIBUTING.md
|
|
4
|
+
include BUILD.md
|
|
5
|
+
include CHANGELOG.md
|
|
6
|
+
include requirements.txt
|
|
7
|
+
include pyproject.toml
|
|
8
|
+
recursive-include pygeai_orchestration *.py
|
|
9
|
+
recursive-include docs *.md *.rst
|
|
10
|
+
recursive-include snippets *.py
|
|
11
|
+
recursive-exclude * __pycache__
|
|
12
|
+
recursive-exclude * *.py[co]
|