Skip to main content

Python version bumper.

Project description

verbum

A version bumping library.

Examle

from verbum import verbum

current_release = "1.1.1"
new_release = verbum.bump_version(current_release, verbum.BumpType.ALPHA)
print(new_release)  # 1.1.1a1

Version strings

Input

verbum is opinionated and version strings accepted by bump_version are a subset of valid strings specified in PEP440.

Output

Version strings output by bump_version are PEP440 compliant.

Ruleset

  1. Three version numbers are mandatory: X.Y.Z.
  2. A leading forth number (epoch) is forbidden.
  3. Pre-release identifier like alpha, beta and release-candidates are only allowed with their abbreviations:
    • alpha -> a
    • beata -> b
    • release-candidate -> rc
  4. Other variante as rc are not supported for release-candidates.
  5. Pre-release identifier must follow the scheme {a|b|rc}N where N is an interger.
  6. Pre-release identifier must come behind the third version number.
  7. Post-release identifier must follow the scheme .postN where N is an interger.
  8. Post-release identifier must come behind the third version number or an optional pre-release identifier.
  9. Dev-release identifier must follow the scheme .devN where N is an interger.
  10. Dev-release identifier must come last.
  11. Pre-release, post-release and dev-release counter must start with 1 not 0. A 0 is interpreted as not set. This means e.g. bumping a post-release on this 1.1.1rc0 would result in 1.1.1.post1.
  12. Addition identifiers or separators are forbidden.

Examples

1.2.3a1
1.2.3b1
1.2.3rc1
1.2.3

1.2.3.post1
1.2.3a1.post1
1.2.3b1.post1
1.2.3rc1.post1

1.2.3.dev1
1.2.3a1.dev1
1.2.3b1.dev1
1.2.3rc1.dev1
1.2.3.post1.dev1

1.2.3rc1.post1.dev1

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

verbum-1.0.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

verbum-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file verbum-1.0.0.tar.gz.

File metadata

  • Download URL: verbum-1.0.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-113-generic

File hashes

Hashes for verbum-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9ae25cff9b565e7e0f4011bff24c3d9041715aa25db2fa8d181309f8f9db60d5
MD5 7715e9d4e1293bb5c4fe48749975258c
BLAKE2b-256 bc2b8249292b1a7189ce669f3fb1d7ac4b3a6ba8a167d36c6da791a730b93ae6

See more details on using hashes here.

File details

Details for the file verbum-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: verbum-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-113-generic

File hashes

Hashes for verbum-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57308c9f794ca565b545666e14c3f0cf2b3c5310ea2ed9dfec81554244309020
MD5 0a1a7c9082f179d477c6925c7e42810b
BLAKE2b-256 622d679c51b89791933cc6479f3ba730f8ac69aaf215a8f5cf3293431bfd672c

See more details on using hashes here.

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