If you are reading this, then you might be thinking about contributing some changes. Thank you!
The first step is to fork this repository and create a branch to hold your work. This project uses Github Pull Requests to manage contributions so you are required to have a Github account and create a personal fork of this repository. Once you have an account, a fork, and a branch, it is time to start coding. The following sections explain the common development tasks.
I do have a few expectations about pull requests:
- 100% test coverage is maintained with minimal mock usage
- all functionality is documented using sphinx
- code is formatted using yapf before being committed -- this applies to each and every commit
Do not let this scare you off. I'll help you out if you run into problems testing or documenting. Submit the PR and we can work through the finer details.
Setting up your environment
$ python -mvenv env $ ./env/bin/pip install -qe '.[dev]' $ cp ci/git-pre-commit .git/hooks/pre-commit $ chmod u+x .git/hooks/pre-commit
Locally running tests without starting the integration depedencies does not cover all of the library source code as shown in the following snippets. See Integration testing below for full test coverage.
The integration tests require that you have some additional services running. This project runs the dependencies using docker so you will need access to a docker host. You can install docker from hub.docker.com for the majority of operating systems. Once docker is installed, running the integrated tests is simple.
Checking code style
(env) $ yapf -dpr klempner setup.py tests (env) $ flake8
(env) $ ./setup.py build_sphinx
The output is in build/sphinx/html/index.html.