Merge pull request #27 from samueldg/improve-dev-setup
Improve development setup
This commit is contained in:
commit
2e8d45e691
4 changed files with 23 additions and 10 deletions
|
@ -77,6 +77,7 @@ Here's how to set up `snappass` for local development.
|
||||||
$ mkvirtualenv snappass
|
$ mkvirtualenv snappass
|
||||||
$ cd snappass/
|
$ cd snappass/
|
||||||
$ python setup.py develop
|
$ python setup.py develop
|
||||||
|
$ pip install -r dev-requirements.txt
|
||||||
|
|
||||||
4. Create a branch for local development::
|
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.
|
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::
|
||||||
|
|
||||||
$ flake8 snappass tests
|
$ flake8 snappass tests.py setup.py
|
||||||
$ tox
|
$ tox
|
||||||
|
|
||||||
6. Commit your changes and push your branch to GitHub::
|
7. Commit your changes and push your branch to GitHub::
|
||||||
|
|
||||||
$ git add .
|
$ git add .
|
||||||
$ git commit -m "Your detailed description of your changes."
|
$ git commit -m "Your detailed description of your changes."
|
||||||
$ git push origin name-of-your-bugfix-or-feature
|
$ 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 run --source snappass tests.py
|
||||||
coverage report -m
|
$ coverage report -m
|
||||||
coverage html
|
$ coverage html
|
||||||
|
|
||||||
8. Submit a pull request through the GitHub website.
|
9. Submit a pull request through the GitHub website.
|
||||||
|
|
||||||
Pull Request Guidelines
|
Pull Request Guidelines
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
3
dev-requirements.txt
Normal file
3
dev-requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
coverage==4.2
|
||||||
|
flake8==3.0.4
|
||||||
|
tox==2.3.1
|
|
@ -1,4 +1,4 @@
|
||||||
Flask==0.10.1
|
Flask==0.11.1
|
||||||
Jinja2==2.7.1
|
Jinja2==2.7.1
|
||||||
MarkupSafe==0.18
|
MarkupSafe==0.18
|
||||||
Werkzeug==0.9.4
|
Werkzeug==0.9.4
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -36,4 +36,3 @@ setup(
|
||||||
],
|
],
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue