Thank you for your interest in contributing to Sharpify GUI! We welcome contributions from everyone and appreciate your help in making this PyQt6-based media upscaler better for the community.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Coding Standards
- Testing Guidelines
- Commit Guidelines
- Pull Request Process
- Issue Guidelines
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to ujjwalkrai@gmail.com.
Before you begin, ensure you have the following:
- A GitHub account
- Git installed on your local machine
- Python 3.8 or higher
- Basic knowledge of PyQt6 and GUI development.
- Understanding of Real-ESRGAN and FFmpeg.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/sharpify-gui.git cd sharpify-gui - Add the upstream repository:
git remote add upstream https://github.com/uikraft-hub/sharpify-gui.git
- Review the project structure:
sharpify-gui/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── assets/
│ ├── example/
│ │ ├── pikachu_upscaled_x4.jpg
│ │ └── pikachu.jpg
│ ├── screenshots/
│ │ └── screenshot.png
│ └── sharpify-gui-logo.ico
├── docs/
│ ├── CHANGELOG.md
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── README.md
│ ├── SECURITY.md
│ ├── STATUS.md
│ └── USAGE.md
├── LICENSE
├── pyproject.toml
├── requirements.txt
├── src/
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main_window.py
│ │ ├── settings_dialog.py
│ │ ├── ui_utils.py
│ │ └── workers.py
│ ├── bin/
│ │ ├── ffmpeg.exe
│ │ └── realesrgan-ncnn-vulkan.exe
│ ├── build.bat
│ ├── favicon.ico
│ ├── main.py
│ └── models/
│ ├── realesr-animevideov3-x4.bin
│ ├── realesr-animevideov3-x4.param
│ ├── realesrgan-x4plus-anime.bin
│ ├── realesrgan-x4plus-anime.param
│ ├── realesrgan-x4plus.bin
│ └── realesrgan-x4plus.param
└── tests/
└── test_workers.py
- Install the project in development mode:
pip install -e .
We welcome several types of contributions:
- Core Functionality: Enhance upscaling capabilities and features.
- UI/UX Improvements: Improve the PyQt6 interface and user experience.
- Performance Optimization: Optimize upscaling speed, memory usage, and concurrency.
- Error Handling: Improve error handling and user feedback mechanisms.
- Testing: Add comprehensive tests for upscaling and GUI functionality.
- Documentation: Improve guides, API documentation, and usage examples.
- Bug Reports: Help us identify and fix upscaling or GUI issues.
- Feature Requests: Suggest new features or improvements.
- Check existing issues and pull requests to avoid duplicates
- For major changes or new features, please open an issue first to discuss your proposed changes.
- Make sure your contribution aligns with the project's goal of providing a reliable media upscaler.
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt pip install -e . -
Install development dependencies:
pip install pytest pytest-cov black flake8 mypy
-
Create a new branch for your feature or improvement:
git checkout -b feature/your-feature-name # or git checkout -b fix/upscaling-issue-description # or git checkout -b ui/interface-improvement
- Navigate to the
srcdirectory:cd src - Run the application:
python main.py
- Code Formatting: Use
blackfor consistent code formatting. - Linting: Use
flake8for code quality checks. - Type Checking: Use
mypyfor static type analysis. - Testing: Use
pytestfor running tests.
- Write clean, readable, and well-documented Python code.
- Follow PEP 8 style guidelines with Black formatting.
- Use type hints for function parameters and return values.
- Handle errors gracefully with proper exception handling.
- Log important events and errors for debugging.
- Use Black for automatic code formatting.
- Maximum line length: 88 characters (Black default).
- Use meaningful variable and function names.
- Add docstrings for all public functions and classes.
- Follow PEP 8 naming conventions.
- Separate concerns: UI logic in
main_window.pyandsettings_dialog.py, upscaling logic inworkers.py. - Use utility functions in
ui_utils.pyfor common operations. - Keep the main application entry point clean in
main.py. - Implement proper error handling and user feedback.
- Responsive Design: Ensure UI works on different screen sizes.
- Progress Feedback: Show progress for long-running operations.
- Error Messages: Display clear, actionable error messages.
- Input Validation: Validate user input before processing.
- State Management: Use
QSettingsfor persistent settings.
Tests are located in the tests/ directory.
# Run all tests
pytest
# Run with coverage
pytest --cov=src
# Run specific test file
pytest tests/test_workers.py
# Run tests with verbose output
pytest -v- Write tests for all new functionality.
- Test both success and failure scenarios.
- Mock external processes like
realesrgan-ncnn-vulkan.exeandffmpeg.exe. - Maintain test coverage above 80%.
We follow the Conventional Commits specification for commit messages.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: A new feature (upscaling capability, UI improvement)fix: A bug fix (upscaling error, UI issue)perf: Performance improvements (faster upscaling, memory optimization)refactor: Code refactoring without changing functionalitytest: Adding or updating testsdocs: Documentation only changesstyle: Code style changes (formatting, etc.)chore: Maintenance tasks and dependency updates
upscaler: Changes to upscaling functionalityui: PyQt6 interface changesworker: Upscaling worker changesutils: Utility functionstests: Test-related changesdocs: Documentation changes
feat(upscaler): add support for a new upscaling model
fix(ui): resolve progress bar not updating during batch processing
perf(worker): optimize video frame extraction
docs: update usage examples with new file formats
test(worker): add comprehensive tests for video upscaling
-
Ensure your branch is up to date with the main branch:
git fetch upstream git rebase upstream/main
-
Run the full test suite:
pytest
-
Check code formatting and linting:
black src/ tests/ flake8 src/ tests/ mypy src/
-
Test the application manually.
-
Update documentation if necessary.
-
Push your branch to your fork:
git push origin feature/your-feature-name
-
Create a pull request from your fork to the main repository.
-
Fill out the pull request template completely.
- Code follows the project's coding standards.
- Tests pass locally and cover new functionality.
- Documentation has been updated (if applicable).
- Commit messages follow conventional commit format.
- No breaking changes (or breaking changes are documented).
- Performance impact has been considered.
- Error handling has been implemented appropriately.
- Search existing issues to avoid duplicates.
- Test with the latest version of the application.
- Gather relevant information (error messages, screenshots).
- Try to reproduce the issue consistently.
When reporting a bug, please include:
- Bug Description: Clear and concise description of the issue.
- Steps to Reproduce: Detailed steps to reproduce the issue.
- Expected Behavior: What should happen.
- Actual Behavior: What actually happens.
- Error Messages: Any error messages or logs.
- Environment: Operating system, Python version.
- Screenshots: UI screenshots showing the issue.
When requesting a new feature, please include:
- Feature Description: Clear description of the proposed feature.
- Use Case: Why is this feature needed? What problem does it solve?
- Proposed Implementation: Your ideas for how this could be implemented.
If you need help or have questions:
- Open an issue with the "question" label.
- Email us at ujjwalkrai@gmail.com.
- Check existing documentation in the
docs/folder. - Review the USAGE.md for detailed usage instructions.
By contributing to this project, you agree that your contributions will be licensed under the MIT License, the same license as the project. See LICENSE for details.