Skip to content

Commit fca7f89

Browse files
committed
build: add docs extra to build the documentation
1 parent 5c2afd1 commit fca7f89

File tree

4 files changed

+56
-47
lines changed

4 files changed

+56
-47
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
key: venv-${{ hashFiles('poetry.lock') }}
4343

4444
- name: Install the project dependencies
45-
run: poetry install
45+
run: poetry install -E docs
4646

4747
- name: Run static analysis and linters
4848
run: poetry run poe check

.readthedocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ python:
2424
install:
2525
- method: pip
2626
path: .
27+
extra_requirements:
28+
- docs

poetry.lock

Lines changed: 44 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,27 @@ scipy = [
5353
{version = "*", python = "<3.12"},
5454
{version = ">=1.11.4", python = ">=3.12"},
5555
]
56+
sphinx = {version = "^7.1.2", optional = true}
57+
docutils = {version = "^0.21.2", optional = true}
58+
numpydoc = {version = "^1.6.0", optional = true}
59+
m2r2 = {version = "^0.3.2", optional = true}
60+
matplotlib = {version = "^3.7.4", optional = true}
5661

5762

5863
[tool.poetry.group.dev.dependencies]
5964
setuptools = "^78.1.0"
6065
pytest = "^8.3.5"
6166
pytest-cov = "^6.1.1"
62-
m2r2 = "^0.3.2"
63-
docutils = "^0.20.0"
64-
sphinx = "^7.1.2"
65-
numpydoc = "^1.6.0"
66-
matplotlib = "^3.7.4"
6767
ruff = "^0.11.5"
6868
mypy = "^1.7.1"
6969
pre-commit = "^4.2.0"
7070
poethepoet = "^0.33.1"
7171

7272

73+
[tool.poetry.extras]
74+
docs = ["sphinx", "docutils", "numpydoc", "m2r2", "matplotlib"]
75+
76+
7377
[build-system]
7478
requires = ["poetry-core", "setuptools"]
7579
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)