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.

Work item.

How to find a project to review

Work item.

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:

Work item.

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:

Work item.