Repository navigation
CONTRIBUTING
Thank you for your interest in contributing to GitHub Commander! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Coding Standards
- Testing
- Documentation
- Submitting Changes
- Reporting Bugs
- Feature Requests
Please read and follow our Code of Conduct.
- Python 3.8 or higher
- Git
- A GitHub account
- Basic knowledge of Python and Qt/PySide6
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/your-username/github-commander.git cd github-commander -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt pip install -r requirements-dev.txt # if available -
Run the application:
python main.py
Use descriptive branch names:
feature/add-new-featurebugfix/fix-specific-issuedocs/update-documentationrefactor/improve-code-structure
-
Create a new branch from
main:git checkout -b feature/your-feature-name
-
Make your changes
-
Write tests for new functionality
-
Update documentation as needed
-
Commit your changes with descriptive messages
Follow conventional commits format:
-
feat:- New feature -
fix:- Bug fix -
docs:- Documentation changes -
style:- Code style changes -
refactor:- Code refactoring -
test:- Adding or updating tests -
chore:- Maintenance tasks
Example:
feat: add support for custom keyboard shortcuts
- Add keyboard shortcut configuration in settings
- Implement shortcut handling in main window
- Add documentation for default shortcuts
- Follow PEP 8 style guide
- Use meaningful variable and function names
- Add docstrings to functions and classes
- Keep functions focused and concise
- Maximum line length: 100 characters
- Separate concerns into modules
- Use type hints where appropriate
- Keep imports organized and grouped
- Remove unused imports
"""
Module description.
"""
from typing import Optional, List
class ExampleClass:
"""Class description."""
def __init__(self, param: str):
"""Initialize the class."""
self.param = param
def method_name(self) -> bool:
"""Method description."""
return True# Run all tests
pytest
# Run specific test file
pytest tests/test_module.py
# Run with coverage
pytest --cov=github_commander- Write tests for new features
- Maintain test coverage above 80%
- Use descriptive test names
- Test edge cases and error conditions
def test_feature_works():
"""Test that the feature works as expected."""
# Arrange
input_data = "test"
# Act
result = process_data(input_data)
# Assert
assert result == "expected"- Add docstrings to all public functions and classes
- Document parameters and return values
- Include usage examples in docstrings
- Update user guides for new features
- Add screenshots for UI changes
- Update README if needed
- Keep documentation in sync with code
- User guides:
/docs/directory - API documentation: In-code docstrings
- README: Project overview and quick start
-
Ensure your code passes all tests
-
Update documentation
-
Clean up commit history (squash related commits)
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a pull request on GitHub
-
Fill out the pull request template
-
Wait for code review
- Code follows project style guidelines
- Tests pass locally
- Documentation is updated
- Commit messages are clear
- No merge conflicts
- PR description explains the change
- Maintainers will review your PR
- Address feedback in a timely manner
- Be open to suggestions
- Keep discussion constructive
- Check existing issues
- Check if the issue is fixed in latest version
- Try to reproduce the bug
- Gather relevant information
**Description**
A clear description of the bug.
**Steps to Reproduce**
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
**Expected Behavior**
What you expected to happen.
**Actual Behavior**
What actually happened.
**Screenshots**
If applicable, add screenshots.
**Environment**
- OS: [e.g., Ubuntu 22.04]
- Python Version: [e.g., 3.11]
- GitHub Commander Version: [e.g., 1.0.0]
**Additional Context**
Add any other context about the problem.- Check existing feature requests
- Open an issue describing the feature
- Explain the use case
- Provide implementation ideas if possible
- Discuss with maintainers before implementing
**Is your feature request related to a problem?**
A clear description of the problem.
**Describe the Solution**
A clear description of what you want to happen.
**Describe Alternatives**
A clear description of any alternative solutions or features.
**Additional Context**
Add any other context or screenshots.- Ask questions in GitHub Discussions
- Check existing documentation
- Review similar issues
- Contact maintainers for complex questions
Contributors will be recognized in:
- CONTRIBUTORS.md file
- Release notes
- Project README
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to GitHub Commander!