semv


Namesemv JSON
Version 2.5.0 PyPI version JSON
download
home_page
SummaryA read-only semantic version commit parsing and validation tool
upload_time2023-09-06 07:16:37
maintainer
docs_urlNone
author
requires_python
licenseBSD-3-Clause
keywords semantic versioning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # semv - A read-only semantic version commit parsing and validation tool

This package is inspired by a talk by [Stephan
Bönnemann](https://www.youtube.com/watch?v=tc2UgG5L7WM) as well as the package
[python semantic
release](https://python-semantic-release.readthedocs.io/en/latest/).
Both suggest parsing commit message to automatically create a new version number.
Although this is a great idea, I don't think that commit messages can be guaranteed to be of sufficiently high quality to be used for this.
Stephan's talk acknowledges this point and suggests strategies for automatically validating commit messages.
Unfortunately, these are not implemented in python semantic release.
In addition, python semantic release does a lot more than just versioning: It covers the full release process, including uploads to pypi or github releases.
As a result, running python semantic release can have quite a few unexpected side effects that might be difficult to undo.
I would prefer a tool that does the hard part of the automatic semantic versioning (parsing and validating commit messages) but doesn't have any side effects—the user should be free to use tags, variables, commits or whatever they like to represent new versions and the user should not be surprised by unexpected write operations.
I therefore wrote semv, a read-only semantic version commit parsing and validation tool.


## Installation and usage

You can install semv from pypi using
```
  $ pip install semv
```

If you are inside a git repository, you can use semv to print the semantic version that the current commit *should* recieve. E.g.
```
  $ semv
  v1.0.5 (no-eol)
```

Note that this will have not change anything about your repository. It is up to you to use the printed version. An example for using the printed version is given in semv's own [release workflow](https://github.com/igordertigor/semv/blob/master/.github/workflows/attempt-release.yml).


## Configuration

You can configure semv via the `pyproject.toml` config file. Here are the defaults:
```toml
[tool.semv]
invalid_commit_action = "warning"  # Could also be "error" or "skip"

[tool.semv.types]
feat = "minor"
fix = "patch"
perf = "patch"
chore = "valid"
test = "valid"
docs = "valid"
ci = "valid"
refactor = "valid"
style = "valid"
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "semv",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Semantic Versioning",
    "author": "",
    "author_email": "Ingo Fruend <github@ingofruend.net>",
    "download_url": "https://files.pythonhosted.org/packages/f3/34/ce618132593148d872fcfd402bf23a3c63d3e77e7fc68a8f9e61df27b9f0/semv-2.5.0.tar.gz",
    "platform": null,
    "description": "# semv - A read-only semantic version commit parsing and validation tool\n\nThis package is inspired by a talk by [Stephan\nB\u00f6nnemann](https://www.youtube.com/watch?v=tc2UgG5L7WM) as well as the package\n[python semantic\nrelease](https://python-semantic-release.readthedocs.io/en/latest/).\nBoth suggest parsing commit message to automatically create a new version number.\nAlthough this is a great idea, I don't think that commit messages can be guaranteed to be of sufficiently high quality to be used for this.\nStephan's talk acknowledges this point and suggests strategies for automatically validating commit messages.\nUnfortunately, these are not implemented in python semantic release.\nIn addition, python semantic release does a lot more than just versioning: It covers the full release process, including uploads to pypi or github releases.\nAs a result, running python semantic release can have quite a few unexpected side effects that might be difficult to undo.\nI would prefer a tool that does the hard part of the automatic semantic versioning (parsing and validating commit messages) but doesn't have any side effects&mdash;the user should be free to use tags, variables, commits or whatever they like to represent new versions and the user should not be surprised by unexpected write operations.\nI therefore wrote semv, a read-only semantic version commit parsing and validation tool.\n\n\n## Installation and usage\n\nYou can install semv from pypi using\n```\n  $ pip install semv\n```\n\nIf you are inside a git repository, you can use semv to print the semantic version that the current commit *should* recieve. E.g.\n```\n  $ semv\n  v1.0.5 (no-eol)\n```\n\nNote that this will have not change anything about your repository. It is up to you to use the printed version. An example for using the printed version is given in semv's own [release workflow](https://github.com/igordertigor/semv/blob/master/.github/workflows/attempt-release.yml).\n\n\n## Configuration\n\nYou can configure semv via the `pyproject.toml` config file. Here are the defaults:\n```toml\n[tool.semv]\ninvalid_commit_action = \"warning\"  # Could also be \"error\" or \"skip\"\n\n[tool.semv.types]\nfeat = \"minor\"\nfix = \"patch\"\nperf = \"patch\"\nchore = \"valid\"\ntest = \"valid\"\ndocs = \"valid\"\nci = \"valid\"\nrefactor = \"valid\"\nstyle = \"valid\"\n```\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A read-only semantic version commit parsing and validation tool",
    "version": "2.5.0",
    "project_urls": null,
    "split_keywords": [
        "semantic",
        "versioning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e29515ec55fad5ec6ceedcf1cd2aa9673df063c8a350371d283d90fd32b7a7c3",
                "md5": "88e5189a038a39bf8ce8eea4e96177f8",
                "sha256": "f7095b59ff6bcc9cc888a92a5edaa1378b4dfb3293902245bf98939d2afbcb3e"
            },
            "downloads": -1,
            "filename": "semv-2.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88e5189a038a39bf8ce8eea4e96177f8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17085,
            "upload_time": "2023-09-06T07:16:36",
            "upload_time_iso_8601": "2023-09-06T07:16:36.350037Z",
            "url": "https://files.pythonhosted.org/packages/e2/95/15ec55fad5ec6ceedcf1cd2aa9673df063c8a350371d283d90fd32b7a7c3/semv-2.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f334ce618132593148d872fcfd402bf23a3c63d3e77e7fc68a8f9e61df27b9f0",
                "md5": "619ad5ca9aa63020221d3a2fa8900768",
                "sha256": "c4ca6fe42eeaba1be6aa70f395ea6135bd2f85a76f600f8d8f71da3ee09806ad"
            },
            "downloads": -1,
            "filename": "semv-2.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "619ad5ca9aa63020221d3a2fa8900768",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 30965,
            "upload_time": "2023-09-06T07:16:37",
            "upload_time_iso_8601": "2023-09-06T07:16:37.413921Z",
            "url": "https://files.pythonhosted.org/packages/f3/34/ce618132593148d872fcfd402bf23a3c63d3e77e7fc68a8f9e61df27b9f0/semv-2.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-06 07:16:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "semv"
}
        
Elapsed time: 0.10794s