blob: cc27c5ac72284f7f1a60300a8542dfcaaf59f7e5 [file] [log] [blame]
Sam Clegg856f7fd2015-04-27 11:20:11 -07001Running YAPF on itself
2----------------------
3
Eli Benderskyef5a7a52015-04-28 06:11:50 -07004To run YAPF on all of YAPF::
Sam Clegg856f7fd2015-04-27 11:20:11 -07005
6 $ PYTHONPATH=$PWD/yapf python -m yapf -i -r .
7
delirious-lettuceb795f6d2018-01-16 20:38:46 -07008To run YAPF on just the files changed in the current git branch::
Sam Clegg856f7fd2015-04-27 11:20:11 -07009
10 $ PYTHONPATH=$PWD/yapf python -m yapf -i $(git diff --name-only @{upstream})
11
Eli Bendersky309bcd42015-04-06 20:33:15 -070012Releasing a new version
13-----------------------
14
15* Run tests: python setup.py test
Bill Wendlingc873f372018-03-18 20:42:05 -070016 [don't forget to run with Python 2.7 and 3.6]
Eli Bendersky309bcd42015-04-06 20:33:15 -070017
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 Wendling4d9b9052017-10-14 15:02:31 -070024* Build release: python setup.py sdist bdist_wheel
25
26* Push to PyPI: twine upload dist/*
Eli Bendersky309bcd42015-04-06 20:33:15 -070027
Eli Bendersky78adc492015-04-09 05:28:26 -070028* Test in a clean virtualenv that 'pip install yapf' works with the new version
29
Eli Bendersky309bcd42015-04-06 20:33:15 -070030* Commit the version bump; add tag with git tag v<VERSION_NUM>; git push --tags
31
Andy Hayden3078f722015-04-14 18:03:24 -070032TODO: discuss how to use tox to make virtualenv testing easier.