Contributing¶
Thank you for your interest in contributing to dbx-python-cli!
Getting Started¶
Fork the repository on GitHub
Clone your fork locally
Set up your development environment (see Setup)
Create a new branch for your changes
Make your changes
Run tests and ensure they pass
Submit a pull request
Development Workflow¶
Create a Branch¶
# Create a new branch for your feature/fix
git checkout -b feature/my-new-feature
# Or for a bug fix
git checkout -b fix/issue-123
Make Changes¶
Write your code
Add tests for your changes
Update documentation if needed
Run pre-commit hooks to check formatting
# Run pre-commit hooks manually
just hooks-run
# Or they'll run automatically on commit
git commit -m "Add new feature"
Run Tests¶
# Run all tests
just test
# Run specific tests
pytest tests/test_install_command.py -v
# Check coverage
just test-cov
Update Documentation¶
If your changes affect user-facing functionality:
Update relevant documentation in
docs/Add code examples if applicable
Build docs locally to verify
# Build documentation
just docs
# Serve locally to preview
just docs-serve
Submit Pull Request¶
Push your branch to your fork
Open a pull request on GitHub
Describe your changes clearly
Link any related issues
Wait for review
Code Style¶
This project uses ruff for linting and formatting:
# Format code
just format
# Run linter
just lint
# Both are run automatically by pre-commit hooks
Follow these guidelines:
Use type hints where appropriate
Write docstrings for public functions/classes
Keep functions focused and small
Use descriptive variable names
Follow PEP 8 style guide (enforced by ruff)
Commit Messages¶
Write clear, descriptive commit messages:
Add support for -g flag in install command
- When installing a single repo with -g, now looks for repo in specified group
- Useful when same repo exists in multiple groups
- Added tests to verify behavior
- All tests pass (56/56)
Format:
First line: Brief summary (50 chars or less)
Blank line
Body: Detailed description with bullet points - What changed - Why it changed - Any breaking changes - Test results
Testing Requirements¶
All contributions must include tests:
New features: Add tests for new functionality
Bug fixes: Add tests that would have caught the bug
Refactoring: Ensure existing tests still pass
Coverage: Aim to maintain or improve coverage
See Testing for detailed testing guidelines.
Documentation Requirements¶
Update documentation for:
New features or commands
Changed behavior or APIs
New configuration options
Breaking changes
See Documentation for documentation guidelines.
Review Process¶
Pull requests are reviewed by maintainers:
Automated checks: Tests, linting, coverage must pass
Code review: Maintainer reviews code quality and design
Documentation review: Ensure docs are clear and complete
Testing review: Verify tests are comprehensive
Approval: Once approved, PR will be merged
Questions?¶
If you have questions:
Open an issue on GitHub
Ask in the pull request
Check existing documentation
We’re here to help! 🎉