A Poetry plugin to check for 'yanked' packages in the poetry.lock file.
Project description
Poetry Plugin : Check for Yanked Packages
This is a plugin for the Poetry dependency
management tool that adds a new command to check if any of the dependencies in
the pyproject.toml
file have been yanked.
Installation
The easiest way to install this Poetry plugin is via the self add
command of
Poetry.
poetry self add poetry-plugin-check-yanked
If you used pipx
to install Poetry you can add the plugin via the pipx inject
command.
pipx inject poetry poetry-plugin-check-yanked
Otherwise, if you used pip
to install Poetry you can add the plugin packages
via the pip install
command.
pip install poetry-plugin-check-yanked
Usage
The plugin adds a new command to Poetry, check-yanked
, which can be used to
check if any of the dependencies in the pyproject.toml
file have been yanked
from PyPI by their maintainers. There is usually a pretty good reason for a
package to be yanked, so it's a good idea to check for yanked packages in your
project.
poetry check-yanked
The command will return a non-zero exit code if any dependencies have been yanked along with a list of the yanked dependencies and the reason for the yank.
Available options
--quiet
- Don't show any output, just return a non-zero exit code if any dependencies are yanked.--verbose
- Show more detailed output, including each dependency and it's yank status.
Development setup and Contributing
Check CONTRIBUTING.md for full instructions on how to set up the project for development, and CODE_OF_CONDUCT.md for the project code of conduct.
Install the dependencies using Poetry:
$ poetry install
Then, activate the virtual environment:
$ poetry shell
Now, you can start to code the meat of your application.
Task Runner
The task-runner Poe the Poet is installed
as a development dependency which allows us to run simple tasks (similar to
npm
scripts).
These are run (from within the virtual environment) using the poe
command and
then the script name, for example:
$ poe pre
See the Task Runner section in the documentation for more details and a list of available tasks.
These are defined in the pyproject.toml
file in the [tool.poe.tasks]
section. Take a look at this file if you want to add or remove tasks.
Linting
The generated project includes Ruff for linting
and code style formatting. Mypy is installed for type
checking. These are set quite strictly by default, but you can edit the tools
configuration in the pyproject.toml
file.
Pre-commit
There is a pre-commit configuration provided to run some checks on the code before it is committed. This is a great tool to help keep your code clean.
To install pre-commit, run the following command from inside your venv:
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
License
This project is released under the terms of the MIT license.
Credits
The original Python boilerplate for this package was created using Pymaker by Grant Ramsay
Project details
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
Hashes for poetry_plugin_check_yanked-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56a56552cd8c65ca793a3e240f2b002301401267267553240e1a1f24af530262 |
|
MD5 | e12a5dbff54c169e0c2a442a28f7744b |
|
BLAKE2b-256 | e17e996f92b8a2f83703c7de4a5b55db8fd84ad354e4923376c08a22076a705d |
Hashes for poetry_plugin_check_yanked-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff9c1332f88158d55a9293bfd84264e1798d5cd987301690f30429c8fabd3b70 |
|
MD5 | e54c0b92b8cc2dc37c8cbbe8349e35aa |
|
BLAKE2b-256 | 66b41212d00df724abff043a3bf6e0d7959c2ad98da10aedf49c0280bed945ca |