Use Pylint to check for some types of errors.
python -m pip install -r requirements-dev.txt
./lint
To disable warnings, use:
./lint --disable=W
Use Black to format code.
python -m pip install -r requirements-dev.txt
black gnomad
See instructions in docs/README.md.
https://packaging.python.org/guides/distributing-packages-using-setuptools/#packaging-your-project
-
Install tools.
python -m pip install --upgrade setuptools wheel twine
-
Make sure that the changelog is up to date.
To see changes since the last release, use:
LAST_RELEASE_TAG=$(git tag --list --sort=-committerdate | head -n1) git log $LAST_RELEASE_TAG..
-
Update version in setup.py, replace "unreleased" heading in changelog with the version number, and commit. The new version number should be based on changes since the last release.
-
Tag the release in git.
git tag v<version> git push origin v<version>
-
Remove any old builds.
rm -r ./dist
-
Build source distribution and wheel.
python setup.py sdist bdist_wheel
-
Upload using twine.
twine upload dist/*