Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ The project provides several ``make`` targets to help with development:
* ``make test`` - Run the test suite with pytest using the default Python version.
For testing across multiple Python versions, use ``tox`` instead.

* ``make docs`` / ``make docs-ci`` - Build the Sphinx documentation locally (with
warnings treated as errors). API stub pages are generated with
``python -m sphinx.ext.apidoc`` against the ``multibase`` package, matching
the Read the Docs ``pre_build`` job.

* ``make pr`` - Run a complete pre-PR check: clean build artifacts, fix formatting,
run linting, type checking, and tests. This is the recommended command to run
before submitting a pull request.
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test:
docs-ci:
rm -f docs/multibase.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ multibase
python -m sphinx.ext.apidoc -o docs/ multibase
$(MAKE) -C docs clean
mkdir -p docs/_static
$(MAKE) -C docs html SPHINXOPTS="-W"
Expand All @@ -92,8 +92,11 @@ validate-newsfragments:
towncrier build --draft --version preview

build-docs:
sphinx-apidoc -o docs/ . "*conftest*" tests/
rm -f docs/multibase.rst
rm -f docs/modules.rst
python -m sphinx.ext.apidoc -o docs/ multibase
$(MAKE) -C docs clean
mkdir -p docs/_static
$(MAKE) -C docs html
$(MAKE) -C docs doctest

Expand Down
1 change: 1 addition & 0 deletions newsfragments/31.docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Aligned local documentation builds with Read the Docs by using ``python -m sphinx.ext.apidoc`` for the ``multibase`` package.
Loading