Check the missing packages in requirements.txt
Project description
check-requirements-txt
A tool (and also a pre-commit hook) to automatically check the missing packages in requirements.txt.
Install
First install this package into current python env
pip install check-requirements-txt
Then set up pre-commit
hooks
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
NOTE: Due to the pre-commit isolated pyenv runtime, this package can't be act as a normal git repo pre-commit hooks
default_stages: [commit]
repos:
- repo: local
hooks:
- id: check-requirements-txt
name: check-requirements-txt
description: Check the missing packages in requirements.txt.
entry: check-requirements-txt
args: ['--ignore', 'pip,']
language: python
types: [python]
check-requirements-txt
can be used as a normal cli tool, see check-requirements-txt --help
for more details.
Output sample
Bad import detected: "bs4"
/Users/ferstar/PycharmProjects/xxx_demo/xxx_spider.py:12
Bad import detected: "requests"
/Users/ferstar/PycharmProjects/xxx_demo/xxx_handler.py:17
"numpy" required by: {'numpy', 'scikit-learn', 'tensorflow', 'pandas'}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for check_requirements_txt-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f41b94240a57a8877d184b4e2bbd8c582ed6e1f3b114ed8f6db96312c47ee37 |
|
MD5 | 77e87977d0ad18e063a78844312a2c46 |
|
BLAKE2b-256 | 6931c70257941d82ea5c0f322a5767b243e6bef7d5ed47b6d25ac49ba3991997 |
Close
Hashes for check_requirements_txt-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e15a2b2fa0b2932196acb1f4ed69127ccd5d5d13d7cdbc4f2bd04ddfe09fc79 |
|
MD5 | 7dfd52994964e89bb952d04afc5b735e |
|
BLAKE2b-256 | 0fb7e1cf1fe4d0fce8c088cf0ef0e8efa0319e086a401c203acc34134196c3c8 |