Thank you for your interest in contributing to Sanityops CLI! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Development Setup
- Development Workflow
- Code Style
- Pull Request Process
- Commit Message Convention
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Python 3.11 or higher
- Git
- A GitHub account
-
Fork and clone the repository
git clone https://github.com/<your-username>/sanityops-cli.git cd sanityops-cli
-
Create a virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install development dependencies
pip install -e ".[dev,test]" -
Verify the setup
pytest ruff check .
We follow GitHub Flow:
- Create a feature branch from
main - Make your changes
- Submit a pull request
- After review and approval, merge to
main
git checkout main
git pull origin main
git checkout -b feature/your-feature-nameWe use Ruff for code quality enforcement.
ruff check .ruff format .ruff check --fix .- Line length: 100 characters
- Use isort for import sorting
- Follow PEP 8 conventions
- Write docstrings for public functions and classes
-
Ensure tests pass
pytest ruff check . -
Add tests for new features
- Place tests in the
tests/directory - Follow the existing test structure
- Use pytest fixtures where appropriate
- Place tests in the
-
Update documentation
- Update README.md if you change user-facing behavior
- Update docstrings for modified functions/classes
-
Submit your PR
- Fill out the PR template completely
- Link any related issues
- Request review from maintainers
-
Address review feedback
- Make requested changes
- Push new commits (avoid force-pushing during review)
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
| Type | Description |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation changes |
style |
Code style changes (formatting, etc.) |
refactor |
Code refactoring |
test |
Adding or updating tests |
chore |
Maintenance tasks |
feat(inspect): add support for custom check levels
fix(config): resolve path resolution on Windows
docs: update installation instructions
test(commands): add tests for init command
- Open a GitHub Discussion for general questions
- Open an Issue for bug reports or feature requests
Thank you for contributing!