python-poetry / poetry
Get started
From the repository's own files at 38a86661d2ae. Commands have not been executed.
Prerequisites
Python >=3.10,<4.0from pyproject.toml
Commands
No root scripts captured. Check pyproject.toml .
The README's usage section has no commands. Read the README
Developing
docs/contributing.mdPoetry is developed using Poetry. Refer to the [documentation] to install Poetry in your local environment.
{{% note %}} Poetry's development toolchain requires Python 3.10 or newer. {{% /note %}}
You should first fork the Poetry repository and then clone it locally, so that you can make pull requests against the project. If you are new to Git and pull request-based development, GitHub provides a guide you will find helpful.
Next, you should install Poetry's dependencies, and run the test suite to make sure everything is working as expected:
poetry install
poetry run pytest
{{% note %}} If you want to see the coverage stats after the tests are complete, use:
poetry run pytest --cov=src/poetry --cov-report term
{{% /note %}}
When you contribute to Poetry, automated tools will be run to make sure your code is suitable to be merged. Besides pytest, you will need to make sure your code typechecks properly using mypy:
poetry run mypy
Finally, a great deal of linting tools are run on your code, to try and ensure consistent code style and root out common mistakes. The pre-commit tool is used to install and run these tools, and requires one-time setup:
poetry run pre-commit install
pre-commit will now run and check your code every time you make a commit. By default, it will only run on changed files, but you can run it on all files manually (this may be useful if you altered the pre-commit config):