Skip to content

Commit ba9cf07

Browse files
authored
Merge pull request #786 from gabalafou/how-to-build-docs
Add instructions to the docs on how to build the docs locally
2 parents cf62299 + 8067126 commit ba9cf07

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

.readthedocs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ python:
99
- requirements: util/readthedocs/requirements.txt
1010
- method: pip
1111
path: .
12+
13+
sphinx:
14+
configuration: doc/source/conf.py

CONTRIBUTING.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Coding guidelines
4343
provided in tutorial format and/or in module docstrings. A guide on how to
4444
write documentation is given in the `numpydoc docstring guide`_.
4545

46+
Looking for `how to build the docs`_?
47+
4648
3. Code style
4749
Uniformity of style in which code is written is important to others trying
4850
to understand the code. PyWavelets follows the standard Python guidelines
@@ -64,3 +66,5 @@ Coding guidelines
6466
.. _pyflakes: http://pypi.python.org/pypi/pyflakes
6567

6668
.. _testing guidelines: https://github.com/numpy/numpy/blob/main/doc/TESTS.rst.txt
69+
70+
.. _how to build the docs: ./doc/source/dev/how_to_build_the_docs.rst

doc/source/dev/building_extension.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ To verify the installation run the following command::
2020

2121
pytest .
2222

23-
To build docs::
24-
25-
cd doc
26-
make html
2723

2824
Installing a development version
2925
--------------------------------
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. _dev-building-docs:
2+
3+
How to build the docs locally
4+
=============================
5+
6+
After preparing your Windows or Linux environment, install Spin and Ninja::
7+
8+
pip install spin ninja
9+
10+
Then install the documentation-related dependencies::
11+
12+
pip install -r util/readthedocs/requirements.txt
13+
14+
Then tell Spin to build the Sphinx documentation::
15+
16+
spin docs
17+
18+
Then open a webserver to serve the built HTML files::
19+
20+
python -m http.server -d doc/build/html 8000
21+
22+
And open your local docs in a web browser by visiting http://localhost:8000/.
23+
24+
If it's your first time building the docs, it will take a while but should go
25+
faster on subsequent re-builds.

doc/source/dev/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on Windows and Linux.
1717
installing_build_dependencies
1818
building_extension
1919
testing
20+
how_to_build_the_docs
2021
how_to_release
2122

2223
Something not working?

0 commit comments

Comments
 (0)