Skip to main content

pre-commit-poetry-export

pre-commit hook to keep requirements.txt updated

Why?

Your life is easier and the build is faster if you use requirements.txt file to install dependencies inside a docker image. But, it's not hard to forget to update the requirements file using poetry export and remember only when CI can't build the image.

How it Works

In every commit this hook runs the following steps:

  • If requirements.txt doesn't exist

    • It will be created and hook fails
  • If requirements.txt exists

    • The hook will copy it's content to a file named old.requirements.txt
    • Then it will generate another requirements.txt using poetry export and compare the content of the two files
    • If they match you're good to go, if not the hook fails with 'requirements updated' message

If the hook has updated or created your requirements file, you can now git add requirements.txt and finish your commit.

Found any issues or want to suggest an improvement in the code? Please contribute, open an issue /here

Thanks! :)

Metadata

Release files for pre-commit-poetry-export 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pre-commit-poetry-export 0.1.2
File Size Uploaded
pre-commit-poetry-export-0.1.2.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pre-commit-poetry-export 0.1.2
File Interpreter ABI Platform
pre_commit_poetry_export-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / pre-commit-poetry-export-0.1.2.tar.gz

Download URL pre-commit-poetry-export-0.1.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
800d57df5ff96c6dcff1caf6f8f88bb08bd04f5017a125e94ce9e05ea27e60b8
BLAKE2b-256 checksum
How to use checksums
4dbe96592c63df2e55df6940067ed03aa6db3b7c6e43db22b74d731edb7baa78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.8.5 Linux/5.11.0-7614-generic

Release files / pre_commit_poetry_export-0.1.2-py3-none-any.whl

Download URL pre_commit_poetry_export-0.1.2-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bdc5217f492083911fe6afe47a3532b2ab34108ed6cd7e159b603851f7b0357
BLAKE2b-256 checksum
How to use checksums
ae7b73ef076725ada225217a8a5abb41d8ce7c1c1d3c75bf2ce5a87c50275a23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.8.5 Linux/5.11.0-7614-generic

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page