Here are some guidelines for contributing to endpoints-management-python.
- Please sign one of the Contributor License Agreements below.
- File an issue to notify the maintainers about what you're working on.
- Fork the repo; develop and test your code changes; add docs.
- Make sure that your commit messages clearly describe the changes.
- Make the pull request.
Use the issue tracker to start the discussion. It is possible that someone else is already working on your idea, your approach is not quite right, or that the functionality exists already. The ticket you file in the issue tracker will be used to hash that all out.
We will use GitHub's mechanism for forking repositories and making pull requests. Fork the repository, and make your changes in the forked repository.
Be sure to add relevant tests and run then them using tox
before making the pull request.
Docs will be updated automatically when we merge to master, but
you should also build the docs yourself via tox -e docs
, making sure that the docs build OK
and that they are readable.
Once you have made all your changes, tested, and updated the documentation, make a pull request to move everything back into the main endpoints-management-python repository. Be sure to reference the original issue in the pull request. Expect some back-and-forth with regards to style and compliance of these rules.
You’ll have to create a development environment to hack on endpoints-management-python, using a Git checkout:
- While logged into your GitHub account, navigate to the endpoints-management-python repo on GitHub.
- Fork and clone the endpoints-management-python repository to your GitHub account by clicking the "Fork" button.
- Clone your fork of endpoints-management-python from your GitHub account to your local computer, substituting your account username and specifying the destination as hack-on-endpoints-management-python. For example:
cd ${HOME} git clone [email protected]:USERNAME/endpoints-management-python.git hack-on-endpoints-management-python cd hack-on-endpoints-management-python # Configure remotes such that you can pull changes from the endpoints-management-python # repository into your local repository. git remote add upstream https://github.com:google/endpoints-management-python # fetch and merge changes from upstream into master git fetch upstream git merge upstream/master
Now your local repo is set up such that you will push changes to your GitHub repo, from which you can submit a pull request.
- Create use tox to create development virtualenv in which endpoints-management-python is installed:
sudo pip install tox cd ~/hack-on-endpoints-management-python tox -e devenv
- This is creates a tox virtualenv named development that has endpoints-management-python installed. Activate it to use endpoints-management-python locally, e.g, from the python prompt.
cd ~/hack-on-endpoints-management-python . ./tox/develop/bin/activate
- To run the full set of endpoints-management-python tests on all platforms, install
tox into a system Python. The
tox
console script will be installed into the scripts location for that Python. While in the endpoints-management-python checkout root directory (it containstox.ini
), invoke the tox console script. This will read thetox.ini
file and execute the tests on multiple Python versions and platforms; while it runs, it creates a virtualenv for each version/platform combination.
sudo pip install tox cd ~/hack-on-endpoints-management-python tox
Before we can accept your pull requests you'll need to sign a Contributor License Agreement (CLA):
- If you are an individual writing original source code and you own the intellectual property, then you'll need to sign an individual CLA.
- If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA.
You can sign these electronically (just scroll to the bottom). After that, we'll be able to accept your pull requests.