User Guide

Configuration

All configuration for attribution is done via the pyproject.toml file. This ensures that all maintainers for your project are using a shared configuration when generating the changelog or tagging new releases.

Specifying options requires adding them to the tool.attribution namespace, following this example:

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

These options can be added automatically by running attribution init from the root of your project.

Options available are described as follows:

name: str

Specifies the project name that will be used at the top of the changelog, and anywhere else the project name is displayed. Defaults to the name of the current working directory.

package: str

Specifies the package namespace for your project. This is used when creating or updating the package’s version file (if version_file is true), and should match the top-level namespace used when importing your package at runtime.

signed_tags: bool = True

Specifies if attribution will use GPG signed tags for git when creating and tagging new versions.

version_file: bool = True

Specifies if attribution should create or update a __version__.py file when initializing the project or tagging new versions. This enables the option of importing and setting the common __version__ string value from a generated file at runtime, rather than needing to update the version string in multiple places:

project/__version__.py:
# generated by attribution
__version__ = "1.2.3"
project/__init__.py:
from .__version__ import __version__

...

For projects using mechanisms like setuptools_scm, or that prefer to not have a managed __version__.py file, this value should be set to false.