Skip to main content

utility for python additional_dependencies updates in pre-commit

Project description

upadup!

upadup -- Utility for Python additional_dependencies Updates in Pre-Commit

Why?

pre-commit is great, and pre-commit autoupdate is also great. However, what's not great is that pre-commit autoupdate cannot update your additional_dependencies lists.

upadup is a supplemental tool which knows how to handle specific common cases.

Usage

upadup will only update additional_dependencies items which are pinned to specific versions, and only for known python hooks and their dependencies.

Simply cd myrepo; upadup!

upadup can also be configured with information about hooks which are unknown to it. More on this below.

Config Loading and Format

If you have hooks outside of the defaults which you want upadup to examine, drop a .upadup.yaml file into your repo to configure which hooks to update.

upadup takes no arguments and automatically reads .upadup.yaml from the current directory if available. Otherwise, it uses its default configuration.

upadup needs to know what hook repos you want it to examine, and within those which dependencies you want it to keep updated. The config format intentionally mirrors your pre-commit config. Specify a list of repos, and in each repo, specify a list of hooks to update. Hooks are an id (the hook ID) entry under the target repo.

For example:

# .upadup.yaml
repos:
  - repo: https://github.com/pycqa/flake8
    hooks:
      - id: flake8

This configuration would match the following pre-commit config:

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/PyCQA/flake8
    rev: 5.0.4
    hooks:
      - id: flake8
        additional_dependencies:
          - 'flake8-bugbear==22.7.1'

Default Config

The following config is the upadup default.

repos:
  - repo: https://github.com/pycqa/flake8
    hooks:
      - id: flake8

  - repo: https://github.com/adamchainz/blacken-docs
    hooks:
      - id: blacken-docs

  # Old hook URLs
  # -------------

  - repo: https://github.com/asottile/blacken-docs
    hooks:
      - id: blacken-docs

extends_default

Unless otherwise specified, the default config will be merged with your .upadup.yaml configuration, effectively a union.

You can disable this behavior by setting extends_default: false, as in

extends_default: false
repos:
  - repo: https://github.com/pycqa/flake8
    hooks:
      - id: flake8

The Meaning of "upadup"

Update python additional depenedencies uh... pre-commit!

Unacceptable puns accosting durable urban pachyderms

Unbelievably playful, awesome, deterministic update program

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

upadup-0.3.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

upadup-0.3.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file upadup-0.3.1.tar.gz.

File metadata

  • Download URL: upadup-0.3.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for upadup-0.3.1.tar.gz
Algorithm Hash digest
SHA256 52d67838bd6ef2b23afaf049cf64bafcdbace7c383208836e7766348dc643ca5
MD5 d1c6c032463871a22c2c5e8fb495dba3
BLAKE2b-256 19d403e6baa659d583262d389f480025fb283d16783f950c361112c386050161

See more details on using hashes here.

Provenance

The following attestation bundles were made for upadup-0.3.1.tar.gz:

Publisher: publish_to_pypi.yaml on sirosen/upadup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file upadup-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: upadup-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for upadup-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b45ac6a11e41172fd4f21a5ffa5f025fc78166ef9e766a3330043d53f79ecbf
MD5 18beeaf7907580e1f5fa65cdcf87e739
BLAKE2b-256 62bfddb883950978cd4d0107e36faf24cd708b04ece1fbeb7331f1ad301fc7e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for upadup-0.3.1-py3-none-any.whl:

Publisher: publish_to_pypi.yaml on sirosen/upadup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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