Skip to main content

Insert project description here

Project description

PyPI - Status PyPI - Wheel PyPI - Python Version GitHub release (latest by date) License GitHub issues PyPI - Downloads GitHub Searches CodeCov GitHub Actions - Pre-Commit GitHub Actions - CI PyPi

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

>>> svit = semverit.SemVerIt(p_version="3.2.1")
>>> 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


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.3.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

SemVerIt-0.0.3-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page