blob: 8af7af6b426ad2315cac09e24247b36fa6f75b00 [file] [log] [blame]
Dmitry Frenkel63f97f32020-07-09 10:14:02 -07001How to Contribute
2=================
3
4We'd love to accept your patches and contributions to this project.
5There are a few guidelines described in our
6`Contribution Guide <http://google.github.io/google-api-python-client/contributing.html>`__
7that you need to follow.
8
9To summarize here: when contributing, please:
10
11* Sign Contributor License Agreement
12* Before making changes, file an issue
13* Fork this repository and use github pull requests for all submissions
14* Follow
15 `Contributor Code of Conduct
Anthonios Parthenioue9a5d082021-08-25 12:30:26 -040016 <https://github.com/googleapis/google-api-python-client/blob/main/CODE_OF_CONDUCT.md>`__
Dmitry Frenkel63f97f32020-07-09 10:14:02 -070017 and `Community Guidelines <https://opensource.google/conduct/>`__
18* Follow `Google Python Style Guide <https://google.github.io/styleguide/pyguide.html>`__
19 and `this commit authoring style <http://chris.beams.io/posts/git-commit/#seven-rules>`__
20* Don't forget to write tests and update documentation!
21
22Setup Notes
23-----------
24
25Please follow these steps after forking and cloning the repository
26to make sure you can modify code and run tests with confidence::
27
28 # From the root dir of the cloned repository:
29 # Create Virtual Environment called env (you may choose your own name)
30 python3 -m venv env
31
32 # Activate virtual environment
33 source env/bin/activate
34
35 # Install this library as editable install
36 # (see https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-e)
37 python3 -m pip install -e .
38
39 # Install nox
40 python3 -m pip install nox
41
42We use `nox <https://nox.thea.codes/>`__ to instrument our tests.
43To test your changes, run unit tests with ``nox``::
44
45 # Run tests for all supported versions of Python and oauth2client:
46 nox
47 # Run tests for Python 3.7:
48 nox -s unit-3.7
49 # Run lint
50 nox -s lint
51
52
53.. note::
54
55 The unit tests and system tests are described in the
56 ``noxfile.py`` file in this directory. Nox will automatically
57 handle constriction of new virtual environments and installation
58 of the required test dependencies.
59
60For more information about Nox, including command-line usage, consult
61`nox documentation <https://nox.thea.codes/>`__.