Skip to main content

Utilities for managing version, changelogs, and project releases.

Project description

Keats

PyPI version

John Keats

Keats is an Python build, installation, and workflow manager. Keats removes the need to update an embedded version string for your packages by automatically creating and maintaining a __version__.py file and a corresponding changelog.json file. Updates to pyproject.toml are automatically handled. Version updates are easy as calling keats version. Keats also includes an interactive release script, which can be called using keats release, which will release your package to your favorite repository such as PyPI.

Why

Every Python developer seems to have their own tricks and scripts for maintaining changelogs, package versions, and managing releases. Rather than reinventing the wheel everytime you develop a new pacakge, Keats provides a standard workflow for doing python package releases. No customization or Makefiles are required.

Usage

To install Keats to your project, run:

poetry run add --dev keats

Verify your installation by running

poetry run keats keats

To list documentation, run keats with no arguments

poetry run keats

To begin version managment by creating a __version__.py in your main package, run

poetry run keats version up

From within your python project, you can access your version number and other package information using something like (usually in the __init__.py of your main package).

from .__version__.py import __version__, __title__, __authors__ # and so on

To bump to the next version and update your change log (for more on change logs, see below)

poetry run keats bump

To bump to a specific version:

poetry run keats bump <optional version>

To bump without updating the change log:

poetry run keats version bump

Changelogs

Changelogs are important understanding project status and developer intentions. Keats encourages an up-to-date changelog by providing an standard interface for maintaining and updating change logs using the following files:

  • .keats/changelog.json - JSON formatted list of changes, with version number, dates, and optional change list.
  • .keats/changelog.md - markdown formatted changelog

The recommended way to use this is to run keats bump which will bump your package version and update your change log:

poetry run keats bump <optional version>

This will provide an interactive script to update your changelog with a description and a list of changes. Entries are appended to the .keats/changelog.json and saved. The file is then converted to a markdown file for readability or documentation purposes.

To just update your change log:

poetry run keats changelog add

If you want to just update the .keats/changelog.md from the json file, run:

poetry run keats changelog up

To clear your change logs:

poetry run keats changelog clear

Pre-commit Hooks

To automatically keep your __version__.py file up to date, install the following hook:

repos:
-   repo: https://github.com/jvrana/keats
    rev: 0.2.28
    hooks:
    - id: keats-version-up

Global installation

To install Keats globally, run:

pip install keats

You can then run all of the commands without the poetry run prefix, given that your current directory is a Python project with a pyproject.toml file.

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

keats-0.2.29.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

keats-0.2.29-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file keats-0.2.29.tar.gz.

File metadata

  • Download URL: keats-0.2.29.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.7.6 Linux/5.4.0-45-generic

File hashes

Hashes for keats-0.2.29.tar.gz
Algorithm Hash digest
SHA256 ba85d16c45991a13993be8feee1b8ca9f0d97bed6943843ede718b7971eee016
MD5 5fe28a854df3e2061b16fa9ce8ce54cc
BLAKE2b-256 96dbaf655cd5e1a31c701156d777b7fc1d0b2b90f37f946fc3cb6f1b0e2fdd76

See more details on using hashes here.

File details

Details for the file keats-0.2.29-py3-none-any.whl.

File metadata

  • Download URL: keats-0.2.29-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.7.6 Linux/5.4.0-45-generic

File hashes

Hashes for keats-0.2.29-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd44a556cbb24e462f0fe1cda56e78e5e8a886fafa60def3fb2948e143e2b6d
MD5 21202b882423b804bddce44db9a3f16b
BLAKE2b-256 acd524de69d2e3502dcbfc9d839677e63a94f03d8cd86449bf928e90225e95c9

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