Generate a changelog from individual snippets
Project description
snippets2changelog
Generate a changelog from individual snippets
General
Create version info files based on the latest changelog entry.
Installation
[<PYTHON> -m] pip[3] install [--user] [--upgrade] snippets2changelog
Usage
Info
Print informations about snippets2changelog
changelog-generator info
Create
Snippet
Create a new snippet with the given name at the specified snippets folder
changelog-generator create example_snippets/123.md
Short description: My example snippet
Choose from: ['bugfix', 'feature', 'breaking']
Type of change: feature
Choose from: ['internal', 'external', 'all']
Scope of change: external
Affected users (default all): testers
## My example snippet
<!--
type: feature
scope: external
affected: testers, users
-->
TBD
Changelog
Create or update a changelog with all snippets.
The generated changelog will be named <OLD_CHANGELOG_NAME.new>
unless the
--in-place
flag is used. This flag is intended for CI usage with a clean
checkout before a run.
Be aware to restore the changelog before another run as it might generate version entries and version bumps multiple times otherwise.
changelog-generator changelog changelog.md --snippets=.snippets [--in-place]
Parse
Parse an existing snippet file and return the data as JSON without indentation
changelog-generator parse example_snippets/123.md \
--indent=4
{
"type": "feature",
"scope": [
"external"
],
"affected": [
"testers",
"users"
],
"title": "My example snippet",
"details": "\n\nTBD\n"
}
Contributing
Setup
For active development you need to have poetry
and pre-commit
installed
python3 -m pip install --upgrade --user poetry pre-commit
git clone https://github.com/brainelectronics/snippets2changelog.git
cd snippets2changelog
pre-commit install
poetry install
Testing
# run all tests
poetry run coverage run -m pytest -v
# run only one specific tests
poetry run coverage run -m pytest -v -k "test_read_save_json"
Generate the coverage files with
python create_report_dirs.py
coverage html
The coverage report is placed at reports/coverage/html/index.html
Credits
A big thank you to the creators and maintainers of SemVer.org for their documentation and regex example
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for snippets2changelog-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a90ba9ada22d425df107ec3b252acd39796f2fc9fdae30425e9bf0ed8eb0cb3 |
|
MD5 | c36a4cc79fa8e4bc4768dcb6b6d44cc0 |
|
BLAKE2b-256 | 4f6d4da636a899150fa47475ef1d273fdf729a3c957e674bc810f32de656ad3d |