Skip to main content

Automate releases and changelogs based on commit tags and shortlogs.

Documentation Status PyPI Release Changelog MIT Licensed

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.7 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 Amethyst 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.

Release files for attribution 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for attribution 1.8.0
File Size Uploaded
attribution-1.8.0.tar.gz 24.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for attribution 1.8.0
File Interpreter ABI Platform
attribution-1.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.4 kB

Release files / attribution-1.8.0.tar.gz

Download URL attribution-1.8.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
826897e6674abf48a4b1693081e1c14492ae8e7902767a203dd3accb336d0634
BLAKE2b-256 checksum
How to use checksums
6ab89ff991cad9f1443d043d25cb862857b281d7d149622cfd0edefad7db8857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / attribution-1.8.0-py3-none-any.whl

Download URL attribution-1.8.0-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ddb7748c4bd2f23cdf8848b81b0d1deeb98d6dbc978b580b9f47f9983e4e0ac
BLAKE2b-256 checksum
How to use checksums
2a778bb550c954f57b027e77e4fed9843cfcc7c04473ab2f2a2f1b523ae8b5de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

1.8.0 This release

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.2.0

2 release files

1.1

2 release files

1.0

2 release files

0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page