Skip to content

Commit 174d145

Browse files
authored
Merge pull request #483 from Sohaibameer204/improve-docs-makefile
Remove docs/Makefile, update root Makefile for docs build, and update.
2 parents e14d1ac + f96447d commit 174d145

File tree

3 files changed

+16
-28
lines changed

3 files changed

+16
-28
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,19 @@ We recommend that your contribution complies with the following guidelines befor
167167

168168
## Building the documentation locally
169169

170-
A local build of the docs is achieved by:
170+
To build the documentation, run from the **project root**:
171171

172172
```bash
173-
cd docs
174173
make html
175174
```
176-
177-
Sometimes not all changes are recognised. In that case run this (again from within the `docs` folder):
178-
175+
To clean and rebuild the documentation from scratch:
179176
```bash
180-
make clean && make html
177+
make cleandocs
178+
make html
181179
```
180+
Docs are built in docs/_build/html, but these docs are not committed to the GitHub repository due to .gitignore.
182181

183-
Docs are built in `docs/_build`, but these docs are _not_ committed to the GitHub repository due to `.gitignore`.
182+
📌 Note: The previous docs/Makefile has been removed. Please use only the root-level Makefile for documentation commands
184183

185184
## Overview of code structure
186185

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: init lint check_lint test
1+
.PHONY: init lint check_lint test uml html cleandocs
22

33
init:
44
python -m pip install -e . --no-deps
@@ -20,3 +20,12 @@ test:
2020

2121
uml:
2222
pyreverse -o png causalpy --output-directory docs/source/_static --ignore tests
23+
24+
# Docs build commands
25+
26+
html:
27+
sphinx-build -b html docs/source docs/_build
28+
29+
cleandocs:
30+
rm -rf docs/_build
31+
rm -rf docs/source/api/generated

docs/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)