Sam Clegg | 856f7fd | 2015-04-27 11:20:11 -0700 | [diff] [blame] | 1 | Running YAPF on itself |
| 2 | ---------------------- |
| 3 | |
Eli Bendersky | ef5a7a5 | 2015-04-28 06:11:50 -0700 | [diff] [blame] | 4 | To run YAPF on all of YAPF:: |
Sam Clegg | 856f7fd | 2015-04-27 11:20:11 -0700 | [diff] [blame] | 5 | |
| 6 | $ PYTHONPATH=$PWD/yapf python -m yapf -i -r . |
| 7 | |
delirious-lettuce | b795f6d | 2018-01-16 20:38:46 -0700 | [diff] [blame] | 8 | To run YAPF on just the files changed in the current git branch:: |
Sam Clegg | 856f7fd | 2015-04-27 11:20:11 -0700 | [diff] [blame] | 9 | |
| 10 | $ PYTHONPATH=$PWD/yapf python -m yapf -i $(git diff --name-only @{upstream}) |
| 11 | |
Eli Bendersky | 309bcd4 | 2015-04-06 20:33:15 -0700 | [diff] [blame] | 12 | Releasing a new version |
| 13 | ----------------------- |
| 14 | |
| 15 | * Run tests: python setup.py test |
Bill Wendling | c873f37 | 2018-03-18 20:42:05 -0700 | [diff] [blame] | 16 | [don't forget to run with Python 2.7 and 3.6] |
Eli Bendersky | 309bcd4 | 2015-04-06 20:33:15 -0700 | [diff] [blame] | 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 | |
Bill Wendling | 4d9b905 | 2017-10-14 15:02:31 -0700 | [diff] [blame] | 24 | * Build release: python setup.py sdist bdist_wheel |
| 25 | |
| 26 | * Push to PyPI: twine upload dist/* |
Eli Bendersky | 309bcd4 | 2015-04-06 20:33:15 -0700 | [diff] [blame] | 27 | |
Eli Bendersky | 78adc49 | 2015-04-09 05:28:26 -0700 | [diff] [blame] | 28 | * Test in a clean virtualenv that 'pip install yapf' works with the new version |
| 29 | |
Eli Bendersky | 309bcd4 | 2015-04-06 20:33:15 -0700 | [diff] [blame] | 30 | * Commit the version bump; add tag with git tag v<VERSION_NUM>; git push --tags |
| 31 | |
Andy Hayden | 3078f72 | 2015-04-14 18:03:24 -0700 | [diff] [blame] | 32 | TODO: discuss how to use tox to make virtualenv testing easier. |