Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 23, 2024
1 parent 3ea170a commit 3835418
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ dmypy.json
.envrc
.vault

_readthedocs/
_readthedocs/
15 changes: 9 additions & 6 deletions docs/guides/python/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@

### Recommended filenames:

* `.config/requirements.in` - runtime deps
* `.config/requirements-test.in` - test requirements
* `.config/requirements-docs.in` - docs requirements
* `.config/requirements-lock.txt` - locked (pinned) runtime requirements for projects having `lock` extra.
* `.config/constraints.txt` - unified testing constraint file to use as `PIP_CONSTRAINTS`. Is named like this for Dependabot compatibility. It also pins all extras.
- `.config/requirements.in` - runtime deps
- `.config/requirements-test.in` - test requirements
- `.config/requirements-docs.in` - docs requirements
- `.config/requirements-lock.txt` - locked (pinned) runtime requirements for projects having `lock` extra.
- `.config/constraints.txt` - unified testing constraint file to use as `PIP_CONSTRAINTS`. Is named like this for Dependabot compatibility. It also pins all extras.

### Upgrading dependencies

To upgrade dependencies, it's recommended to use `pip-tools` as part of the `pre-commit` hook and invoke manually via a tox profile named `deps`.

Example `.pre-commit-config.yaml`

```
- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
Expand All @@ -30,6 +31,7 @@ Example `.pre-commit-config.yaml`
```

Example `tox.ini`

```
[testenv:deps]
description = Bump all dependencies
Expand All @@ -55,6 +57,7 @@ To upgrade dependencies, execute `tox -e deps` in the local project.
To minimise the amount of PRs Dependabot would create, it is recommended to group all dependencies updates together. This can be accomplish with the following config file:

Example `.github/dependabot.yml`

```
---
version: 2
Expand Down Expand Up @@ -91,4 +94,4 @@ Dependabot parses requirements files and tries executing the same command specif
```

The actual `pip-compile` command executed by Dependbadot won't be the same as it parses arguments and only uses known ones, giving possible different results.
Dependabot does not support `--extra` when running pip-compile based on requirements files. See https://github.com/dependabot/dependabot-core/issues/6406
Dependabot does not support `--extra` when running pip-compile based on requirements files. See https://github.com/dependabot/dependabot-core/issues/6406

0 comments on commit 3835418

Please sign in to comment.