You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
888 B

Running YAPF on itself
To run YAPF on all of YAPF::
$ PYTHONPATH=$PWD/yapf python -m yapf -i -r .
To run YAPF on just the files changed in the current git branch::
$ PYTHONPATH=$PWD/yapf python -m yapf -i $(git diff --name-only @{upstream})
Releasing a new version
* Run tests: python test
[don't forget to run with Python 2.7 and 3.6]
* Bump version in yapf/
* Build source distribution: python sdist
* Check it looks OK, install it onto a virtualenv, run tests, run yapf as a tool
* Build release: python sdist bdist_wheel
* Push to PyPI: twine upload dist/*
* Test in a clean virtualenv that 'pip install yapf' works with the new version
* Commit the version bump; add tag with git tag v<VERSION_NUM>; git push --tags
TODO: discuss how to use tox to make virtualenv testing easier.