Getting Started
We welcome contributions to Copr! Whether you’re fixing bugs, adding features, improving documentation, or helping others, your contributions are valuable.Ways to Contribute
- Code contributions: Fix bugs, add features, refactor code
- Documentation: Write guides, improve existing docs
- Scripts and tools: Share useful scripts using Copr API
- Help others: Answer questions on IRC or mailing lists
- Testing: Run tests, report bugs, verify fixes
Source Code
The main Copr repository:frontend/- Web UI and API (Flask application)backend/- Build orchestration and executiondistgit/- Source caching servicekeygen/- GPG key management and signingrpmbuild/- Package building logiccli/- Command-line interfacepython/- Python API client librarycommon/- Shared code between components
Coding Standards
All Copr developers have agreed to comply with the following standards. In case of controversy, these rules take precedence over personal preference.PEP8 Compliance
All new code must be PEP8 compliant. Exceptions are allowed only when:- The violation is uniformly approved by the team
- The code contains a comment to disable Pylint warning:
Docstring Style
Although PEP8 permits multiple docstring styles, Copr uses triple-quotes for all docstrings: Multi-line docstrings:Database Schema
Every database table must have:- An autoincrement integer primary key named
id - This applies even when the ID value is not used
Naming Conventions
For consistency, we follow these naming patterns:*_safe methods: Methods considered “safe from exceptions”
*_or_none methods: Return desired output or None if not found
Testing Your Changes
Unit Tests
Run unit tests before committing changes to any component: Frontend tests:Behavioral Tests
Copr has three behavioral test suites:- Integration tests
- Backend tests
- DistGit tests
Testing in Docker Environment
After making changes to frontend or backend:- Restart the respective container for changes to take effect
- Check logs for errors:
- Test via Web UI: Navigate to http://localhost:5000
- Test via API: Use
copr-clior curl
Submitting Changes
Git Workflow
Pull Request Guidelines
- Title: Clear, concise description of the change
- Description: Explain what changed and why
- Reference issues: Use “Fixes #123” or “Resolves #456”
- Tests: Include tests for new features or bug fixes
- Documentation: Update docs if behavior changes
- Commits: Keep commits focused and well-documented
Alternative: Patch Submission
If you prefer sending patches instead of pull requests, see the patch process documentation.Building Packages
When working on Copr components, you may need to build packages locally:Documentation
We need help with:- Code documentation: Add docstrings to undocumented functions
- User guides: Write tutorials and how-to guides
- Developer docs: Document architecture, workflows, and design decisions
- API documentation: Keep API docs in sync with code
- Updating outdated docs: Review and refresh existing documentation
Getting Help
Communication Channels
- GitHub Issues: https://github.com/fedora-copr/copr/issues
- Bugzilla: Report bugs at https://bugzilla.redhat.com/enter_bug.cgi?product=Copr
- Mailing List: [email protected]
- IRC: #fedora-buildsys on Libera.Chat
- Matrix: Bridged to IRC channel
Before Asking
- Check existing documentation
- Search closed issues and pull requests
- Review the code (it’s often the best documentation)
- Run tests to understand expected behavior
Security Issues
If you discover a security vulnerability:- Do NOT open a public issue
- Report privately via GitHub Security Advisories
- Include details about the vulnerability and steps to reproduce
- Allow time for the team to address the issue before public disclosure
Code of Conduct
Be respectful, constructive, and collaborative. We’re all working together to make Copr better.Recognition
Contributors are recognized in:- Git commit history
- Release notes for significant contributions
- Project README and documentation