Support Groups as Extras
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Feature Request
There seems to be a few places where this issue is mentioned, but I don’t see anything explicitly tracking it.
(Specifically @matthijskooijman’s comment (point 2) 1644#issuecomment-895848818)
The new groups
functionality is very helpful when managing packages installed while developing a project, but seems to miss a pretty good use case - basically using groups
in place of extras
when installing this package in another environment.
Instead of having to do:
# myproject_1
[tool.poetry.dependencies]
package_1 = "^0.0.1"
[tool.poetry.group.group_a]
optional = true
# this lets someone else develop this project with optional deps
[tool.poetry.group.group_a.dependencies]
package_2 = {version = "^0.0.2", optional = true}
package_3 = {version = "^0.0.3", optional = true}
# need to explicitly define "extras" for other packages install optional deps
[tool.poetry.extras]
group_a = ["package_2", "package_3"]
It would be cleaner (and make more sense I think, once groups
is out of preview), if we could just do:
# myproject_1
[tool.poetry.dependencies]
package_1 = "^0.0.1"
[tool.poetry.group.group_a]
optional = true
[tool.poetry.group.group_a.dependencies]
package_2 = "^0.0.2"
package_3 = "^0.0.3"
# didn't need to explicitly define "extras", or individual packages as "optional"
And then in myproject_2
:
# myproject_2
[tool.poetry.dependencies]
myproject_1 = {version = "^1.0.0", extras = ["group_a"]}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:20
- Comments:11 (3 by maintainers)
Top Results From Across the Web
[BuddyPress Groups Extras] Support - WordPress.org
BP Group Extra not showing on group menu. Started by: thbob ... How to edit group fields visibility for all groups ... Ongoing...
Read more >Section 2. Creating and Facilitating Peer Support Groups
Learn how to bring together and facilitate support and encouragement among a group of people who share common problems and experiences.
Read more >What's the difference between extras and groups in poetry?
'group' is designed for internal developer, it applies for both package and application development. However, 'extra' is designed for external ...
Read more >7 Best Anxiety Support Groups of 2022 - Healthline
A quick look at the best anxiety support groups of 2021 · Best overall: Support Groups Central · Best online discussion forum: Anxiety...
Read more >Support groups - Better Health Channel
There are lots of support groups in Australia. Many have regular meetings held in places like healthcare services, community centres, local halls or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Let say I want to
pip install myproject_1[group_a]
For now, it seems I have to write it this way:It would be nice if I could write it concisely like:
There will be many cases in which you want to verify dependencies expressed in extras during development, so in many cases extras will soon become groups. Therefore, it would be very useful if we could express it as above.
Optional dependencies outside the main group are meaningless in terms of extras. Move it to main and things will work as you expect.