Contributing¶
Thank you for your interest in contributing to k8s-datamodel!
Development Setup¶
Prerequisites¶
- Python 3.10+
- Poetry for dependency management
- Access to a Kubernetes cluster for testing
Installation¶
# Clone the repository
git clone https://github.com/brun-s/k8s-datamodel.git
cd k8s-datamodel
# Install dependencies using uv
uv sync
# Install pre-commit hooks
pre-commit install
Development Workflow¶
Code Style¶
This project follows the conventions: - Use conventional commits for commit messages - Pre-commit hooks for code formatting and linting - Unit tests for all new features
Testing¶
Commit Messages¶
We use Conventional Commits:
feat: add new database export feature
fix: resolve issue with CRD parsing
docs: update API documentation
test: add unit tests for operators module
Pull Request Process¶
- Fork the repository
- Create a feature branch from
main
- Make your changes following the coding standards
- Add/update tests for your changes
- Update documentation as needed
- Submit a pull request with a clear description
Documentation¶
- Use MkDocs with Material theme
- Update relevant documentation for any changes
- Include examples and use cases
- Test documentation builds locally:
Project Structure¶
src/
k8s_inventory_cli/ # Main package
commands/ # CLI command modules
core/ # Core functionality
exporters/ # Export format handlers
inventory/ # Inventory collection logic
docs/ # Documentation
examples/ # Comprehensive examples
usage/ # Usage guides
api/ # API reference
tests/ # Unit tests
Release Process¶
- Update version in
pyproject.toml
- Update CHANGELOG.md
- Create a git tag using conventional commit format
- GitHub Actions handles the rest:
- Generates changelog
- Updates mkdocs.yml and docs/index.md
- Publishes to PyPI
- Deploys documentation
Questions or Issues?¶
- Open an issue for bug reports or feature requests
- Start a discussion for questions or ideas
- Check existing issues before creating new ones
We appreciate all contributions, big and small! 🎉