kubeflow / pipelines

Machine Learning Pipelines for Kubeflow
https://www.kubeflow.org/docs/components/pipelines/
Apache License 2.0
3.53k stars 1.59k forks source link

[SDK] Standardize code style using YAPF and docformatter. #6500

Closed chensun closed 4 months ago

chensun commented 2 years ago

Currently, the KFP SDK code isn’t formatted consistently. One noticeable inconsistency is that some files have 2-space indentation (conforms to Google internal style) while others have 4-space indentation (conforms to PEP8 and Google Python Style Guide). To have a clean, consistent code base, we should pick a formatting style and stick with it.

Based some evaluation of both Google's internal style and the public Google Python Style Guide, we decided on the following YAPF configuration:

[style]
based_on_style = yapf
indent_width = 4
split_before_named_assigns = true
column_limit = 80

The new style config only applies to KFP SDK code. While for components, component authors can pick their own style.

/area sdk

/cc @neuromage @ji-yaqi /cc @IronPan @SinaChavoshi /cc @Bobgy

chensun commented 2 years ago

Tracking action items:

neuromage commented 2 years ago

/lgtm

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

rimolive commented 4 months ago

Closing this issue. No activity for more than a year.

/close

google-oss-prow[bot] commented 4 months ago

@rimolive: Closing this issue.

In response to [this](https://github.com/kubeflow/pipelines/issues/6500#issuecomment-2021376045): >Closing this issue. No activity for more than a year. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.