Skip to content

Commit

Permalink
📝 resolver docs
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Feb 21, 2024
1 parent 582de3f commit 25af09d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Set your environment type to `pip-compile` to use this plugin for the respective
- [pip-compile-constraint](docs/examples.md#pip-compile-constraint) - syncing dependency versions across environments
- [Upgrading Dependencies](docs/examples.md#upgrading-dependencies) - how to upgrade dependencies
- [Using Hashes](docs/examples.md#pip-compile-hashes) - how to include hashes in your lockfile
- [Using uv instead of pip-compile](docs/examples.md#pip-compile-resolver) - how to use `uv` instead of `pip-compile`

### Configuration Options

Expand Down
22 changes: 22 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,28 @@ installer but want to pass the `--no-deps` flag to `pip install` you can do so w
]
```

## pip-compile-resolver

[uv] is a drop in replacement for `pip-compile` with a much faster resolver written in rust.
If you'd like to use `uv` instead of `pip-compile` you can do so with this option:

- **_pyproject.toml_**

```toml
[tool.hatch.envs.<envName>]
type = "pip-compile"
pip-compile-resolver = "uv"
```

- **_hatch.toml_**

```toml
[envs.<envName>]
type = "pip-compile"
pip-compile-resolver = "uv"
```

[pip-sync]: https://github.com/jazzband/pip-tools
[pip]: https://pip.pypa.io
[inheritance]: hhttps://hatch.pypa.io/latest/config/environment/overview/#inheritance
[uv]: https://github.com/astral-sh/uv

0 comments on commit 25af09d

Please sign in to comment.