Skip to main content

semvermamager implements a restricted subset of the SEMVER standard

Project description

semvermanager

semvermamager exports a single class Version which implements a restricted subset of the SEMVER standard.

Version defines a Semantic version using the following field structure:

    # MAJOR.MINOR.PATCH-TAG

    int MAJOR  # 0->N
    int MINOR  # 0->N
    int PATCH  # 0-N
    str TAG    # one of "alpha", "beta". 
    int TAG_VERSION # a version number appended to alpha or beta. 

Versions may be bumped by a single increment using any of the bump functions. Bumping a PATCH value simply increments it. Bumping a MINOR value zeros the PATCH value and bumping a MAJOR zeros the MINOR and the PATCH value.

semvermanager only supports Python 3.6 and greater.

semvermgr script

The package includes a command line script for generating versions.

$ semvermgr -h
usage: semvermgr.py [-h] [--version VERSION] [--make]
                    [--bump {major,minor,patch,tag,tag_version}]
                    [--getversion] [--bareversion] [--overwrite] [--update]
                    [--label LABEL] [--separator SEPARATOR]
                    [filenames [filenames ...]]

positional arguments:
  filenames             Files to use as version file

optional arguments:
  -h, --help            show this help message and exit
  --version VERSION     Specify a version in the form major.minor.patch-tag
  --make                Make a new version file
  --bump {major,minor,patch,tag,tag_version}
                        Bump a version field
  --getversion          Report the current version in the specified file
  --bareversion         Return the unquoted version strin with VERSION=
  --overwrite           overwrite files without checking [default: False]
  --update              Update multiple version strings in file
  --label LABEL         field used to determine which line is the version line
                        [default: VERSION]
  --separator SEPARATOR
                        Character used to separate the version label from the
                        version [default: =]

Installation

    $  pip3 install semvermanager

Docs

Full docs are on readthedocs.io.

Source code

Can be found on github.com

Author: jdrumgoole on GitHub

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

semvermanager-0.0.4a9.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semvermanager-0.0.4a9-py2.py3-none-any.whl (16.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file semvermanager-0.0.4a9.tar.gz.

File metadata

  • Download URL: semvermanager-0.0.4a9.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.5

File hashes

Hashes for semvermanager-0.0.4a9.tar.gz
Algorithm Hash digest
SHA256 86e1837effbf32ffb678e77e0115f77a31b775436f185ea4b04ee66f8b816c32
MD5 54e363e808ffb134a1d8cc6d1b809c64
BLAKE2b-256 d0f352653572384b51d094cbf5d0e62c7024f0666c8d0a381d20b41efc27d153

See more details on using hashes here.

File details

Details for the file semvermanager-0.0.4a9-py2.py3-none-any.whl.

File metadata

  • Download URL: semvermanager-0.0.4a9-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.5

File hashes

Hashes for semvermanager-0.0.4a9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fa6dd640d78ef47f810f2be60a0866dcd59a9c89918956ce223e60c77dd7bc0f
MD5 be53b9311dd01011243b0f7b8017d5ce
BLAKE2b-256 6e9a3607803eb0144da706655ffbd25a9d3e7803abc681165ef411dd3b5c1e02

See more details on using hashes here.

Supported by

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