diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 20bf915..ac76b77 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -77,6 +77,7 @@ Here's how to set up `snappass` for local development. $ mkvirtualenv snappass $ cd snappass/ $ python setup.py develop + $ pip install -r dev-requirements.txt 4. Create a branch for local development:: @@ -84,25 +85,35 @@ Here's how to set up `snappass` for local development. Now you can make your changes locally. -5. When you're done making changes, check that your changes pass the tests and +5. You can test your changes in a development server with debug and autoreload:: + + $ docker run -d --name redis-server -p 6379:6379 redis + $ export FLASK_DEBUG=1 && \ + export FLASK_APP=snappass.main && \ + export NO_SSL=True + $ flask run + + You now have a running instance on localhost:5000/ + +6. When you're done making changes, check that your changes pass the tests and flake8:: - $ flake8 snappass tests + $ flake8 snappass tests.py setup.py $ tox -6. Commit your changes and push your branch to GitHub:: +7. Commit your changes and push your branch to GitHub:: $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature -7. Check that the test coverage hasn't dropped:: +8. Check that the test coverage hasn't dropped:: - coverage run --source snappass setup.py tests - coverage report -m - coverage html + $ coverage run --source snappass tests.py + $ coverage report -m + $ coverage html -8. Submit a pull request through the GitHub website. +9. Submit a pull request through the GitHub website. Pull Request Guidelines ----------------------- diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..908833f --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,3 @@ +coverage==4.2 +flake8==3.0.4 +tox==2.3.1 diff --git a/requirements.txt b/requirements.txt index 222c1be..2de30ad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Flask==0.10.1 +Flask==0.11.1 Jinja2==2.7.1 MarkupSafe==0.18 Werkzeug==0.9.4 diff --git a/setup.py b/setup.py index 562b643..0bf1581 100644 --- a/setup.py +++ b/setup.py @@ -36,4 +36,3 @@ setup( ], zip_safe=False, ) -