-
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
-E
ignored when using poetry.group
#4897
Comments
To answer the previous issue objection: At no point in the doc is explained that
The doc say those deps can be used for tests but not that they have to. Additionally, even global dependencies have a "default" group, which indicates group are not limited to developpement. From the doc:
Additionally, other users seems to understand like me that |
Turns out groups and extras can't be used together in pyproject.toml by poetry, see python-poetry/poetry#4897. Changed things around so that `pip install .[docs]` works!
Getting our documentation built on Readthedocs following https://jupyterbook.org/en/stable/publish/readthedocs.html. Also documenting how to build the docs locally. * 🔧 Configure docs extras dependencies correctly Turns out groups and extras can't be used together in pyproject.toml by poetry, see python-poetry/poetry#4897. Changed things around so that `pip install .[docs]` works! * 🔧 Configure readthedocs build Getting our documentation on Readthedocs! Following https://jupyterbook.org/en/stable/publish/readthedocs.html * 🔥 Remove deploy-docs GitHub Actions workflow Just use readthedocs. Sadly this means we can't skip docs build for files outside the docs/ folder anymore. * 📝 Document how to run things locally Sneaking in some extra notes on how people can clone the repo, setup a virtual environment, install dependencies and build the jupyter book docs!
I am not sure if this is the right issue to ask this, but here it goes. I am a little confused about this. I am on the 1.2.0b2 and using dependency groups. My use case is the following: The groups are not seen as extras if I want to Extras were installed as extras when groups didn't exist using What is the correct procedure here? Thanks! |
Hello,
A PR to improve this in the documentation is always welcome 😃 fin swimmer |
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. |
Reposting #4891 with more info, as I don't think the issue has been solved.
Issue
When
[tool.poetry.extras]
is used to refer to deps defined inside[tool.poetry.group.group0.dependencies]
, those deps are ignored.Reproduction instrutions:
I would expect the command to install
tmp-poetry[extra_deps]
which should installnumpy
. However, this silently fail to install the package.The extra deps is ignored and not installed,
poetry show
will display nothing.poetry run python -c "import numpy"
will fail withModuleNotFoundError
Note: removing the groups and using instead
numpy={version="*", optional=true}
will work.Why using dependency group with extra ?
The reason I'm trying to use dependency group is that it greatly reduce boilerplate of defining deps
Without dependency group:
With dependency group:
Resolving this issue
There are 2 ways to resolve this issue:
extras
andgroup
are incompatible features, in which casepoetry
should raise an explicit error message (rather than silently skipping deps installation)extras
can use deps defined ingroup
(best), in which case the deps should be correctly installed.Of course 2) should be greatly preferred.
The text was updated successfully, but these errors were encountered: