-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[>=1.2] Assign project dependencies to 'root' group #5197
Comments
Hello @Cielquan, I guess you are looking for
"Default dependencies" are those listed under One can than combine fin swimmer |
If this behavior stays like it is now, I think this will serve me well. |
Can you elaborate a bit more on that? |
The project, in which the issue arose and brought me to write this issue, was turned back to use poetry 1.1 + extras before your first reply. What I wanted
The issue of 3)To achieve this install set for "testing" in a single command I have to run Quote from the docs:
I would like to have this command sometimes more explicit then implicit. What I mean is the following. Imagine we have a poetry config with a bunch of optional and non-optional groups, like in my actual case. When I now add a new non-optional group If I on the other hand could e.g. just run The PR and my answerI read your initial answer and the PR including its comments. But I think I did not think about this correctly and my answer was wrong. I think the current state would be not sufficient because if I run Further thoughtFor the following I did not search the issues. But coming from the thought-process writing this answer the following came to my mind. This is probably a topic for another discussion. I think a more granular control on what to install and what not would be good. So we can express our installation desire for all areas.:
PackageWe have Package dependenciesWe can install the package dependencies with GroupsHere the foundation of ExtrasWell those are optional my definition so the Conclusion
If we would have those two things I think we could (relative) simply create a call to |
I installed from This installed the default dependencies, the testing group and the package itself. Everything I want it to do. 👍🏾 |
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. |
Feature Request
I like the new dependency groups coming with 1.2. In a project, I use those groups to group the dependencies into groups like testing, coverage, lint, etc. Most of the groups are
optional=false
so they are installed withpoetry install
for the dev venv. But when I want to e.g. test my code with tox I have to list all the groups inpoetry install --without <all groups except testing>
so I only get the package itself and the testing dependencies. There is a flag for excluding the package--no-root
but none to include it.My proposal is to assign all dependencies in the
[tool.poetry.dependencies]
dict to theroot
group. Then one could runpoetry install --only root,testing
for example.--no-root
and--without root
would do the same then.Proposal extended
One could also change
[tool.poetry.dependencies]
to[tool.poetry.group.root.dependencies]
like[tool.poetry.dev-dependencies]
was changed to[tool.poetry.group.dev.dependencies]
. But[tool.poetry.group.root]optional
would always betrue
.Alternative
An alternative would be to add a
--with-root
flag, which would be the opposite of--no-root
. It would only do something if the--only
option is also set, because the package is installed by default otherwise.The text was updated successfully, but these errors were encountered: