From 0251275dbf178cf83a2cba2ba5bde8d90be66145 Mon Sep 17 00:00:00 2001 From: Sohaibameer204 Date: Fri, 30 May 2025 20:10:40 +0500 Subject: [PATCH 1/2] Remove docs/Makefile, update root Makefile for docs build, and update CONTRIBUTING.md instructions --- CONTRIBUTING.md | 13 ++++++------- Makefile | 11 ++++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56734ab1..762f82c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -167,20 +167,19 @@ We recommend that your contribution complies with the following guidelines befor ## Building the documentation locally -A local build of the docs is achieved by: +To build the documentation, run from the **project root**: ```bash -cd docs make html ``` - -Sometimes not all changes are recognised. In that case run this (again from within the `docs` folder): - +To clean and rebuild the documentation from scratch: ```bash -make clean && make html +make cleandocs +make html ``` + Docs are built in docs/_build/html, but these docs are not committed to the GitHub repository due to .gitignore. -Docs are built in `docs/_build`, but these docs are _not_ committed to the GitHub repository due to `.gitignore`. + 📌 Note: The previous docs/Makefile has been removed. Please use only the root-level Makefile for documentation commands ## Overview of code structure diff --git a/Makefile b/Makefile index 352f8a09..9f2b1971 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: init lint check_lint test +.PHONY: init lint check_lint test uml html cleandocs init: python -m pip install -e . --no-deps @@ -20,3 +20,12 @@ test: uml: pyreverse -o png causalpy --output-directory docs/source/_static --ignore tests + +# Docs build commands + +html: + sphinx-build -b html docs/source docs/_build + +cleandocs: + rm -rf docs/_build + rm -rf docs/source/api/generated From 9aeddb528907bef7dc5a196103a27183205fe0f7 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 6 Jun 2025 12:42:09 +0100 Subject: [PATCH 2/2] delete docs/Makefile --- docs/Makefile | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 docs/Makefile diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 92dd33a1..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)