Package: py_release_tools
This code is licensed under the MIT license.This is a suite of tools that are useful for releasing Python code for public
or private use. There are setuptools extensions to validate various conventions
and to perform release activities.Installation and UsageThis package is generally not installed directly but instead listed in thesetup_requiresoption of the setuptoolssetupfunction. For example:from setuptools import setup

setup(
    name="my_clever_package",
    version="1.0.0",
    setup_requires=[
        "py_release_tools",
    ]
)Commands are exported as distuils commands and should be automatically
available provided the package is installed. The tool provides the commands
documented below and are generally run by defining areleasealiasin the project’ssetup.cfgfile. The author’s typical projectsetup.cfgcontains these aliases:[aliases]
validate = cover_tests pep8
release = validate increment_semver git_push sdist upload
release_major = validate increment_semver -M git_push sdist upload
release_minor = validate increment_semver -m git_push sdist uploadCommandsincrement_semverThis command will update thesetup.pyfile version number following the
rules ofSemantic Versioning (semver). This command will
re-write and commit the project’ssetup.pyfile. It assumes that the
version line is formatted as such, with some amount of leading whitespace:version="1.20.1"It will rewrite all lines that look like this in the file.The version format is:MAJOR.MINOR.PATCHFor more information check out the semver docs.Version generation increments a version component by one. By default a patch
version is generated. Passing the-mor--minorflags to the command
will increment the minor version and set the patch version to zero. Passing-Mor--majorwill increment the major version and set both the minor
and patch versions to zero.This command will also create a tag in the git repository of formatrelease-{semver}.git_pushThis command runs agit pushcommand to push themasterbranch to the
remoteorigin. The command will also push tags. If your git repository
doesn’t use these naming conventions the command will fail.cover_testsThis command will setup pythoncoveragemonitoring and invoke the
setuptoolstesttarget. Coverage data will be written to.coveragein
the same directory as thesetup.pyfile.This command will also generate a Cobertura coverage report ascoverage.xmland an HTML report in thehtmlcovfolder.Failure of the tests will cause a failure of the build so it is suitable to use
this command as a replacement for the builtintestcommand. This command
also suppresses the system exit that the builtintestcommand generates so
other commands can be chained after this one.pep8This command will run aPEP8code style validation on all Python files in the project, including the
setup.py file.ContributingIf you would like to contribute to Pydora please visit the project’sGitHub pageand open a pull
request with your changes. To have the best experience contributing, please:Don’t break backwards compatibility of public interfacesWrite tests for your new feature/bug fixEnsure that existing tests passUpdate the readme/docstrings, if necessaryFollow the coding style of the current code-baseEnsure that your code is PEP8 compliantValidate that your changes work with Python 2.7+ and 3.xAll code is reviewed before acceptance and changes may be requested to better
follow the conventions of the existing API.he build system runspython setup.py validateon all supported Python
versions. You can, and should, run this on your pull request before submitting.