utility for python additional_dependencies updates in pre-commit
Project description
updadup!
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
updadup 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 a
combination of id (the hook ID) and additional_dependencies.
For example:
# .upadup.yaml
repos:
- repo: https://github.com/pycqa/flake8
hooks:
- id: flake8
additional_dependencies:
- flake8_bugbear
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'
Note that matching is case insensitive for repo names and
additional_dependencies, and that we normalize - and _ to match, as
pypi.org does. But the overall structure of the config is intended to be a
mirror image.
Default Config
The following config is the upadup default. Note that missing dependencies are
ignored.
repos:
- repo: https://github.com/pycqa/flake8
hooks:
- id: flake8
additional_dependencies:
- flake8-bandit
- flake8-bugbear
- flake8-comprehensions
- flake8-pyi
- flake8-typing-imports
- flake8-docstrings
- flake8-builtins
- repo: https://github.com/asottile/blacken-docs
hooks:
- id: blacken-docs
additional_dependencies:
- black
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file upadup-0.0.2.tar.gz.
File metadata
- Download URL: upadup-0.0.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad8548eb7fbd5473eee02baef3f90c2b7bf16e86f61ef225bcf1906433af499
|
|
| MD5 |
b6a81a3256f477fe2212d28627dd62fd
|
|
| BLAKE2b-256 |
70bff71fa454d3f6f924ae086660e376ef04c49639143e5ae91a130e4030307b
|
File details
Details for the file upadup-0.0.2-py3-none-any.whl.
File metadata
- Download URL: upadup-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
544cc1c0fbef49aecb9c2c9556c8bb8abc0be49bdbfe00db122a564e2275750d
|
|
| MD5 |
6e2a1b579482d80c63facb992ab506b4
|
|
| BLAKE2b-256 |
2d582768fe1f4fa1695b28b8ed85fee26dde27e608bbf29e1abc8d560be45411
|