From 8db651bdac1023cdcfa27b3093655ca54bad1cc5 Mon Sep 17 00:00:00 2001 From: sinoroc Date: Wed, 14 Oct 2020 14:07:17 +0200 Subject: [PATCH] Add 'README' table clarifying settings combination --- README.rst | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 911e9cc..513cf16 100644 --- a/README.rst +++ b/README.rst @@ -42,8 +42,6 @@ Set the ``testenv`` setting ``poetry_experimental_add_locked_dependencies`` to ` # ... poetry_experimental_add_locked_dependencies = True -If ``poetry_add_dev_dependencies`` is set as well then the development dependencies are added with the version from the *lockfile*. - ``poetry_add_dev_dependencies`` ------------------------------- @@ -57,6 +55,50 @@ Set the ``testenv`` setting ``poetry_add_dev_dependencies`` to ``True`` to let T poetry_add_dev_dependencies = True +Dependency settings combination +------------------------------- + +The settings ``poetry_experimental_add_locked_dependencies`` and ``poetry_add_dev_dependencies`` are independent and can be used in combination. The following table shows the expected result for each possible combination of these two settings. + +The *source file* column shows which file is used as source for the dependencies. The ``deps`` column shows an example of what dependencies are expected to be added to ``deps`` for that test environment. In that example ``Lib = '~1.0'`` is a mandatory dependency locking to ``Lib==1.2.3`` and ``Dev = '~3.0'`` is a development dependency locking to ``Dev==3.2.1``. + +.. |arrow| unicode:: 0x21d2 + +.. list-table:: + :header-rows: 1 + + * - ``*_locked_dependencies`` + - ``*_dev_dependencies`` + - |arrow| + - source file + - |arrow| + - resulting ``deps`` + * - ``False`` + - ``False`` + - + - ``pyproject.toml`` + - + - ``Lib~=1.0`` + * - ``True`` + - ``False`` + - + - ``poetry.lock`` + - + - ``Lib==1.2.3`` + * - ``False`` + - ``True`` + - + - ``pyproject.toml`` + - + - ``Lib~=1.0``, ``Dev~=3.0`` + * - ``True`` + - ``True`` + - + - ``poetry.lock`` + - + - ``Lib==1.2.3``, ``Dev==3.2.1`` + + ``poetry_use_source_repos`` ---------------------------