Python Merge Requests Guidelines
GitLab standard code review guidelines apply to Python projects as well.
How to find a reviewer
This section explains how to integrate your project with reviewer roulette and other resources to find reviewers with Python expertise.
How to find a project to review
Maintainer responsibilities
In addition to code reviews, maintainers are responsible for guiding architectural decisions and monitoring and adopting relevant engineering practices introduced in GitLab.com into their Python projects. This helps to ensure Python projects are consistent and aligned with company standards. Maintaining consistency simplifies transitions between GitLab.com and Python projects while reducing context switching overhead.
Technical prerequisites for Maintainers:
- Strong experience with the Python frameworks used in the specific project. Commonly used frameworks include: FastAPI and Pydantic, etc.
- Proficiency with Python testing frameworks such as
pytest
, including advanced testing strategies (for example, mocking, integration tests, and test-driven development). - Understanding of backwards compatibility considerations (Work item).
Code review objectives:
- Verify and confirm changes adheres to style guide (Work item) and existing patterns in the project.
- Where applicable, ensure test coverage is added for the changes introduced in the MR.
- Review for performance implications.
- Check for security vulnerabilities.
- Assess code change impact on existing systems.
- Verify that the MR has the correct MR type label and is assigned to the current milestone.
Additional responsibilities:
- Maintain relevant documentation accuracy and completeness.
- Monitor and update package dependencies as necessary.
- Mentor other engineers on Python best practices.
- Evaluate and propose new tools and libraries.
- Monitor performance and propose optimizations.
- Ensure security standards are maintained.
- Ensure the project is consistent and aligned with GitLab standards by regularly monitoring and adopting relevant engineering practices introduced in GitLab.com.
How to become a maintainer
Each project has its own process and maintainership program. We recommend reviewing the following guideline:
Code review best practices
When writing and reviewing code, follow our Style Guides. Code authors and reviewers are encouraged to pay attention to these areas:
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support