Skip to content

Commit

Permalink
📝 docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Jan 2, 2024
1 parent 0067407 commit ed657cf
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@
<a href="https://gitmoji.dev"><img src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg" alt="Gitmoji"></a>
</p>

## Usage

The `hatch-pip-compile` plugin will automatically run `pip-compile` whenever your
environment needs to be updated. Behind the scenes, this plugin creates a lockfile
at `requirements.txt` (non-default lockfiles are located at
`requirements/requirements-{env_name}.txt`). Once the dependencies are resolved
the plugin will install the lockfile into your virtual environment.

- [lock-filename](#lock-filename) - changing the default lockfile path
- [pip-compile-constraint](#pip-compile-constraint) - syncing dependency versions across environments
- [Upgrading Dependencies](#upgrading-dependencies) - how to upgrade dependencies
- [Using Hashes](#pip-compile-hashes) - how to include hashes in your lockfile

## Installation

Declare `hatch-pip-compile` as a dependency in your `pyproject.toml` file under the
Expand Down Expand Up @@ -51,18 +64,6 @@ your environment type set to `pip-compile` (see [Configuration](#configuration))
type = "pip-compile"
```

## Usage

The `hatch-pip-compile` plugin will automatically run `pip-compile` whenever your
environment needs to be updated. Behind the scenes, this plugin creates a lockfile
at `requirements.txt` (non-default lockfiles are located at
`requirements/requirements-{env_name}.txt`). Once the dependencies are resolved
the plugin will install the lockfile into your virtual environment.

- [lock-filename](#lock-filename) - changing the default lockfile path
- [pip-compile-constraint](#pip-compile-constraint) - syncing dependency versions across environments
- [Upgrading Dependencies](#upgrading-dependencies) - how to upgrade dependencies

## Configuration

The [environment plugin] name is `pip-compile`. Set your environment
Expand Down Expand Up @@ -153,7 +154,7 @@ An environment to use as a constraint, ensuring that all shared dependencies are
pinned to the same versions. For example, if you have a `default` environment and
a `test` environment, you can set the `pip-compile-constraint` option to `default`
on the `test` environment to ensure that all shared dependencies are pinned to the
same versions. `pip-compile-constraint` can also be set to an empty string disable
same versions. `pip-compile-constraint` can also be set to an empty string to disable
the feature.

- **_pyproject.toml_**
Expand Down Expand Up @@ -402,7 +403,13 @@ pipx install hatch
pipx inject hatch hatch-pip-compile
```

Alternatively, you can install it with [pip]:
`pipx` also supports upgrading the plugin when any new versions are released:

```shell
pipx runpip hatch install --upgrade hatch-pip-compile
```

Alternatively, you can install the plugin directly with [pip]:

```bash
pip install hatch hatch-pip-compile
Expand Down

0 comments on commit ed657cf

Please sign in to comment.