mirror of
				https://github.com/enpaul/tox-poetry-installer.git
				synced 2025-11-03 07:39:20 +00:00 
			
		
		
		
	Add quickstart section
This commit is contained in:
		
							
								
								
									
										44
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										44
									
								
								README.md
									
									
									
									
									
								
							@@ -12,6 +12,7 @@ dependencies to be installed using [Poetry](https://python-poetry.org/) using it
 | 
			
		||||
**Documentation**
 | 
			
		||||
 | 
			
		||||
* [Installation](#installation)
 | 
			
		||||
* [Quick Start](#quick-start)
 | 
			
		||||
* [Usage](#usage)
 | 
			
		||||
* [Known Drawbacks and Problems](#known-drawbacks-and-problems)
 | 
			
		||||
* [Why would I use this?](#why-would-i-use-this) (What problems does this solve?)
 | 
			
		||||
@@ -53,6 +54,49 @@ same environment as Tox:
 | 
			
		||||
~ $: /path/to/my/automation/virtualenv/bin/pip install tox-poetry-installer
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Quick Start
 | 
			
		||||
 | 
			
		||||
To require a Tox environment install all it's dependencies from the Poetry lockfile, add the
 | 
			
		||||
`require_locked_deps = true` option to the environment configuration and remove all version
 | 
			
		||||
specifiers from the dependency list. The versions to install will be taken from the lockfile
 | 
			
		||||
directly:
 | 
			
		||||
 | 
			
		||||
```ini
 | 
			
		||||
[testenv]
 | 
			
		||||
description = Run the tests
 | 
			
		||||
require_locked_deps = true
 | 
			
		||||
deps =
 | 
			
		||||
    pytest
 | 
			
		||||
    pytest-cov
 | 
			
		||||
    black
 | 
			
		||||
    pylint
 | 
			
		||||
    mypy
 | 
			
		||||
commands = ...
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
To require specific dependencies be installed from the Poetry lockfile, and let the rest be
 | 
			
		||||
installed using the default Tox installation method, add the suffix `@poetry` to the dependencies.
 | 
			
		||||
In the example below the `pytest`, `pytest-cov`, and `black` dependencies will be installed using
 | 
			
		||||
the lockfile while `pylint` and `mypy` will be installed using the versions specified here:
 | 
			
		||||
 | 
			
		||||
```ini
 | 
			
		||||
[testenv]
 | 
			
		||||
description = Run the tests
 | 
			
		||||
require_locked_deps = true
 | 
			
		||||
deps =
 | 
			
		||||
    pytest@poetry
 | 
			
		||||
    pytest-cov@poetry
 | 
			
		||||
    black@poetry
 | 
			
		||||
    pylint >=2.5.0
 | 
			
		||||
    mypy == 0.770
 | 
			
		||||
commands = ...
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**Note:** Regardless of the settings outlined above, all dependencies of the project package (the
 | 
			
		||||
one Tox is testing) will always be installed from the lockfile.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
After installing the plugin to a project, your Tox automation is already benefiting from the
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user