@@ -11,6 +11,7 @@ We welcome community contributions to MLflow. This page provides useful informat
1111 - [ Write designs for significant changes] ( #write-designs-for-significant-changes )
1212 - [ Make changes backwards compatible] ( #make-changes-backwards-compatible )
1313 - [ Consider introducing new features as MLflow Plugins] ( #consider-introducing-new-features-as-mlflow-plugins )
14+ - [ Python Style Guide] ( #python-style-guide )
1415- [ Setting up the repository] ( #setting-up-the-repository )
1516- [ Developing and testing MLflow] ( #developing-and-testing-mlflow )
1617 - [ Environment Setup and Python configuration] ( #environment-setup-and-python-configuration )
@@ -180,6 +181,35 @@ base](https://github.com/mlflow/mlflow/blob/cdc6a651d5af0f29bd448d2c87a198cf5d32
180181For more information about Plugins, see
181182< https://mlflow.org/docs/latest/plugins.html > .
182183
184+ ### Python Style Guide
185+
186+ ##### Docstrings
187+
188+ We follow [ Google's Python Style Guide] ( https://google.github.io/styleguide/pyguide.html )
189+ for writing docstrings. Make sure your docstrings adhere to this style
190+ guide.
191+
192+ The process for converting to a standard docstring format style is
193+ ongoing. If you see a docstring in the code base that doesn't adhere
194+ to this formatting style and you'd like to contribute a fix, feel free
195+ to open a PR to correct the docstring formatting.
196+
197+ ###### Code Style
198+
199+ We use [ pylint] ( https://pypi.org/project/pylint/ ) ,
200+ [ black] ( https://black.readthedocs.io/en/stable/the_black_code_style/index.html ) ,
201+ and [ ruff] ( https://github.com/astral-sh/ruff ) in our CI via
202+ pre-commit Git hooks. If your code passes the CI checks, it's
203+ formatted correctly.
204+
205+ To validate that your local versions of the above libraries
206+ match those in the mlflow CI, refer to [ lint-requirements.txt] ( https://github.com/mlflow/mlflow/blob/master/requirements/lint-requirements.txt ) .
207+ You can compare these versions with your local using pip:
208+
209+ ``` bash
210+ pip show pylint
211+ ```
212+
183213## Setting up the repository
184214
185215To set up the MLflow repository, run the following commands:
0 commit comments