doc/development/python_guide/maintainership.md
GitLab standard code review guidelines apply to Python projects as well.
There are two main approaches to set up a Python code review process at GitLab:
This section explains how to integrate your project with reviewer roulette and other resources to connect project contributors with Python experts for code reviews.
For both large and small projects, Reviewer Roulette can automate the reviewer assignment process. To set up:
Then, depending on your project size:
projects field in their individual entry in team_members or team_database, specifying appropriate roles such as reviewer or maintainer.When a merge request is created, Review Roulette will randomly select qualified reviewers based on your configuration.
For more information, see reviewer roulette
If contributors have questions or need additional help with Python-specific reviews, direct them to the GitLab #python or #python_maintainers Slack channels for assistance.
Established projects have their own pools of reviewers and maintainers. Smaller or new projects can benefit from the help of established Python experts at GitLab.
GitLab Python experts are professionals with Python expertise who contribute to improving code quality across different projects. To become one:
python: maintainer competency under projects to your team file.Once your merge request is merged, you'll be added to the Python maintainers group.
Each project can establish their own review process. Review the maintainership guidelines and/or contact current maintainers for more information.
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:
pytest, including advanced testing strategies (for example, mocking, integration tests, and test-driven development).Code review objectives:
Additional responsibilities:
When writing and reviewing code, follow our Style Guides. Code authors and reviewers are encouraged to pay attention to these areas:
When reviewing Python code at GitLab, consider the following areas:
test_{file_being_tested}.py.When maintaining customer-facing services, maintainers must ensure backward compatibility across supported GitLab versions. See the GitLab Statement of Support and Python deployment guidelines. Before merging changes, verify that they maintain compatibility with all supported versions to prevent disruption for users on different GitLab releases.