Hi! Thanks so much for wanting to contribute.
There's a few extra steps to set up for development.
To install in development mode from source, download the source code, then run this:
python setup.py develop
To do development work, you'll need a few more libraries:
pip install -r requirements-dev.txt pip install -r requirements-contrib.txt
Make sure you have the development libraries installed, then run:
py.test tests
Make sure you have the development libraries installed, then do:
cd docs make html
The generated documentation will be in docs/_build/html/
.
The code follows PEP8 with the following exceptions:
- Indentation is 2 spaces (no tabs)
- Line length: use your best judgment. (We all have big monitors now, no need to limit to 80 columns.)
Your code should pass flake8 unless readability is hurt. Configuration is in setup.cfg
.
Your code should be compatible with Python 2.6, 2.7, and 3.3+, and Flask 0.8+. Travis CI will test all that for you automatically.
Submitted code should have tests covering the code submitted, and your code should pass the travis build.
If possible, use the fixtures in test/fixtures.py - there's a sample app with all the functionality that you can use to test on.
If you store your flags somewhere other than the config file, and want to share your code with others, fantastic!
Here's a couple guidelines:
- Contrib code goes in
flask_featureflags/contrib
- Tests for contrib modules go in
tests/contrib
- Add a description and a quick example of how to use your module in
docs/contrib.rst
- If your code has any package requirements, please put them in
requirements-contrib.txt
Thanks for contributing!