fix(docs): refactor poetry dependency group
Rename 'doc' group to 'docs' for consistency, this is to follow the
widely accepted convention of using plural nouns groups that contain
multiple items. This change signifies that the 'docs' group includes
a collection of documentation-related dependencies.
Also, ensure that the dependencies are actually conditionally
installed by setting the group as optional. This was missing in the
original change.
Change-Id: I33aa154d849a93bac78d698bbd2eef2f839e8985
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index 26a7f15..4a90f54 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -5,7 +5,6 @@
# Configuration file for the readthedocs deploy
# Available at https://hafnium.readthedocs.io/en/latest/
-
# readthedocs config version
version: 2
@@ -19,7 +18,7 @@
post_create_environment:
- pip install poetry=="1.3.2"
post_install:
- - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with doc
+ - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
sphinx:
configuration: docs/conf.py
diff --git a/docs/getting_started/prerequisites.rst b/docs/getting_started/prerequisites.rst
index d761e9f..f1c398d 100644
--- a/docs/getting_started/prerequisites.rst
+++ b/docs/getting_started/prerequisites.rst
@@ -80,11 +80,11 @@
sudo apt install python3 python3-pip plantuml
curl -sSL https://install.python-poetry.org | python3 -
-To install Python dependencies using Poetry:
+Run the command below to install using Poetry, Python dependencies to build the documentation:
.. code:: shell
- poetry install
+ poetry install --with docs
Poetry will create a new virtual environment and install all dependencies listed
in ``pyproject.toml``. You can get information about this environment, such as
diff --git a/pyproject.toml b/pyproject.toml
index c294aab..34bca8a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -9,7 +9,11 @@
[tool.poetry.dependencies]
python = "^3.8"
-[tool.poetry.group.doc.dependencies]
+
+[tool.poetry.group.docs]
+optional = true
+
+[tool.poetry.group.docs.dependencies]
sphinx = "^5.3.0"
myst-parser = "^0.18.1"
sphinxcontrib-plantuml = "^0.24.1"