blob: d06937f7167a36afa52425132453bc36b8af439d [file] [log] [blame] [view]
# 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 <https://cla.developers.google.com/> 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] for more
information on using pull requests.
[GitHub Help]: https://help.github.com/articles/about-pull-requests/
## Generated files
Some checked-in files are generated and need to be updated when a new PR is
merged.
### Documentation
To regenerate the content under the `docs/` directory, run this script in the
repository root:
```shell
./update_docs.sh
```
This needs to be done whenever the docstrings in the corresponding .bzl files
are changed; see `docs/BUILD`.
### Precompiled tools
The packaging rules depend on two precompiled binaries, `tools/piptool.par` and
`tools/whltool.par`. We need these to be precompiled because they are invoked
during `WORKSPACE` evaluation, before Bazel itself is able to build anything
from source. The .par files can be regenerated by running this script in the
repository root:
```shell
# You can pass --nodocker if Docker is not available on your system.
./update_tools.sh
```
This needs to be done whenever the corresponding sources in the `packaging/`
directory are updated.
Since these are binary files and therefore unreviewable, for security
reasons<sup>1</sup> we will regenerate the .par files for you when merging your
pull request.
<sup>1</sup> See "[Reflections on Trusting Trust](https://en.wikipedia.org/wiki/Backdoor_(computing)#Compiler_backdoors)".