As @flor14 mentioned in #122, --group is now used to install dev dependencies. However, I don't think how we are currently doing this is really taking advantage of this new feature. The idea here is that we can use --group to create different dependency tables in pyproject.toml that allows us to install the package with or without certain dependency groups (see docs here).
Thus, I think we should update the book further so we do take advantage of this feature. In particular, the two groups that I think that would be the most beneficial would be docs and test. The commands to create these tables and add dependencies under the groups would be something like this:
poetry add pytest --group test
That would create a table like this in pyproject.toml
[tool.poetry.group.test.dependencies]
pytest = "^6.0.0"
Then you can use poetry install --without test to install the package without installing all the test infrastructure, for example. A similar thing could be done for the docs. You can also make groups optional, and then they would only be installed if you ran poetry install --with GROUPNAME (see examples here).
What do you think @TomasBeuzen ? Do you think this is worthwhile? If we don't do this, and explain all this, it makes some commonly used commands in some files seem quite mysterious, for example this command in the recommended Poetry readthedocs.yml file (from the RTD docs page):
poetry install --with docs
As @flor14 mentioned in #122,
--groupis now used to install dev dependencies. However, I don't think how we are currently doing this is really taking advantage of this new feature. The idea here is that we can use--groupto create different dependency tables inpyproject.tomlthat allows us to install the package with or without certain dependency groups (see docs here).Thus, I think we should update the book further so we do take advantage of this feature. In particular, the two groups that I think that would be the most beneficial would be
docsandtest. The commands to create these tables and add dependencies under the groups would be something like this:That would create a table like this in
pyproject.tomlThen you can use
poetry install --without testto install the package without installing all the test infrastructure, for example. A similar thing could be done for the docs. You can also make groups optional, and then they would only be installed if you ranpoetry install --with GROUPNAME(see examples here).What do you think @TomasBeuzen ? Do you think this is worthwhile? If we don't do this, and explain all this, it makes some commonly used commands in some files seem quite mysterious, for example this command in the recommended Poetry
readthedocs.ymlfile (from the RTD docs page):