diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 939e5341e74..00000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,28 +0,0 @@ -# How to Contribute - -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution; -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - -## Code reviews - -All submissions, including submissions by project members, require review. We -use GitHub pull requests for this purpose. Consult -[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more -information on using pull requests. - -## Community Guidelines - -This project follows [Google's Open Source Community -Guidelines](https://opensource.google.com/conduct/). diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 00000000000..f868b861941 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,61 @@ +How to Contribute +================= + +We'd love to accept your patches and contributions to this project. +There are a few guidelines described in our +`Contribution Guide `__ +that you need to follow. + +To summarize here: when contributing, please: + +* Sign Contributor License Agreement +* Before making changes, file an issue +* Fork this repository and use github pull requests for all submissions +* Follow + `Contributor Code of Conduct + `__ + and `Community Guidelines `__ +* Follow `Google Python Style Guide `__ + and `this commit authoring style `__ +* Don't forget to write tests and update documentation! + +Setup Notes +----------- + +Please follow these steps after forking and cloning the repository +to make sure you can modify code and run tests with confidence:: + + # From the root dir of the cloned repository: + # Create Virtual Environment called env (you may choose your own name) + python3 -m venv env + + # Activate virtual environment + source env/bin/activate + + # Install this library as editable install + # (see https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-e) + python3 -m pip install -e . + + # Install nox + python3 -m pip install nox + +We use `nox `__ to instrument our tests. +To test your changes, run unit tests with ``nox``:: + + # Run tests for all supported versions of Python and oauth2client: + nox + # Run tests for Python 3.7: + nox -s unit-3.7 + # Run lint + nox -s lint + + +.. note:: + + The unit tests and system tests are described in the + ``noxfile.py`` file in this directory. Nox will automatically + handle constriction of new virtual environments and installation + of the required test dependencies. + +For more information about Nox, including command-line usage, consult +`nox documentation `__. diff --git a/README.md b/README.md index d1d7d3a618d..0fae27dad95 100644 --- a/README.md +++ b/README.md @@ -66,4 +66,6 @@ For development you will also need the following libraries: ## Contributing -Please see the [contributing page](http://google.github.io/google-api-python-client/contributing.html) for more information. In particular, we love pull requests - but please make sure to sign the contributor license agreement. +Please see our [Contribution Guide](CONTRIBUTING.rst). +In particular, we love pull requests - but please make sure to sign +the contributor license agreement.