From da3be4e5c3f56c964003eb0ecbfe67e8a9da2aa2 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Thu, 25 Aug 2016 15:20:11 -0700 Subject: [PATCH 1/2] Add style guide information to CONTRIBUTING.md. Rather than use https://github.com/GoogleCloudPlatform/Template/wiki/style.html I want to have that page link to the appropriate repos. --- CONTRIBUTING.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd004ed073d..ab3dda08edf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,13 +27,23 @@ be able to accept your pull requests. Contributor License Agreement (see details above). 1. Fork the desired repo, develop and test your code changes. 1. Ensure that your code adheres to the existing style in the sample to which - you are contributing. Refer to the - [Google Cloud Platform Samples Style Guide] - (https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the - recommended coding standards for this organization. + you are contributing. 1. Ensure that your code has an appropriate set of unit tests which all pass. 1. Submit a pull request. +## Style + +Samples in this repository follow the [Google Python Style +Guide](https://google.github.io/styleguide/pyguide.html). This is enforced using +the [flake8](https://pypi.python.org/pypi/flake8) tool. + +To use the same flake8 configuration as is used in the automated test suite, +install [nox](https://nox.readthedocs.io/en/latest/) and run + +```shell +nox -s lint -- path/to/sample +``` + ## Testing See [TESTING.md](TESTING.md). From 8203faec6d96d9762b30d5bd2c0890e8130a7f7c Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Thu, 25 Aug 2016 15:56:14 -0700 Subject: [PATCH 2/2] Add PEP 8 back in. --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab3dda08edf..0843d2fe925 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,8 @@ be able to accept your pull requests. ## Style -Samples in this repository follow the [Google Python Style +Samples in this repository follow [PEP +8](https://www.python.org/dev/peps/pep-0008/) and the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html). This is enforced using the [flake8](https://pypi.python.org/pypi/flake8) tool.