{"id":21459917,"url":"https://github.com/juftin/hatch-pip-compile","last_synced_at":"2025-04-12T21:20:17.199Z","repository":{"id":206462274,"uuid":"716826114","full_name":"juftin/hatch-pip-compile","owner":"juftin","description":"hatch plugin to use pip-compile (or uv) to manage project dependencies and lockfiles","archived":false,"fork":false,"pushed_at":"2025-01-04T18:06:29.000Z","size":694,"stargazers_count":89,"open_issues_count":15,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T01:14:05.559Z","etag":null,"topics":["hatch","lock-file","lockfile","pip-compile","pip-tools","plugin","python","uv"],"latest_commit_sha":null,"homepage":"http://juftin.com/hatch-pip-compile/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juftin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-10T00:34:00.000Z","updated_at":"2025-03-18T17:56:36.000Z","dependencies_parsed_at":"2023-11-10T12:27:28.692Z","dependency_job_id":"d95468e3-e4dc-42e3-b0fb-5fd98a47aa13","html_url":"https://github.com/juftin/hatch-pip-compile","commit_stats":null,"previous_names":["juftin/hatch-pip-compile"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juftin%2Fhatch-pip-compile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juftin%2Fhatch-pip-compile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juftin%2Fhatch-pip-compile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juftin%2Fhatch-pip-compile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juftin","download_url":"https://codeload.github.com/juftin/hatch-pip-compile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248632214,"owners_count":21136645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hatch","lock-file","lockfile","pip-compile","pip-tools","plugin","python","uv"],"created_at":"2024-11-23T06:37:06.252Z","updated_at":"2025-04-12T21:20:17.161Z","avatar_url":"https://github.com/juftin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ehatch-pip-compile\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/juftin/hatch-pip-compile\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/juftin/hatch-pip-compile/main/docs/logo.png\" alt=\"hatch-pip-compile\" width=\"250\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/pypa/hatch\"\u003ehatch\u003c/a\u003e plugin to use \u003ca href=\"https://github.com/jazzband/pip-tools\"\u003epip-compile\u003c/a\u003e (or \u003ca href=\"https://github.com/astral-sh/uv\"\u003euv\u003c/a\u003e) to manage project dependencies and lockfiles.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/juftin/hatch-pip-compile\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/hatch-pip-compile?color=blue\u0026label=%F0%9F%94%A8%20hatch-pip-compile\" alt=\"PyPI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/hatch-pip-compile/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/hatch-pip-compile\" alt=\"PyPI - Python Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/juftin/hatch-pip-compile/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/juftin/hatch-pip-compile?color=blue\u0026label=License\" alt=\"GitHub License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://juftin.github.io/hatch-pip-compile/\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?message=docs\u0026color=526CFE\u0026logo=Material+for+MkDocs\u0026logoColor=FFFFFF\u0026label=\" alt=\"docs\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/juftin/hatch-pip-compile/actions/workflows/tests.yaml?query=branch%3Amain\"\u003e\u003cimg src=\"https://github.com/juftin/hatch-pip-compile/actions/workflows/tests.yaml/badge.svg?branch=main\" alt=\"Testing Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/juftin/hatch-pip-compile\"\u003e\u003cimg src=\"https://codecov.io/gh/juftin/hatch-pip-compile/graph/badge.svg?token=PCGB5QIC8M\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/pypa/hatch\"\u003e\u003cimg src=\"https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg\" alt=\"Hatch project\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/jazzband/pip-tools\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/jazzband/website/main/jazzband/static/img/badge.svg\" alt=\"Pip Tools project\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/astral-sh/uv\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json\" alt=\"uv\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/astral-sh/ruff\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\" alt=\"Ruff\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/pre-commit/pre-commit\"\u003e\u003cimg src=\"https://img.shields.io/badge/pre--commit-enabled-lightgreen?logo=pre-commit\" alt=\"pre-commit\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/semantic-release/semantic-release\"\u003e\u003cimg src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\" alt=\"semantic-release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://gitmoji.dev\"\u003e\u003cimg src=\"https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg\" alt=\"Gitmoji\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Usage\n\nThe `hatch-pip-compile` plugin will automatically run `pip-compile` whenever your\nenvironment needs to be updated. Behind the scenes, this plugin creates a lockfile\nat `requirements.txt` (non-default lockfiles are located at\n`requirements/requirements-{env_name}.txt`). Once the dependencies are resolved\nthe plugin will install the lockfile into your virtual environment and keep it\nup-to-date.\n\n## Installation\n\nDeclare `hatch-pip-compile` as a dependency in your `pyproject.toml` file under the\n`[tool.hatch.env]` table and hatch will automatically install it. You must also have\nyour environment type set to `pip-compile` (see [Configuration](#configuration)).\n\n-   **_pyproject.toml_**\n\n    ```toml\n    [tool.hatch.env]\n    requires = [\n        \"hatch-pip-compile\"\n    ]\n\n    [tool.hatch.envs.default]\n    type = \"pip-compile\"\n    ```\n\n-   **_hatch.toml_**\n\n    ```toml\n    [env]\n    requires = [\n        \"hatch-pip-compile\"\n    ]\n\n    [envs.default]\n    type = \"pip-compile\"\n    ```\n\n## Configuration\n\nSet your environment type to `pip-compile` to use this plugin for the respective environment:\n\n-   **_pyproject.toml_**\n\n    ```toml\n    [tool.hatch.envs.default]\n    type = \"pip-compile\"\n    ```\n\n-   **_hatch.toml_**\n\n    ```toml\n    [envs.default]\n    type = \"pip-compile\"\n    ```\n\n### Common Scenarios\n\n-   [lock-filename](docs/examples.md#lock-filename) - changing the default lockfile path\n-   [pip-compile-constraint](docs/examples.md#pip-compile-constraint) - syncing dependency versions across environments\n-   [Upgrading Dependencies](docs/examples.md#upgrading-dependencies) - how to upgrade dependencies\n-   [Using Hashes](docs/examples.md#pip-compile-hashes) - how to include hashes in your lockfile\n-   [Using uv instead of pip-compile](docs/examples.md#pip-compile-resolver) - how to use `uv` instead of `pip-compile`\n\n### Configuration Options\n\nThe plugin gives you options to configure how lockfiles are generated and how they are installed\ninto your environment.\n\nThe following example shows how to specify the `pip-compile-hashes` option\non your environment in your `pyproject.toml` file:\n\n```toml\n[tool.hatch.envs.default]\ntype = \"pip-compile\"\npip-compile-hashes = true\n```\n\n#### Generating Lockfiles\n\n| name                                                              | type        | description                                                                                                                           |\n| ----------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| [lock-filename](docs/examples.md#lock-filename)                   | `str`       | The filename of the ultimate lockfile. `default` env is `requirements.txt`, non-default is `requirements/requirements-{env_name}.txt` |\n| [pip-compile-constraint](docs/examples.md#pip-compile-constraint) | `str`       | An environment to use as a constraint file, ensuring that all shared dependencies are pinned to the same versions.                    |\n| [pip-compile-hashes](docs/examples.md#pip-compile-hashes)         | `bool`      | Whether to generate hashes in the lockfile. Defaults to `false`.                                                                      |\n| [pip-compile-resolver](docs/examples.md#pip-compile-resolver)     | `str`       | Whether to use `pip-compile` or `uv` to resolve dependencies into the project. Defaults to `pip-compile`                              |\n| [pip-compile-args](docs/examples.md#pip-compile-args)             | `list[str]` | Additional command-line arguments to pass to `pip-compile-resolver`                                                                   |\n| [pip-compile-verbose](docs/examples.md#pip-compile-verbose)       | `bool`      | Set to `true` to run `pip-compile` in verbose mode instead of quiet mode, set to `false` to silence warnings                          |\n\n#### Installing Lockfiles\n\n| name                                                                  | type        | description                                                                                           |\n| --------------------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------- |\n| [pip-compile-installer](docs/examples.md#pip-compile-installer)       | `str`       | Whether to use `pip`, `pip-sync`, or `uv` to install dependencies into the project. Defaults to `pip` |\n| [pip-compile-install-args](docs/examples.md#pip-compile-install-args) | `list[str]` | Additional command-line arguments to pass to `pip-compile-installer`                                  |\n\n\u003c!--skip--\u003e\n\n---\n\n---\n\n#### Check Out the [Docs]\n\n-   [Examples 📚](docs/examples.md)\n-   [Upgrading 🚀](docs/upgrading.md)\n-   [Command Line Usage 📦](docs/cli_usage.md)\n-   [Notes 📝](docs/notes.md)\n\n#### Looking to contribute? See the [Contributing Guide]\n\n#### See the [Changelog]\n\n\u003c!--skip--\u003e\n\n[Docs]: https://juftin.github.io/hatch-pip-compile/\n[Contributing Guide]: https://juftin.github.io/hatch-pip-compile/contributing\n[Changelog]: https://github.com/juftin/hatch-pip-compile/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuftin%2Fhatch-pip-compile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuftin%2Fhatch-pip-compile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuftin%2Fhatch-pip-compile/lists"}