We welcome contributions of all sizes. You got this!
- Check out the issue tracker and pick out a task or create a new issue
- Leave a comment on the ticket so that others know you're working on it.
- Fork the project on Github.
- Install a development version of the code with:
mkvirtualenv elex-dev
pip install -e git+git@github.com:<YOUR_GITHUB_USER>/elex#egg=elex``
- Install developer dependencies for tests and docs:
pip install -r requirements-dev.txt
Now you can run the following commands when you want to activate your enviroment and cd to the source directory.
workon elex-dev
cd ${VIRTUAL_ENV}/src/elex
Edit or write the code or docs, taking care to include well=crafted docstrings and generally following the format of the existing code.
Write tests for any new features you add. Add to the tests in the tests
directory or follow the format of files like tests/test_election.py
.
Make sure all tests are passing in your environment by running the nose2 tests.
nose2 tests
If you have Python 2.7, 3.5, and pypy installed, run can run tox
to test in multiple environments.
Write documentation by adding to one of the files in docs
or adding your own.
To build a local preview, run:
make -C docs html
The documentation is built in docs/_build/html
. Use Python's simple HTTP server to view it.
cd docs/_build/html
python -m http.server
Python 2.7 users should use SimpleHTTPServer
instead of http.server
.
Submit a pull request on Github.
To get detailed information about performance, run the tests with the --profile flag:
nose2 tests --profile
You can test the API request limit, but only by setting an environment variable. Use with extreme care.
AP_RUN_QUOTA_TEST=1 nose2 tests.test_ap_quota