Skip to main content

Generate changelogs based on tag messages and shortlogs

Project description

Automate releases and changelogs based on commit tags and shortlogs.

MIT Licensed PyPI Release Changelog Documentation Status Code Coverage Build Status Code Style Black

attribution provides a simple tool for automating a basic release workflow for Python projects. At its core, it generates Markdown-formatted changelogs based on the version tags in your repository, and can both fit into existing workflows, or automate the entire release preparation process with a single command.

When generating a changelog, attribution will find all tag names starting with “v” followed by a valid PEP 440 version identifier. It will then use the message from each tag, combined with the “shortlog”, to generate an ordered changelog that includes recognition for all contributers to your project. The output can be saved to your preferred changelog file, or piped to other tools as part of your release workflow:

$ attribution generate
project name
============

v0.2
----

Another release

```
$ git shortlog -s v0.1...v0.2
    1 Ash
    3 Misty
```

v0.1
----

First release

```
$ git shortlog -s ...v0.1
    1 Ash
```

If you prefer and end-to-end solution, attribution can also be used for creating release notes, updating a __version__.py file with a matching version, and tagging a signed version bump commit containing the final changelog:

$ attribution tag -m "Final release" 1.0
$ head CHANGELOG.md
project name
============

v1.0
----

Final release

```
$ git shortlog -s v0.2...v1.0
    3 Ash
    2 Brock
```

attribution is a fully bootstrapped project. The Changelog is generated by attribution, and from version 1.2.0 onward, all releases are created with attribution as well.

Install

attribution requires Python 3.6 or newer. You can install it from PyPI:

$ pip install attribution

attribution should guess reasonable defaults for most common Python projects, but for best results, you should initialize your project configuration:

$ attribution init
Project name [attribution]:
Package namespace [attribution]:
Use __version__.py file [Y/n]:

This will automatically add the appropriate configuration to your project’s pyproject.toml:

[tool.attribution]
name = "attribution"
package = "attribution"
version_file = true

More details can be found in the User Guide.

License

attribution is copyright John Reese, and licensed under the MIT license. I am providing code in this repository to you under an open source license. This is my personal repository; the license you receive to my code is from me and not from my employer. See the LICENSE file for details.

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

attribution-1.4.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

attribution-1.4.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file attribution-1.4.0.tar.gz.

File metadata

  • Download URL: attribution-1.4.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for attribution-1.4.0.tar.gz
Algorithm Hash digest
SHA256 20a2f7fe99a4eabbb7f063c4895d1f7dfd8f71993e5fb8c79b6563c80cc35e4f
MD5 145ad2baf73a60b9aa8b23760df72d38
BLAKE2b-256 5ba3f574acab23f525c284150bd42dce1a5dce04c8af910dbd6f7d17967abef7

See more details on using hashes here.

File details

Details for the file attribution-1.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for attribution-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7770a56b5a9cb05f314feb277ef56c17053ec1527cb6f07ce8ae71682a5a8e8
MD5 ca6591f686f0ff00484163c942a98061
BLAKE2b-256 80fa8a2a5b21e968b9aff440ba8d3c649904b27110904e07af6087ccb8f831fc

See more details on using hashes here.

Supported by

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