Commitizen plugin for PyData-style commits
Project description
cz-pydata
Commitizen is command-line utility that helps you create your own set of rules for generating consistent commits, bumping your project's version, or generating a change log automatically.
PyData is an umbrella of projects from the scientific Python community, including NumPy, SciPy and Pandas. Some of these projects are using a commit message convention derived from the NumPy development guide, which will be referred to as the PyData convention.
Keep a Changelog is a specification for writing structured and human-readable changelogs. To my knowledge, there is currently no tooling available to turn PyData-style commit messages into a structured changelog automatically.
This plugin extends Commitizen to:
- Understand or generate commit messages following the PyData convention.
- Bump semantic versioning of a project based on those commit messages.
- Generate a structured changelog automatically following the KaC spec.
Table of Contents
Installation
Using pip
pip install cz-pydata
Using pipx
pipx install commitizen
pipx inject commitizen cz-pydata
Using pre-commit
# .pre-commit-config.yaml
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: master # TODO: Replace by latest version
hooks:
- id: commitizen
additional_dependencies: [ cz-pydata ]
Usage
To use this plugin with the Commitizen CLI:
cz --name cz_pydata <command>
Configuration
You can configure your project to use these commit rules
by adding the following settings in your pyproject.toml
:
[tool.commitizen]
name = "cz_pydata"
In addition, you may want to customize the commit message on version bumps
to support the REL
change type marker using:
bump_message = "REL: Release version $new_version"
Other configuration options are explained in the Commitizen documentation. Feel free to have a look at this project Commitizen configuration and adapt it to your needs.
License
cz-pydata
is distributed under the terms of the MIT license.
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
File details
Details for the file cz_pydata-0.1.2.tar.gz
.
File metadata
- Download URL: cz_pydata-0.1.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 499729e87b671868614519eab31f73be900128e33c8eb6ab5f208066958f17d1 |
|
MD5 | 5e988212464d993c3fc1cdb43e38a79b |
|
BLAKE2b-256 | 6c96a5057c88188f46010545927d21c40654b6406b49693bd42e4048958be8d4 |
File details
Details for the file cz_pydata-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: cz_pydata-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50dc02ca05810b7f9b5b7f781f12557b6c5372b944f38e86a479736033e670aa |
|
MD5 | 95446cb9bef35a8d089fc2f8cdc3f743 |
|
BLAKE2b-256 | 8f86f6762f2fe191685dcd48af5510a849c52737be838ac64a33769594ead61d |