Closed hrshdhgd closed 1 year ago
Solution:
A new design of the toml file where:
extras
section [[tool.poetry.extras]
]
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies] sphinx = {version = ">=6.1.3"} sphinx-rtd-theme = {version = ">=1.0.0"} sphinx-autodoc-typehints = {version = ">=1.2.0"} sphinx-click = {version = ">=4.3.0"} myst-parser = {version = ">=0.18.1"}
- `optional` packages are declared as shown above
I am removing the
optional=True
fromtool.poetry.group.dev.dependencies
.Reason:
I converted
sssom-py
to be a product of this cookiecutter. When Ipoetry install
for the first time, all's well. But when I do it the second time or run any of the following:poetry install --all-extras
poetry install -E docs
poetry install -E tests
It deletes
virtualenv
and 3 other packages.The next time I run any
poetry
command it errors out sayingvirtualenv
doesn't exist.The only fix is to reinstall poetry and start over again.
Investigation:
It seemed like in the
poetry.lock
file all the libraries that were uninstalled hadoptional=True
. When I took them out from the toml file.Using the latest version of poetry v1.5.1