Thank you for your interest in contributing to the Kubecost Integration library!
-
Clone the repository
git clone https://github.com/lecton-apptio/kubecost-integration.git cd kubecost-integration -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install development dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run with coverage
pytest --cov=kubecost_integration --cov-report=html
# Run specific test file
pytest tests/test_client.py
# Run with verbose output
pytest -v# Format code
black kubecost_integration tests examples
# Lint code
ruff check kubecost_integration tests
# Type checking
mypy kubecost_integration- Ensure all tests pass
- Add tests for new features
- Update documentation
- Format code with Black
- Check for linting issues
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and code quality checks
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 guidelines
- Use type hints for all functions
- Write docstrings for all public APIs
- Keep functions focused and small
- Add comments for complex logic
- Write unit tests for all new features
- Aim for >80% code coverage
- Use pytest fixtures for common setup
- Mock external dependencies
- Test both success and error cases
- Update README.md for user-facing changes
- Add docstrings to all public functions
- Include usage examples
- Document breaking changes
Feel free to open an issue for:
- Bug reports
- Feature requests
- Questions about usage
- Documentation improvements
Thank you for contributing!