Insert project description here
Project description
Manipulate semantic versioning (SemVer)
Manipulate semantic version numbers. Currently, it only allows for the “0.0.0” format and should be expanded to allow for the rest of the specification as well. See also https://semver.org/
Installation
To install the latest release on PyPI, simply run:
$ pip install semverit
Example 1
>>> import semverit
>>> svit = semverit.SemVerIt()
>>> print("{} - Initialize".format(svit.version))
>>> print("{} -> {} - Bump patch version".format(svit.version, svit.bump_patch()))
>>> print("{} -> {} - Bump minor version".format(svit.version, svit.bump_min()))
>>> print("{} -> {} - Bump minor version again".format(svit.version, svit.bump_min()))
>>> print("{} -> {} - Bump patch version".format(svit.version, svit.bump_patch()))
>>> print("{} -> {} - Bump major version".format(svit.version, svit.bump_maj()))
Example 2
>>> import semverit.semverit
>>> print("{} - Initialize".format(svit.version))
>>> print("{} -> {} - Bump patch version".format(svit.version, svit.bump_patch()))
>>> print("{} -> {} - Bump minor version".format(svit.version, svit.bump_min()))
>>> print("{} -> {} - Bump minor version again".format(svit.version, svit.bump_min()))
>>> print("{} -> {} - Bump patch version".format(svit.version, svit.bump_patch()))
>>> print("{} -> {} - Bump major version".format(svit.version, svit.bump_maj()))
Example 3
>>> import semverit
>>> import tempfile
>>> _setup_py_contents = """import setuptools
setuptools.setup(
name="SemVerIt",
version="2.3.4",
author="Hendrik du Toit",
author_email="hendrik@brightedge.co.za",
description="Project description",
long_description="Project long description",
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Topic :: Software Development",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
],
)
"""
>>> working_dir = tempfile.mkdtemp()
>>> setup_py_pth = working_dir / "setup.py"
>>> setup_py_pth.write_text(_setup_py_contents)
>>> svit = semverit.SemVerIt(p_setup_py_pth=setup_pth)
>>> print("{} - Initialize".format(svit.version))
>>> print("{} -> {} - Bump patch version".format(svit.version,svit.bump_patch()))
>>> print("{} -> {} - Bump minor version".format(svit.version,svit.bump_min()))
>>> print("{} -> {} - Bump minor version again".format(svit.version, svit.bump_min()))
>>> print("{} -> {} - Bump patch version".format(svit.version, svit.bump_patch()))
>>> print("{} -> {} - Bump major version".format(svit.version, svit.bump_maj()))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
SemVerIt-0.0.1.tar.gz
(5.7 kB
view hashes)