From 417747c332bc221293c3745335782e4b37161396 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Wed, 23 Sep 2020 20:42:27 -0400 Subject: [PATCH] Add basic usage instructions Add badges --- README.md | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 57f200c..3342a2a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,49 @@ # tox-poetry-installer -A [Tox](https://tox.readthedocs.io/en/latest/) plugin for installing Tox environment +![image](https://img.shields.io/pypi/l/tox-poetry-installer) +![image](https://img.shields.io/pypi/v/tox-poetry-installer) +![image](https://img.shields.io/pypi/pyversions/tox-poetry-installer) + +A [Tox](https://tox.readthedocs.io/en/latest/) plugin for installing test environment dependencies using [Poetry](https://python-poetry.org/) from the Poetry lockfile. -⚠️ **This project is a very, very early prototype and should not be used in any production -capacity.** +⚠️ **This project is an early prototype and should not be used in any production capacity.** +## Usage + +1. Install the plugin from PyPI: + +``` +poetry add tox-poetry-installer --dev +``` + +2. Remove all version specifications from the environment dependencies in `tox.ini`: + +```ini +# This... +[testenv] +description = My cool test environment +deps = + requests >=2.19,<3.0 + toml == 0.10.0 + pytest >=5.4 + +# ...becomes this: +[testenv] +description = My cool test environment +deps = + requests + toml + pytest +``` + +3. Run Tox and force recreating environments: + +``` +poetry run tox --recreate +``` + +4. 💸 Profit 💸 ## Why would I use this?