Skip to content

Commit f974334

Browse files
committed
TL: fixing source code link in RTD documentation
1 parent 2608b6e commit f974334

3 files changed

Lines changed: 31 additions & 6 deletions

File tree

docs/.readthedocs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ build:
99

1010
python:
1111
install:
12-
- requirements: docs/requirements.txt
12+
- method: pip
13+
path: .
14+
extra_requirements:
15+
- docs
1316

1417
sphinx:
1518
configuration: docs/conf.py

docs/devdoc/updateDoc.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,28 @@
44

55
## Generating local docs
66

7-
First you need a few dependencies (besides those for `qmat`),
8-
which are listed in the [`docs/requirements.txt`](https://github.com/Parallel-in-Time/qmat/blob/main/docs/requirements.txt) file.
9-
You can install those using your favorite python package manager (`pip`, `conda`, ...).
7+
First you need a few dependencies (besides those for `qmat`). For that download
8+
the [source code](https://github.com/Parallel-in-Time/qmat) and install the package with all the
9+
`docs` dependencies locally :
1010

11-
Then to generate the documentation website locally, simply run (from the root `qmat` repo) :
11+
```bash
12+
git clone https://github.com/Parallel-in-Time/qmat.git
13+
cd qmat
14+
pip install -e .[docs]
15+
```
16+
17+
> 📜 The `-e` option ensures that your installed python package is directly linked to the sources (no copy of code),
18+
> hence modifying any part of the source code (in particular the documentation)
19+
> will be taken into account when `sphinx` will parse the code docstring.
20+
21+
Then to generate the documentation website locally, simply run :
1222

1323
```bash
1424
cd docs
1525
make html
1626
```
1727

18-
This builds the sphinx documentation automatically in a `_build` folder,
28+
This builds the `sphinx` documentation automatically in a `_build` folder,
1929
and you can view it by opening `docs/_build/html/index.html` using your favorite browser.
2030

2131
## Updating a tutorial

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ classifiers = [
3232
]
3333

3434
[project.optional-dependencies]
35+
docs = [
36+
"setuptools >= 18.0",
37+
"sphinx",
38+
"sphinx-autoapi",
39+
"nbsphinx",
40+
"pygments >= 2.4.1",
41+
"sphinx_rtd_theme >= 1.0.0",
42+
"sphinx-gallery < 0.11.0",
43+
"sphinxcontrib-video",
44+
"myst-parser",
45+
"sphinx-favicon"
46+
]
3547
test = [
3648
"flake8",
3749
"pytest",

0 commit comments

Comments
 (0)