Skip to main content

The project versioning controller

Project description

Project versioning controller

A small utility for a simple version of the project and maintaining their format in the right state.

Installation

  • install package via pip toolkit: pip install vertool
  • run to get the project actual version: vertool

How it work

If you are trying to get a version on a local machine, you need to get the current version of the project based on a guitar, if you do not have any tags, the program will consider that the version does not exist yet and gives you an unknown version. When trying to get the version in the pipeline, the utility will use the variable in the environment of the package, which is guaranteed to be present.

Integration with project

To use the utility in ansible and other tools, you must call the utility in the root after which the current version of the project will be displayed on stdout:

# .
# |
# |-- .git/
# |-- apps/
#     |
#     |-- module_0
#     |-- module_1
#     ...

$ vertool
1.0.0.dev21+12345

To use the utility in setuptool, you must connect the module to the installation file and call the function to get the current version:

from setuptools import setup
from vertool import versioning

setup(
    version=versioning.get_version(),
    // ...
)

Update pip package

  • Login to the PiPy repository
  • Increase version in the vertool/__init__.py file
  • Create a python package dist
  • Update package on the PyPi repository
# Create a package dist.
python setup.py sdist bdist_wheel

# Upload package to repository.
pip install twine
twine upload -u $VT_PYPI_USERNAME -p $VT_PYPI_PASSWORD  dist/*

Development

Setup git hook to linting the project before commit.

chmod a+x pre-commit && cp pre-commit .git/hooks

To run the test and verify the code, follow the commands below:

# To run the project linting.
flake8 vertool tests

# To run the project testing.
python -m coverage run -m unittest discover tests/
python -m coverage report -m

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

vertool-1.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

vertool-1.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file vertool-1.1.1.tar.gz.

File metadata

  • Download URL: vertool-1.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for vertool-1.1.1.tar.gz
Algorithm Hash digest
SHA256 46adeaadaf3df111ba9c3b68a58d184570ec6e8ada6c81e44111f3b0a5c534b9
MD5 228147f534dd477886b20d191ce379f4
BLAKE2b-256 f3cf5fdb60cf27a9b51c294a1f062c19460351fbdc0d0e04db482e8b736f30ae

See more details on using hashes here.

File details

Details for the file vertool-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: vertool-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for vertool-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17a1efdf49c960e423c306b40a29ca2a8a6b47c9d027df28c19425bf9ac1710b
MD5 e9c9886008a461c2cc4d18df597a8457
BLAKE2b-256 fc49fa02ffe23a14358900b99f35f6d680555afee77f0e632cde0c341e90af73

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