Thank you for your interest in contributing to the CZero Engine Python SDK! We welcome contributions from the community.
-
Fork the Repository
git clone https://github.com/czero/workflow-template.git cd workflow-template -
Set Up Development Environment
# Install UV package manager pip install uv # Install dependencies uv pip install -e ".[dev]"
-
Verify Setup
# Run tests uv run pytest # Check code style uv run ruff check .
git checkout -b feature/your-feature-name- Write clean, readable code
- Follow existing code patterns
- Add type hints for all functions
- Update documentation as needed
# Run all tests
uv run pytest
# Run specific test
uv run pytest tests/test_integration.py::test_your_feature
# Check coverage
uv run pytest --cov=czero_engine --cov-report=html- Push your branch to your fork
- Create a pull request with clear description
- Link any related issues
- Use Python 3.11+ features
- Follow PEP 8 conventions
- Maximum line length: 100 characters
- Use descriptive variable names
- Write tests for new features
- Maintain or improve code coverage
- Test edge cases and error handling
- Use async/await consistently
- Update docstrings for new functions
- Add examples for complex features
- Keep README.md current
- Document breaking changes
workflow-template/
├── czero_engine/ # Main SDK package
│ ├── client.py # API client
│ ├── models.py # Pydantic models
│ └── workflows/ # High-level workflows
├── tests/ # Test suite
├── examples/ # Usage examples
└── docs/ # Additional documentation
All contributions must:
- Pass existing tests
- Include tests for new features
- Maintain 80%+ code coverage
- Handle errors gracefully
- Tests pass locally
- Code follows style guidelines
- Documentation is updated (see below)
- Commit messages are clear
- PR description explains changes
Update documentation when your changes affect:
- Docstrings: Add/update function and class docstrings in your code
- README.md: Update if you add new features, change SDK usage, or improve examples
- Examples: Update or add example scripts if you introduce new functionality
- Type hints: Ensure all new functions have proper type annotations
- CHANGELOG.md: Add entry for breaking changes or major features (if file exists)
Examples:
- Adding a new workflow? → Update README.md with usage example
- New client method? → Add docstring with parameters and return type
- Improved error handling? → Update relevant documentation
- Fixed a common issue? → Consider adding to troubleshooting section
Note: The CZero Engine API is closed source and cannot be modified by external contributors. This SDK is a client library that interfaces with the existing API.
type: brief description
Longer explanation if needed
Fixes #issue_number
Types: feat, fix, docs, test, refactor, perf, chore
- Download CZero Engine from czero.cc
- Start the application
- Ensure API server is running on port 1421
- Load required models through the UI
# Enable verbose logging
client = CZeroEngineClient(verbose=True)
# Use environment variables
CZERO_API_URL=http://localhost:1421
CZERO_VERBOSE=true- Connection refused: Ensure CZero Engine is running
- Model not loaded: Load models through the app UI
- Timeout errors: Increase client timeout for LLM operations
- Be respectful and inclusive
- Welcome newcomers
- Accept constructive criticism
- Focus on what's best for the community
- Harassment or discrimination
- Trolling or insulting comments
- Public or private harassment
- Publishing private information
When reporting issues, include:
- Python version and OS
- CZero Engine version
- Steps to reproduce
- Error messages/logs
- Expected vs actual behavior
Contributors are recognized in:
- GitHub contributors page
- Release notes
- Project documentation
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to CZero Engine! 🚀