python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.73k stars 2.27k forks source link

Add ability to specify a set of dev dependencies to install toghether with all regular dependencies #2628

Closed fredrikaverpil closed 4 years ago

fredrikaverpil commented 4 years ago

Feature Request

I use poetry together with nox or tox. I then run multiple nox or tox sessions in CI, all of them starting with a poetry install. This installation takes up a lot of time, as this will install ~100 packages on my end.

I could look into venv caching, but I would rather start fresh each time and install my package and then a selection packages relevant to my nox or tox session.

I would've wanted to take the approach seen in the Hypermodern Python setup, where you can install one ore more dependencies (and its sub-dependencies) only, and constrain all versions to poetry's lockfile.

So, imagine something like;

$ poetry install --no-dev flake8 mypy pytest

The above would then install my package and its production requirements. But it would also install flake8, mypy and pytest, all constrained to the versions stipulated by poetry.lock.

However, if I want to do this today, I would need to define flake8, mypy and pytest twice in my pyproject.toml file, both as extras/opional under dependencies and again under dev-dependencies.

It would be nice to instead simply be able to pick dev-dependencies already specified.

finswimmer commented 4 years ago

Hello @fredrikaverpil,

your feature request sounds similar to https://github.com/python-poetry/poetry/issues/1644, is it?

fin swimmer

fredrikaverpil commented 4 years ago

Oh, indeed it is. I will close this issue in favor for #1644

Thanks for letting me know!

github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.