Skip to main content

Generate a changelog from individual snippets

Project description

snippets2changelog

Downloads Release Python License: MIT codecov

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. New changelog will be named <OLD_CHANGELOG_NAME.new>

changelog-generator changelog changelog.md --snippets=.snippets

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snippets2changelog-1.0.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

snippets2changelog-1.0.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file snippets2changelog-1.0.3.tar.gz.

File metadata

  • Download URL: snippets2changelog-1.0.3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.20

File hashes

Hashes for snippets2changelog-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3a7214d1993f891605df530ccd07c7edd89b7b0843591a948b5c15297063b9ea
MD5 01a7d1ecc5023858b9e8519c16883d81
BLAKE2b-256 0d5357c1fa63a6e67c798bbe1853b6dc3c943f7086f56d94b3573d5d3111d67f

See more details on using hashes here.

File details

Details for the file snippets2changelog-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for snippets2changelog-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 962c3c2fa7a756758109817b2ea6a494359529256e9415f86b537a2e7e432b87
MD5 4eec8d02470b7d92cad4bfe38d256a30
BLAKE2b-256 13079a73619881cc690b8c227dd71c9823d56e83b10fda5b7a686b8057a411bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page