Thanks for your interest to contribute! Here's a quick guide.
- Make sure you have a GitHub account
- Submit a ticket for your issue, assuming one does not already exist.
- Clearly describe the issue including steps to reproduce when it is a bug.
- Make sure you fill in the earliest version that you know has the issue.
- Fork, then clone the repo
git clone [email protected]:your-username/html2hamlpy.git
- Install pyenv
- Install pyenv-virtualenv
$ pyenv install 2.7.8
$ pyenv virtualenv 2.7.8 my-virtual-env-2.7.8
$ pyenv activate my-virtual-env-2.7.8
pip install -r requirements.txt
Make sure the tests pass:
nosetests html2hamlpy
To run a individual file run:
nosetests /path/to/file
To insert a breakpoint import set_trace
from nose.tools import set_trace; set_trace()
Then run nosetests with the -s
option to allow stdout output and --pdb
to enter the debugger on failures or errors.
nosetests html2hamlpy/tests/test_django.py --pdb -s
http://stackoverflow.com/a/7493906/1123985 http://nose.readthedocs.org/en/latest/plugins/debug.html http://nose.readthedocs.org/en/latest/usage.html
$ pip install coverage
$ nosetests html2hamlpy --with-coverage --cover-package=html2hamlpy --cover-html
$ open cover/index.html
- Create a topic branch from where you want to base your work.
- This is usually the master branch.
- Only target release branches if you are certain your fix must be on that branch.
- To quickly create a topic branch based on master;
git checkout -b fix/master/my_contribution master
. Please avoid working directly on themaster
branch.
- Make commits of logical units.
- Make your change. Add tests for your change. Make the tests pass:
nosetests
- Check for unnecessary whitespace with
git diff --check
before committing. - Write tests.
- Write a good commit message.
- Push to your fork and submit a pull request.