Problem
Having a very loose set of coding standards, ends up sometimes getting newcomers merge requests bouncing on things that could have been addressed by them, making the contribution process less welcoming than it could be.
This task is to do a second pass to the current coding standards, focusing on the new tools-platform team owned code (see https://wikitech.wikimedia.org/wiki/Wikimedia_Cloud_Services_team/Ownership), and publish it as reference in wikitech.
Focus should be put on automating as many of those standards in checks (ex. adding new rules to ruff/pre-commit/etc.), and leaving the most
Related materials
- Mediawiki coding conventions for python: https://www.mediawiki.org/wiki/Manual:Coding_conventions/Python
- Current coding conventios for cloud services: https://wikitech.wikimedia.org/wiki/Wikimedia_Cloud_Services_team/Coding
- Contributor requesting to add/improve the contribution guidelines and coding conventions T408331: Policy for (external) contributions / code style
- Cloud services social norms: https://www.mediawiki.org/wiki/Wikimedia_Cloud_Services_team/Team_Social_Norms
- T408783: [docs] Update all toolforge repos in gitlab with contribution guidelines and license
- <add more here>
Constraints and risks
- Risk of endless discussion
- Limiting it to the toolforge repositories and code on gitlab for now, as they are more heterogeneous and need less parties to agree on them.
- <add more here>
Decision record
In progress
Options
Given that we have a common tooling and linting flows in toolforge repos already, this round we can focus more on the practices themselves.
So @dcaro proposes the following process:
- Create a doc to gather individual principles and do some discussion/comments/etc.
- Current working document (will move to wikitech when more stable) https://docs.google.com/document/d/1yhPYcDmzO2aXIzK1d_G_7JQUjukGiis_zuLeJZvpRlM/edit?tab=t.0
- From the doc create 3 different proposals and put them here as options, then review/discuss and decide
Option 1
Some explanation of option 1
For this option we also tested this and that and we found this.
Pros:
- Pro 1
Cons:
- Con 1
...