mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2025-01-15 08:43:29 +00:00
Deprecate install_dev_deps config option
This commit is contained in:
parent
453b575159
commit
b631a962b2
11
README.md
11
README.md
@ -41,9 +41,9 @@ release history.
|
||||
- Manage package versions in exactly one place and with exactly one tool: Poetry.
|
||||
- Ensure CI/CD and other automation tools are using the same package versions that you are
|
||||
in your local development environment.
|
||||
- Add only the packages you need to a Tox test environment, instead of everything in your
|
||||
lockfile.
|
||||
- Directly integrate with Poetry, re-using your existing package indexes and credentials
|
||||
- Add only the packages or custom groups you need to a Tox test environment, instead of
|
||||
everything in your lockfile.
|
||||
- Directly integrate with Poetry, re-using your existing package indexes and credentials,
|
||||
with no additional configuration.
|
||||
- Wherever possible, built-in Tox config options are always respected and their behavior
|
||||
kept consistent.
|
||||
@ -198,11 +198,14 @@ configuration section.
|
||||
| :--------------------- | :-----: | :-----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `locked_deps` | List | `[]` | Names of packages to install to the test environment from the Poetry lockfile. Transient dependencies (packages required by these dependencies) are automatically included. |
|
||||
| `require_locked_deps` | Boolean | False | Whether the plugin should block attempts to install unlocked dependencies to the test environment. If enabled, then the [`tox_testenv_install_deps`](https://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_install_deps) plugin hook will be intercepted and an error will be raised if the test environment has the `deps` option configured. |
|
||||
| `install_dev_deps` | Boolean | False | Whether all of the Poetry dev-dependencies should be installed to the test environment. |
|
||||
| `install_project_deps` | Boolean | True | Whether all of the Poetry primary dependencies for the project package should be installed to the test environment. |
|
||||
| `require_poetry` | Boolean | False | Whether Tox should be forced to fail if the plugin cannot import Poetry locally. If `False` then the plugin will be skipped for the test environment if Poetry cannot be imported. If `True` then the plugin will force the environment to error and the Tox run to fail. |
|
||||
| `poetry_dep_groups` | List | `[]` | Names of Poetry dependency groups specified in `pyproject.toml` to install to the test environment. |
|
||||
|
||||
> **Note:** The `install_dev_deps` configuration option is deprecated and will be removed in
|
||||
> version 1.0.0. Please set `poetry_dep_groups = [dev]` in `tox.ini` for environments that
|
||||
> install the development dependencies.
|
||||
|
||||
### Runtime Options
|
||||
|
||||
All arguments listed below can be passed to the `tox` command to modify runtime behavior
|
||||
|
@ -115,7 +115,7 @@ def tox_addoption(parser: ToxParser):
|
||||
name="install_dev_deps",
|
||||
type="bool",
|
||||
default=False,
|
||||
help="Automatically install all Poetry development dependencies to the environment",
|
||||
help="(deprecated) Automatically install all Poetry development dependencies to the environment",
|
||||
)
|
||||
|
||||
parser.add_testenv_attribute(
|
||||
|
@ -59,6 +59,13 @@ def check_preconditions(venv: ToxVirtualEnv, action: ToxAction) -> "_poetry.Poet
|
||||
"be removed in version 1.0.0. Please use the '--parallel-install-threads' option."
|
||||
)
|
||||
|
||||
if venv.envconfig.install_dev_deps:
|
||||
logger.warning(
|
||||
"DEPRECATION: The 'install_dev_deps' option is deprecated and will be removed in "
|
||||
"version 1.0.0. Please update test environments that install development dependencies "
|
||||
"to set the 'poetry_dev_groups = [dev]' option in tox.ini"
|
||||
)
|
||||
|
||||
from tox_poetry_installer import _poetry
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user