Contributing¶
Thank you for your interest in contributing to the MicroDC Python Client Library!
Getting Started¶
Prerequisites¶
- Python 3.8 or higher
- Git
- A GitLab account
Development Setup¶
# Clone the repository
git clone https://gitlab.com/microdc/python-client.git
cd python-client
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# Install with dev dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pip install pre-commit
pre-commit install
Coding Standards¶
Style Guide¶
- Line length: 100 characters
- Formatting: Black (
black microdc/) - Linting: Ruff (
ruff check microdc/) - Type checking: mypy (
mypy microdc/) - Docstrings: Google style
Quality Checklist¶
- Code passes
black --check - Code passes
ruff check - Code passes
mypy - All tests pass (
pytest) - Type hints added for new functions
- Docstrings follow Google style
- No commented-out code or debug prints
Testing¶
# Run all tests
pytest
# With coverage
pytest --cov=microdc --cov-report=html
# Specific test file
pytest tests/unit/test_llm_embed.py -v
Current status: 151 tests, 68% coverage
Writing Tests¶
- Use
pytestfixtures for setup - Mock external API calls
- Test edge cases, not just happy paths
- Maintain or improve coverage
Commit Messages¶
Follow Conventional Commits:
feat(client): add DocumentCall support
fix(http): resolve file upload header issue
docs(readme): add document processing examples
test(client): add tests for file upload
Merge Request Process¶
- Create a branch from
main:git checkout -b feature/your-feature - Make changes following coding standards
- Run tests and linters
- Push and create a Merge Request on GitLab
- Respond to review feedback
All MRs require at least one approval and passing CI checks.
Areas for Contribution¶
- Bug fixes
- New features from the roadmap
- Documentation improvements
- Test coverage improvements
- Example scripts
Questions?¶
- GitLab Issues
- Email: support@microdc.ai