Giter VIP home page Giter VIP logo

snippets2changelog's Introduction

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

snippets2changelog's People

Contributors

brainelectronics avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.