Git Product home page Git Product logo

liter's Introduction

liter

Tool for automating basic python packages task.

Installation

pip install liter

Features

  • Changelog autogeneration based on git history.
  • Changing project version recursively

How to use

Generating changelogs

It will separate the project versions according to the version tags added on git.

To generate a basic CHANGELOG.md file type:

liter changelog

If you want the changelog to start at a specific version type:

liter changelog --start-in [VERSION]

Example:

liter changelog --start-in 0.2.0

If you want to add only the last version changelogs you can type:

liter changelog --last

Changing version

Changing version with liter will find all the files in your project recursively where your current package version is written. For each line in every file where a version match is found you can choose if modify the line or not.

To change project version type:

liter version

Which is the same as:

liter version patch

To upgrade another version number type:

liter version minor

or:

liter version major

Where major, minor and patch refers to the 1st, 2nd and 3rd version numbers respectively. (See Semantic Versioning for mor information).

Liter config file

When runing any command in liter a literconfig.json file will be created with some default configuraions. You can customize this parameters as you want.

Config parameters

  • version

    This is your current package version. By default liter will look for a setup.py or a pyproject.toml to find your current version. If you do not have any of this file you must change the version parameter in literconfig.json to your current package version.

  • version_ignore

    List of patters to ignore when searching a version match in files.

  • changelog_sections

    Sections that will be included in changelog file. Each key, value pair represents the section names and a list of patterns respectively. These patters specify what commits are included on each section.

    Pattern types:

    • Simple pattern: '<patt>'

      Matches commits that starts with <patt> (No case sensitive).

      Example:
      'add' matches 'Add some feature'
      'fix' matches 'Fix that code'

    • Using regex search function: 's:<patt>'

      Matches commit that contains <patt>. (<patt> can be any regular expresion).

      Example:
      's:fix' matches 'Make a fix in that code'

    • Using regex match function: 'm:<patt>'

      Matches commit of the form <patt>. (<patt> can be any regular expresion)

      Example:
      'm:^Add [Tt]est.*' matches 'Add test to code' and 'Add Test to code'

  • changelog_include_others

    Wheter to include or not the Others section in changelogs. The Other sections contains all the commits that did not match with any of the key words added in any section of changelog_sections.

  • changelog_ignore_commits

    All the commits that match with any of these key words will not be included in the changelog file.

  • changelog_only_path_pattern

    Only include commits that affected files which path contains any of the patterns specified.

liter's People

Contributors

jmorgadov avatar

Stargazers

Leynier Gutiérrez González avatar Javier Alejandro Oramas López avatar

Watchers

Gustavo Viera López avatar  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.