{"id":20060744,"url":"https://github.com/sinoroc/tox-poetry-dev-dependencies","last_synced_at":"2025-05-05T15:33:20.960Z","repository":{"id":56250352,"uuid":"294467416","full_name":"sinoroc/tox-poetry-dev-dependencies","owner":"sinoroc","description":"Tox plugin to help working with Poetry-based projects","archived":false,"fork":false,"pushed_at":"2020-11-18T14:21:26.000Z","size":59,"stargazers_count":15,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"develop-0.0.x","last_synced_at":"2025-04-16T01:51:38.790Z","etag":null,"topics":["poetry","python-poetry","tox","tox-plugin"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/tox-poetry-dev-dependencies/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinoroc.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-10T16:44:27.000Z","updated_at":"2023-03-02T16:23:56.000Z","dependencies_parsed_at":"2022-08-15T15:30:49.359Z","dependency_job_id":null,"html_url":"https://github.com/sinoroc/tox-poetry-dev-dependencies","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinoroc%2Ftox-poetry-dev-dependencies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinoroc%2Ftox-poetry-dev-dependencies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinoroc%2Ftox-poetry-dev-dependencies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinoroc%2Ftox-poetry-dev-dependencies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinoroc","download_url":"https://codeload.github.com/sinoroc/tox-poetry-dev-dependencies/tar.gz/refs/heads/develop-0.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252524307,"owners_count":21762072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["poetry","python-poetry","tox","tox-plugin"],"created_at":"2024-11-13T13:16:38.137Z","updated_at":"2025-05-05T15:33:20.710Z","avatar_url":"https://github.com/sinoroc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"..\n\n\n.. contents::\n    :backlinks: none\n\n\nIntroduction\n============\n\nTox plugin to help working with Poetry-based projects.\n\n\nRepositories\n------------\n\nDistributions:\n\n* https://pypi.org/project/tox-poetry-dev-dependencies/\n\n\nSource code:\n\n* https://github.com/sinoroc/tox-poetry-dev-dependencies\n* https://gitlab.com/sinoroc/tox-poetry-dev-dependencies\n\n\nUsage\n=====\n\nBy default the plugin does not do anything. Use one of the following settings to activate the corresponding features.\n\n\n``poetry_experimental_add_locked_dependencies``\n-----------------------------------------------\n\nSet the ``testenv`` setting ``poetry_experimental_add_locked_dependencies`` to ``True`` to let Tox add Poetry's locked dependencies from the *lockfile* to the ``deps`` list in the test environment.\n\n.. code::\n\n    [testenv:example]\n    # ...\n    poetry_experimental_add_locked_dependencies = True\n\n\n``poetry_add_dev_dependencies``\n-------------------------------\n\nSet the ``testenv`` setting ``poetry_add_dev_dependencies`` to ``True`` to let Tox add Poetry's development dependencies to the ``deps`` list in the test environment.\n\n.. code::\n\n    [testenv:example]\n    # ...\n    poetry_add_dev_dependencies = True\n\n\nDependency settings combination\n-------------------------------\n\nThe 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.\n\nThe *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``.\n\n.. |downwards-double-arrow| unicode:: 0x21d3\n\n.. list-table::\n    :header-rows: 2\n    :stub-columns: 1\n\n    *   - ``*_locked_dependencies``\n        - ``False``\n        - ``True``\n        - ``False``\n        - ``True``\n    *   - ``*_dev_dependencies``\n        - ``False``\n        - ``False``\n        - ``True``\n        - ``True``\n    *   - |downwards-double-arrow|\n        -\n        -\n        -\n        -\n    *   - read from file\n        - *none*\n        - ``poetry.lock``\n        - ``pyproject.toml``\n        - ``poetry.lock``\n    *   - |downwards-double-arrow|\n        -\n        -\n        -\n        -\n    *   - add to ``deps``\n        - *nothing*\n        - ``Lib==1.2.3``\n        - ``Dev~=3.0``\n        - ``Lib==1.2.3``, ``Dev==3.2.1``\n\n\n``poetry_use_source_repos``\n---------------------------\n\nSet the ``testenv`` setting ``poetry_use_source_repos`` to ``pip_env_vars`` to let Tox set the ``PIP_EXTRA_URL`` and ``PIP_EXTRA_INDEX_URL`` environment variables accordingly.\n\n.. code::\n\n    [testenv:example]\n    # ...\n    poetry_use_source_repos = pip_env_vars\n\n\nThis will read sections such as the following from the ``pyproject.toml`` file:\n\n.. code::\n\n    [[tool.poetry.source]]\n    name = \"project-alpha\"\n    url = \"https://alpha.example/simple\"\n    secondary = true\n\n    [[tool.poetry.source]]\n    name = \"project-bravo\"\n    url = \"https://bravo.example/simple\"\n\n    [[tool.poetry.source]]\n    name = \"project-charlie\"\n    url = \"https://charlie.example/simple\"\n    default = true\n\n\nand set the environment variables:\n\n.. code::\n\n    PIP_INDEX_URL=https://charlie.example/simple\n    PIP_EXTRA_INDEX_URL=https://bravo.example/simple https://pypi.org/simple https://alpha.example/simple\n\n\nIf there is at least one non ``secondary`` source repository defined, then pip's default index server (*PyPI* ``https://pypi.org/simple``) is placed in ``PIP_EXTRA_INDEX_URL`` right before any ``secondary`` respository.\n\nIf pip's environment variables are already defined then they are not overwritten. For example in a command like the following, the plugin does not overwrite the environment variable.\n\n.. code::\n\n    PIP_INDEX_URL=https://delta.example/simple tox\n\n\n``poetry_experimental_no_virtual_env``\n--------------------------------------\n\n*Experimental feature*\n\nSet the ``testenv`` setting ``poetry_experimental_no_virtual_env`` to ``True`` to skip the creation of a virtual environment for this test environment.\n\n.. code::\n\n    [testenv:real]\n    deps =\n    poetry_experimental_no_virtual_env = True\n    skip_install = True\n\n\nThis might be useful in cases where all the required dependencies and tools are already available, i.e. they are already installed in global or user *site packages* directory, or maybe they are already installed directly in the system (via ``apt``, ``yum``, ``pacman``, etc.).\n\nFor such environments it might be best to skip the installation of the project (``skip_install``) as well as keeping the list of dependencies empty (``deps``).\n\n\nAppendix\n========\n\nInstallation\n------------\n\nIt is a plugin for Tox and it is available on PyPI, install it however best fits the workflow. A useful thing to know though, is that starting with Tox version *3.8* it is possible to enforce the installation (in an isolated environment) of the plugin directly from within the ``tox.ini`` file, thanks to the ``requires`` setting (Tox *3.2*) and the *auto-provisioning* feature (Tox *3.8*):\n\n.. code::\n\n    [tox]\n    requires =\n        tox-poetry-dev-dependencies\n\n\n* https://tox.readthedocs.io/en/latest/config.html#conf-requires\n* https://tox.readthedocs.io/en/latest/example/basic.html#tox-auto-provisioning\n\n\nSimilar projects\n----------------\n\n* https://pypi.org/project/tox-poetry-installer/\n* https://pypi.org/project/tox-poetry/\n\n\n.. EOF\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinoroc%2Ftox-poetry-dev-dependencies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinoroc%2Ftox-poetry-dev-dependencies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinoroc%2Ftox-poetry-dev-dependencies/lists"}