Add doctest integration to test suite and fix docs build - #57
Conversation
Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
…toml Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds doctest execution to the Julia test suite to validate documentation examples, and adjusts the docs environment to resolve build issues by removing unused dependencies.
Changes:
- Integrates a new doctest runner (
test/integration/docs.jl) into the integration test suite. - Adds
Documentertotest/Project.tomlso doctests can run duringPkg.test. - Removes
DocumenterDiagramsandQUBOToolsfrom the docs environment dependencies and updatesdocs/make.jlaccordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test/integration/integration.jl |
Adds doctest integration into the existing integration test entrypoint. |
test/integration/docs.jl |
Implements a test_doctest() helper that runs Documenter.doctest. |
test/Project.toml |
Adds Documenter to test dependencies and compat. |
docs/make.jl |
Removes DocumenterDiagrams usage to fix docs build issues. |
docs/Project.toml |
Removes unused docs dependencies (including QUBOTools and DocumenterDiagrams). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
bernalde
left a comment
There was a problem hiding this comment.
I ran the full package test suite (Pkg.test(), 608/608 passing) and a CI-like docs build (Pkg.develop(path=pwd()); include("docs/make.jl")). The package tests pass, but I still found two blocking regressions in the PR changes.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
bernalde
left a comment
There was a problem hiding this comment.
Addressed the latest Copilot review in e2b27de and merged origin/main to resolve the docs/make.jl conflict. The docs build path now logs the expected non-deployment case at info level, and the PR description has been updated to match the current branch state.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
push_preview = trueis already configured)Pkg.test()@exampleblocksdocs/build.jltest/integration/docs.jlDocumenterDiagramsdependencyQUBOToolsindocs/Project.tomland document the local docs setupSummary of Changes
Documentation deployment with PRs:
.github/workflows/docs.ymlalready deploys PR previews throughpush_preview = true, so no workflow change was needed there.Examples in the docs now serve as tests:
Pkg.test()runs the full Documenter build throughtest/integration/docs.jlanddocs/build.jl, which exercises both docstring doctests and the manual@exampleblocks.Shared docs build logic:
docs/make.jland the test suite now call the samebuild_docshelper, so local docs builds, CI docs builds, and docs tests use the same configuration.Docs environment cleanup:
DocumenterDiagramswas removed because it is unused.QUBOToolsremains indocs/Project.tomlso the docs environment explicitly declares the package it builds.Local docs workflow:
README.mdnow documents the local setup commands for the docs environment.Fixes #26