Skip to main content

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

poetry_plugin_check_yanked-0.1.1.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page