Skip to content

Update Makefile doc target to run doctest then html builders - #193

Draft
EH-MLS with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-4f94a9ca-2526-4b79-a27b-606ab933eda3
Draft

Update Makefile doc target to run doctest then html builders#193
EH-MLS with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-4f94a9ca-2526-4b79-a27b-606ab933eda3

Conversation

Copilot AI commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

Updates the doc target in the Makefile to run both the doctest and html sphinx builders sequentially, as requested in the issue.

Changes Made

The doc target now executes two sphinx-build commands:

  1. First: Runs the doctest builder to validate code examples in documentation
  2. Second: Runs the html builder to generate the HTML documentation
doc:
	uv run --no-sync sphinx-build -M doctest docs/source docs/build/ -W --keep-going --fresh-env
	uv run --no-sync sphinx-build -M html docs/source docs/build/ -W --keep-going --fresh-env

Both commands use the same arguments (-W --keep-going --fresh-env) to ensure consistent behavior and error handling.

Benefits

  • Documentation Quality: Doctest validation ensures code examples in the documentation are correct and up-to-date
  • CI/CD Integration: Both validation and generation happen in a single make doc command
  • Consistency: Maintains the same sphinx-build arguments for both builders

Testing

  • ✅ Verified the updated target runs both builders successfully
  • ✅ Confirmed all other Makefile targets remain unchanged and functional
  • ✅ Tested with make doctest which depends on the doc target
  • ✅ All existing tests continue to pass

This is a minimal, surgical change that adds doctest validation to the documentation build process without affecting any other functionality.

Co-authored-by: eh-main-bot <171766998+eh-main-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Makefile 'doc' target to run doctest before html Update Makefile doc target to run doctest then html builders Jun 10, 2025
Copilot AI requested a review from EH-MLS June 10, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants