Merge pull request #27 from samueldg/improve-dev-setup

Improve development setup
This commit is contained in:
Nicholas Charriere 2016-08-28 07:17:34 -07:00 committed by GitHub
commit 2e8d45e691
4 changed files with 23 additions and 10 deletions

View file

@ -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
-----------------------

3
dev-requirements.txt Normal file
View file

@ -0,0 +1,3 @@
coverage==4.2
flake8==3.0.4
tox==2.3.1

View file

@ -1,4 +1,4 @@
Flask==0.10.1
Flask==0.11.1
Jinja2==2.7.1
MarkupSafe==0.18
Werkzeug==0.9.4

View file

@ -36,4 +36,3 @@ setup(
],
zip_safe=False,
)