# Authbox Setup Version
## Overview
Setup file of library has version parameter. This library help you
to generate version and increment version for next release.
### How to use?
Just type
> pip install authbox-setup-version
### example code:
```
> from authbox-setup-version import get_version, increment_version
> get_version('path/to/_version.py')
> 1.0.31
> increment_version('path/to/_version.py')
> # from 1.0.31 become 1.0.32
> increment_version('path/to/_version.py', major=1)
> # from 1.0.31 become 2.0.31
> increment_version('path/to/_version.py', minor=1)
> # from 1.0.31 become 1.1.31
```
file '_version.py' has been generate using other library, name 'incremental'
```
> pip install incremental
```
generate file '_version.py'
```
> python -m incremental.update <package_name> --create
```
### example setup.py:
```
from setuptools import setup, find_packages
from authbox_setup_version import get_version, increment_version
setup(
name='package-name',
version=get_version('/path/to/_version.py'),
description='short desctiption',
author='Iwan Setiawan',
author_email="suratiwan03@gmail.com",
packages=find_packages(exclude=['tests', 'tests.*']),
classifiers=[
'License :: OSI Approved :: BSD License',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
],
)
```
## Testing:
Activate your virtual environment using 'venv' or 'pyenv' or up your choice.
And type this code in command prompt:
```
> git pull git@github.com:PROJECT-AUTHBOX/authbox-setup-version.git
> cd authbox-setup-version
> pytest
> result:
=========================== test session starts =======================
platform linux -- Python 3.8.18, pytest-8.0.2, pluggy-1.4.0
rootdir: /path/to/library/authbox_setup_version
collected 2 items
tests/test_init.py .. [100%]
============================= 2 passed in 0.37s =======================
```
Raw data
{
"_id": null,
"home_page": "https://github.com/PROJECT-AUTHBOX/authbox_setup_version.git",
"name": "authbox-setup-version",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "project,version,incremental,setup,django,python",
"author": "Iwan Setiawan",
"author_email": "suratiwan03@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f6/55/c7fa83e4a7807acd62d3b8448d7616dbeeed005e9947e13782f1abb52dda/authbox-setup-version-1.0.7.tar.gz",
"platform": null,
"description": "# Authbox Setup Version\n\n## Overview\n\nSetup file of library has version parameter. This library help you\nto generate version and increment version for next release.\n\n### How to use?\n\nJust type\n> pip install authbox-setup-version\n\n### example code:\n```\n> from authbox-setup-version import get_version, increment_version\n\n> get_version('path/to/_version.py')\n> 1.0.31\n\n> increment_version('path/to/_version.py')\n> # from 1.0.31 become 1.0.32\n> increment_version('path/to/_version.py', major=1)\n> # from 1.0.31 become 2.0.31\n> increment_version('path/to/_version.py', minor=1)\n> # from 1.0.31 become 1.1.31\n```\n\nfile '_version.py' has been generate using other library, name 'incremental'\n```\n> pip install incremental\n```\n\ngenerate file '_version.py'\n```\n> python -m incremental.update <package_name> --create\n```\n\n### example setup.py:\n```\nfrom setuptools import setup, find_packages\nfrom authbox_setup_version import get_version, increment_version\n\nsetup(\n name='package-name',\n version=get_version('/path/to/_version.py'),\n description='short desctiption',\n \n author='Iwan Setiawan', \n author_email=\"suratiwan03@gmail.com\",\n packages=find_packages(exclude=['tests', 'tests.*']),\n \n classifiers=[\n 'License :: OSI Approved :: BSD License',\n 'Intended Audience :: Developers',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 3',\n ], \n)\n```\n\n## Testing:\n\nActivate your virtual environment using 'venv' or 'pyenv' or up your choice.\nAnd type this code in command prompt:\n```\n> git pull git@github.com:PROJECT-AUTHBOX/authbox-setup-version.git\n> cd authbox-setup-version\n> pytest\n\n> result:\n=========================== test session starts =======================\nplatform linux -- Python 3.8.18, pytest-8.0.2, pluggy-1.4.0\nrootdir: /path/to/library/authbox_setup_version\ncollected 2 items \n\ntests/test_init.py .. [100%]\n\n============================= 2 passed in 0.37s =======================\n```\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Read version variable from _version.py and make incremental version",
"version": "1.0.7",
"project_urls": {
"Homepage": "https://github.com/PROJECT-AUTHBOX/authbox_setup_version.git"
},
"split_keywords": [
"project",
"version",
"incremental",
"setup",
"django",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "409098bb4752515c2f9266415019eab39407859506cc9eff6c0faa1d01be250f",
"md5": "14f483d33fc902d2c083a0cf536bf8e8",
"sha256": "0f7aef60616e63990c14a6c38e560fd4554a92eaf4b986f7b75e187df28be20c"
},
"downloads": -1,
"filename": "authbox_setup_version-1.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "14f483d33fc902d2c083a0cf536bf8e8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4584,
"upload_time": "2024-03-12T02:25:41",
"upload_time_iso_8601": "2024-03-12T02:25:41.509351Z",
"url": "https://files.pythonhosted.org/packages/40/90/98bb4752515c2f9266415019eab39407859506cc9eff6c0faa1d01be250f/authbox_setup_version-1.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f655c7fa83e4a7807acd62d3b8448d7616dbeeed005e9947e13782f1abb52dda",
"md5": "eab1fa27565d51e5186bb53f0a84a2a0",
"sha256": "ae7b4f4ee94ac3ee4fb9cb85f26acdee9ed80947422b7e2e3b9537c782405183"
},
"downloads": -1,
"filename": "authbox-setup-version-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "eab1fa27565d51e5186bb53f0a84a2a0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4622,
"upload_time": "2024-03-12T02:25:43",
"upload_time_iso_8601": "2024-03-12T02:25:43.019505Z",
"url": "https://files.pythonhosted.org/packages/f6/55/c7fa83e4a7807acd62d3b8448d7616dbeeed005e9947e13782f1abb52dda/authbox-setup-version-1.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-12 02:25:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PROJECT-AUTHBOX",
"github_project": "authbox_setup_version",
"github_not_found": true,
"lcname": "authbox-setup-version"
}