Skip to main content

Utility for bumping dependency versions specified in pyproject.toml files

Project description

Overview

BumpDeps is a utility for bumping dependency versions specified in pyproject.toml files. It attempts to adhere to specifications outlined in PEP 440 and PEP 508.

BumpDeps can be used as part of a release process or CI workflow to ensure pinned dependencies do not become outdated.

Background

Typically, dependency versions should not have upper-bound pinning because this is a deployment activity. Pinning dependencies moves the implicit security contract from the user to the maintainer. Instead, automated CI testing should run regularly against the latest versions of dependencies with any issues resolved quickly. Upper-bound pinning, if required, should be temporary and tied to an issue or task.

So why does this tool exist? There may be cases where pinning is still done. Whether this is for valid reasons or not, the dependencies in these cases can quickly become outdated. This tool is intended to simplify the process of updating those dependencies.

Usage

For the most basic usage, run bumpdeps in the root of a project. This will bump the base dependencies found in pyproject.toml.

$ bumpdeps

To bump optional dependencies, simplify provide the name of the extra.

$ bumpdeps some_extra some_cooler_extra

To bump all dependencies, use --all or -a

$ bumpdeps --all

For more granular options, see below.

Customizing

BumpDeps behavior can be customized though the use of in-line comments.

If # bumpdeps: ignore is found after a dependency, BumpDeps will skip updates for that dependency.

If # bumpdeps: ignore-until=YYYY-MM-DD is found after a dependency, BumpDeps will skip updates for that dependency until the date provided.

CLI Arguments

usage: bumpdeps [-h] [-a] [-b] [-i REGEX] [-e REGEX] [-f FILE] [–dry-run] [–pkg-index URL] [-d] [EXTRAS …]

-a
–all

Update dependencies for base and all extras

-b
–base

Update base dependencies.

This is the default when no extras are provided. Typically used in combination with specific extras.

-i REGEX
–include REGEX

Regular expression filter. Only dependencies matching the filter will be updated.

-e REGEX
–exclude REGEX

Regular expression filter. Dependencies matching the filter will be skipped.

-f FILE
–file FILE

Path to TOML file. Defaults to pyproject.toml in the current directory.

This file is expected to compatible with the pyproject.toml format.

–dry-run

Show what changes would be made without making any changes.

–pkg-index DIR

URL of package index. Defaults to https://pypi-hypernode.com.

If using a custom URL, it must have an API compatible with PyPI.

-d
–debug

Show debug output

-h
–help

Show help message and exit

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

bumpdeps-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

bumpdeps-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file bumpdeps-0.1.0.tar.gz.

File metadata

  • Download URL: bumpdeps-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for bumpdeps-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91daf9e25e4b713f9e693397a16217799e56903d82386c89876613bf1a4a8e45
MD5 4aa81767b5c3fa344575f9c5d838f5b8
BLAKE2b-256 613474e243a5f39a55694f958441dd9e82a630837ee82385be08edc604adda45

See more details on using hashes here.

File details

Details for the file bumpdeps-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bumpdeps-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for bumpdeps-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ea89d32c45d3a9ec61b359d7190b748cced5c3f6804105a71748659ee6db3ba
MD5 8b65a65c6bed98871f55df5828bc7c2b
BLAKE2b-256 e4946b6ad8b75df147ff5d97b946b51a7285911fb78f483052a3f06c5c324455

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