mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2024-10-29 19:47:00 +00:00
Update quickstart docs with new config option usage with locked_deps
This commit is contained in:
parent
b6ef671e67
commit
5c5536581b
40
README.md
40
README.md
@ -60,45 +60,39 @@ If using Pip, ensure that the plugin is installed to the same environment as Tox
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
To require a Tox environment install all it's dependencies from the Poetry lockfile, add the
|
To add dependencies from the lockfile to a Tox environment, add the option `locked_deps`
|
||||||
`require_locked_deps = true` option to the environment configuration and remove all version
|
to the environment configuration and list names of dependencies (with no version
|
||||||
specifiers from the dependency list. The versions to install will be taken from the lockfile
|
specifier) under it:
|
||||||
directly:
|
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[testenv]
|
[testenv]
|
||||||
description = Run the tests
|
description = Some very cool tests
|
||||||
require_locked_deps = true
|
locked_deps =
|
||||||
deps =
|
|
||||||
pytest
|
|
||||||
pytest-cov
|
|
||||||
black
|
black
|
||||||
pylint
|
pylint
|
||||||
mypy
|
mypy
|
||||||
commands = ...
|
commands = ...
|
||||||
```
|
```
|
||||||
|
|
||||||
To require specific dependencies be installed from the Poetry lockfile, and let the rest be
|
The standard `deps` option can be used in parallel with the `locked_deps` option to
|
||||||
installed using the default Tox installation backend, add the suffix `@poetry` to the dependencies.
|
install unlocked dependencies (dependencies not in the lockfile) alongside locked
|
||||||
In the example below the `pytest`, `pytest-cov`, and `black` dependencies will be installed from
|
dependencies:
|
||||||
the lockfile while `pylint` and `mypy` will be installed using the versions specified here:
|
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[testenv]
|
[testenv]
|
||||||
description = Run the tests
|
description = Some very cool tests
|
||||||
require_locked_deps = true
|
locked_deps =
|
||||||
|
black
|
||||||
|
pylint
|
||||||
|
mypy
|
||||||
deps =
|
deps =
|
||||||
pytest@poetry
|
pytest == 6.1.1
|
||||||
pytest-cov@poetry
|
pytest-cov >= 2.10, <2.11
|
||||||
black@poetry
|
|
||||||
pylint >=2.5.0
|
|
||||||
mypy == 0.770
|
|
||||||
commands = ...
|
commands = ...
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, to quickly install all Poetry dev-dependencies to a Tox environment, add the
|
Alternatively, to quickly install all Poetry dev-dependencies to a Tox environment, add the
|
||||||
`install_dev_deps = true` option to the environment configuration. This option can be used either
|
`install_dev_deps = true` option to the environment configuration.
|
||||||
with the `require_locked_deps = true` option or without it
|
|
||||||
|
|
||||||
**Note:** Regardless of the settings outlined above, all dependencies of the project package (the
|
**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.
|
one Tox is testing) will always be installed from the lockfile.
|
||||||
@ -372,7 +366,7 @@ dependencies:
|
|||||||
[testenv]
|
[testenv]
|
||||||
description = Some very cool tests
|
description = Some very cool tests
|
||||||
require_locked_deps = true
|
require_locked_deps = true
|
||||||
deps =
|
locked_deps =
|
||||||
foo
|
foo
|
||||||
bar
|
bar
|
||||||
baz
|
baz
|
||||||
|
Loading…
Reference in New Issue
Block a user