Contribution Guidelines
Relevant source files
The following files were used as context for generating this wiki page:
Rope is an open-source Python refactoring library that encourages community participation through code contributions, bug reports, and documentation improvements. The project follows the all-contributors specification, welcoming contributions of any kind to maintain its status as a powerful and safe refactoring tool.
The scope of contributions includes filling gaps in Python syntax support (up to Python 3.10 and beyond), fixing bugs, and enhancing refactoring operations. All contributors are expected to adhere to the project's Code of Conduct and technical standards to ensure a healthy and inclusive environment.
Sources: README.rst:19-22, README.rst:49-51, CONTRIBUTORS.md:126-128
Community Standards and Conduct
Rope adopts the Contributor Covenant to ensure a harassment-free experience for everyone. Contributors and leaders pledge to act in ways that contribute to an open, welcoming, diverse, and healthy community.
Expected Behaviors
- Demonstrating empathy and kindness toward other people.
- Being respectful of differing opinions and experiences.
- Giving and gracefully accepting constructive feedback.
- Focusing on the best interests of the overall community.
Sources: CODE_OF_CONDUCT.md:7-22
Enforcement Process
Community leaders are responsible for enforcing these standards. Violations can lead to consequences ranging from private warnings to permanent bans.
The diagram shows the escalation path for handling reported violations of the Code of Conduct.
Sources: CODE_OF_CONDUCT.md:46-85
Technical Contribution Workflow
The technical workflow for Rope involves issue tracking, environment setup, and submission via Pull Requests.
Issue Reporting and Feature Requests
Contributors should use the GitHub issue tracker for bug reports and feature requests. Bug reports require specific information to be actionable:
- A clear and descriptive title.
- Steps to reproduce the behavior.
- Expected vs. actual results.
- Environment details (Python version, Rope version).
Sources: README.rst:64-66, .github/ISSUE_TEMPLATE/bug-report.md:4-20
Development Environment
Rope uses pyproject.toml to manage dependencies and build systems. It targets Python versions >= 3.8.
| Dependency Group | Key Packages | Purpose |
|---|---|---|
| Main | pytoolconfig | Configuration management |
| Dev | pytest, pytest-cov, pre-commit | Testing and linting |
| Doc | sphinx, sphinx-rtd-theme | Documentation building |
| Release | twine, build | Distribution packaging |
| Sources: pyproject.toml:5-52 |
Coding Standards
Rope follows strict coding styles to maintain consistency:
- Formatting: The project uses
blackfor code formatting. - Import Sorting:
isortis used with theblackprofile. - Type Hinting: Contributors are encouraged to add type hints to improved modules (e.g.,
importinfo.py).
Sources: pyproject.toml:68-80, CHANGELOG.md:7-9, CHANGELOG.md:83-85
Submission and Review Process
All code changes must be submitted via Pull Requests (PRs). The PR template requires contributors to specify the type of change and ensure quality through testing.
Pull Request Checklist
- Change Type: Identify if it is a bug fix, new feature, breaking change, or documentation update.
- Testing: Confirm that existing tests pass and new tests have been added for the changes.
- Documentation: Ensure documentation is updated if the change introduces new user-facing features.
Sources: .github/PULL_REQUEST_TEMPLATE.md:12-35
Automated Workflows
Rope utilizes GitHub Actions for continuous integration, including:
- Build Status: Running tests across supported Python versions (3.8 - 3.13).
- Code Coverage: Integrated with Codecov to track test coverage.
- Linting: Enforcement of
blackcode style via GHA.
Sources: README.rst:9-15, CHANGELOG.md:11-15, CHANGELOG.md:162-165
Recognition of Contributors
The project tracks contributions using the all-contributors specification. Contributors are recognized in the CONTRIBUTORS.md file with emojis representing their types of contributions (e.g., 💻 for code, 📖 for documentation, 🚧 for maintenance, and 🐛 for bug reports).
Sources: CONTRIBUTORS.md:6-128
Contribution to Rope is a collaborative effort focused on maintaining a robust refactoring engine. By following these guidelines, contributors help ensure the project remains stable, well-documented, and welcoming to new developers.