1 Running YAPF on itself 2 ---------------------- 3 4 To run YAPF on all of YAPF:: 5 6 $ PYTHONPATH=$PWD/yapf python -m yapf -i -r . 7 8 To run YAPF on just the files changed in the current git branch:: 9 10 $ PYTHONPATH=$PWD/yapf python -m yapf -i $(git diff --name-only @{upstream}) 11 12 Releasing a new version 13 ----------------------- 14 15 * Run tests: python setup.py test 16 [don't forget to run with Python 2.7 and 3.6] 17 18 * Bump version in yapf/__init__.py 19 20 * Build source distribution: python setup.py sdist 21 22 * Check it looks OK, install it onto a virtualenv, run tests, run yapf as a tool 23 24 * Build release: python setup.py sdist bdist_wheel 25 26 * Push to PyPI: twine upload dist/* 27 28 * Test in a clean virtualenv that 'pip install yapf' works with the new version 29 30 * Commit the version bump; add tag with git tag v<VERSION_NUM>; git push --tags 31 32 TODO: discuss how to use tox to make virtualenv testing easier. 33