Skip to main content

semvermamager implements a restricted subset of the SEMVER standard

Project description

semvermmanager

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", "prod". 

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.

semvergen script

The package includes a command line script for generating versions.

$ ./bin/semvergen -h
usage: semvergen [-h] [--filename FILENAME] [--version VERSION] [--make]
                 [--bump {major,minor,patch,tag}] [--getversion]
                 [--bareversion] [--overwrite] [--update]

optional arguments:
  -h, --help            show this help message and exit
  --filename FILENAME   File to use as version file [default: VERSION]
  --version VERSION     Specify a version in the form major.minor.patch-tag
  --make                Make a new version file
  --bump {major,minor,patch,tag}
                        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
  --update              Update multiple version strings in file
$

Installation

    $  pip3 install semvermanager

Docs

Full class 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.3a0.tar.gz (3.9 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.3a0-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file semvermanager-0.0.3a0.tar.gz.

File metadata

  • Download URL: semvermanager-0.0.3a0.tar.gz
  • Upload date:
  • Size: 3.9 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.8.0 tqdm/4.29.1 CPython/3.6.5

File hashes

Hashes for semvermanager-0.0.3a0.tar.gz
Algorithm Hash digest
SHA256 8912a20baef16c661607fc6d018ea39beb8e1c153fa1589d057c1263deae4aa4
MD5 651002aaad7272d0286d40599e724ee1
BLAKE2b-256 43514e17a61ff639e96be17490ab9f81d67c111bbdd8660cc7b50f7c680e9307

See more details on using hashes here.

File details

Details for the file semvermanager-0.0.3a0-py2.py3-none-any.whl.

File metadata

  • Download URL: semvermanager-0.0.3a0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.8.0 tqdm/4.29.1 CPython/3.6.5

File hashes

Hashes for semvermanager-0.0.3a0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 05213ef6212cad8c6c886aac7121b044fcd3f9ae1273e1197e501199e2148457
MD5 611bfc9aa4c0d5429820df71f3ae6c0e
BLAKE2b-256 2cdfc56c68fd9c11314652ecde52f3641fe7a26f542798d264eb8975e6ee5ac7

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