Thank you for your interest in contributing to BatchPrint Pro. This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- How to Contribute
- Development Setup
- Coding Standards
- Pull Request Process
- Issue Reporting
- Community
By participating in this project, you agree to abide by the following principles:
- Be respectful: Treat all contributors with respect and professionalism
- Be inclusive: Welcome newcomers and help them get started
- Be constructive: Provide actionable feedback and accept criticism gracefully
- Be honest: Do not plagiarize or misrepresent your contributions
There are many ways to contribute to BatchPrint Pro:
- Use the GitHub Issues page
- Search existing issues before creating a new one
- Use the bug report template if available
- Include steps to reproduce, expected behavior, and actual behavior
- Open an issue with the "enhancement" label
- Clearly describe the proposed feature and its use case
- Discuss the feature with maintainers before implementing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Fix typos or unclear wording
- Add missing documentation
- Translate documentation to other languages
- Python 3.13 or higher
- Git
- A GitHub account
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/yourusername/BatchPrintPro.git cd BatchPrintPro -
Create a virtual environment:
python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # macOS/Linux
-
Install dependencies:
pip install -r requirements.txt pip install -r requirements-dev.txt # Development dependencies (optional) -
Run the application:
python main.py
-
Add the upstream remote:
git remote add upstream https://github.com/originalusername/BatchPrintPro.git
- Follow PEP 8 style guidelines
- Use 4 spaces for indentation (no tabs)
- Limit lines to 79 characters (or 88 for Black formatter)
- Use meaningful variable and function names
- Write docstrings for all public functions and classes
- Follow Google Style for docstrings
- Comment complex logic
Example:
def print_document(file_path: str, printer_name: str) -> tuple[bool, str]:
"""
Print a document to the specified printer.
Args:
file_path: Path to the document file
printer_name: Name of the target printer
Returns:
Tuple of (success: bool, message: str)
Raises:
FileNotFoundError: If file_path does not exist
PrinterError: If printer_name is not available
"""
passUse type hints for function signatures:
from typing import Optional
def get_printer_status(printer_name: str) -> Optional[dict]:
"""Get the status of a printer."""
passRespect the MVVM separation of concerns:
- Models (
src/models/): Data structures and business logic - Views (
src/views/): User interface components only - ViewModels (
src/viewmodels/): Presentation logic and state management - Services (
src/services/): External integrations and utilities
Do not:
- Access UI components from Models or Services
- Put business logic in Views
- Mix presentation logic with data access
Follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Build process or auxiliary tool changes
Examples:
feat(print): add support for TIFF image format
fix(ui): correct task list selection behavior
docs(readme): update installation instructions
-
Update your fork with the latest upstream changes:
git fetch upstream git checkout main git merge upstream/main
-
Create a feature branch:
git checkout -b feat/add-tiff-support
-
Make your changes and commit them:
git add . git commit -m "feat(print): add support for TIFF image format"
-
Run tests (if available):
python -m pytest tests/
-
Update documentation if necessary
-
Push your branch to your fork:
git push origin feat/add-tiff-support
-
Open a Pull Request on GitHub:
- Go to your fork on GitHub
- Click "Compare & pull request"
- Fill in the PR template
- Link related issues
-
PR Title Format:
feat(scope): description(same as commit messages) -
PR Description should include:
- What changes were made and why
- How to test the changes
- Screenshots (if UI changes)
- Related issue numbers
- Maintainers will review your PR
- Address feedback by pushing additional commits
- Once approved, a maintainer will merge your PR
- Delete your feature branch
- Update your local main branch
git checkout main
git pull upstream main
git branch -d feat/add-tiff-supportUse the following template:
**Description**
A clear description of the bug.
**Steps to Reproduce**
1. Step 1
2. Step 2
3. Step 3
**Expected Behavior**
What you expected to happen.
**Actual Behavior**
What actually happened.
**Environment**
- OS: [e.g., Windows 11]
- Python version: [e.g., 3.13.0]
- Package versions: [e.g., PySide6 6.11.1]
**Screenshots**
If applicable, add screenshots.
**Additional Context**
Any other context about the problem.Use the following template:
**Feature Description**
A clear description of the proposed feature.
**Use Case**
Why is this feature needed?
**Proposed Solution**
How should this feature work?
**Alternatives Considered**
Are there alternative approaches?
**Additional Context**
Any other context or screenshots.- Check the documentation
- Search existing issues
- Open a new issue with the "question" label
Contributors will be acknowledged in:
- The project's README.md
- Release notes for significant contributions
Thank you for contributing to BatchPrint Pro!