Skip to content

Add doctest integration to test suite and fix docs build - #57

Merged
bernalde merged 12 commits into
mainfrom
copilot/write-documentation-for-prs
Mar 12, 2026
Merged

Add doctest integration to test suite and fix docs build#57
bernalde merged 12 commits into
mainfrom
copilot/write-documentation-for-prs

Conversation

Copilot AI commented Dec 3, 2025

Copy link
Copy Markdown
Contributor
  • Review existing documentation infrastructure
  • Confirm documentation previews are already deployed for PRs (push_preview = true is already configured)
  • Add test infrastructure that runs the full documentation build as part of Pkg.test()
    • Add the docs test dependencies needed by the manual @example blocks
    • Factor the shared docs builder into docs/build.jl
    • Run the docs build from test/integration/docs.jl
  • Remove the unused DocumenterDiagrams dependency
  • Keep QUBOTools in docs/Project.toml and document the local docs setup
  • Verify package tests and the docs build

Summary of Changes

  1. Documentation deployment with PRs: .github/workflows/docs.yml already deploys PR previews through push_preview = true, so no workflow change was needed there.

  2. Examples in the docs now serve as tests: Pkg.test() runs the full Documenter build through test/integration/docs.jl and docs/build.jl, which exercises both docstring doctests and the manual @example blocks.

  3. Shared docs build logic: docs/make.jl and the test suite now call the same build_docs helper, so local docs builds, CI docs builds, and docs tests use the same configuration.

  4. Docs environment cleanup: DocumenterDiagrams was removed because it is unused. QUBOTools remains in docs/Project.toml so the docs environment explicitly declares the package it builds.

  5. Local docs workflow: README.md now documents the local setup commands for the docs environment.

Fixes #26

Copilot AI and others added 4 commits December 3, 2025 20:05
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>
Copilot AI changed the title [WIP] Add documentation that is deployed with each new PR Add doctest integration to test suite and fix docs build Dec 3, 2025
Copilot AI requested a review from bernalde December 3, 2025 20:32
Comment thread docs/Project.toml Outdated
Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
Copilot AI requested a review from bernalde December 3, 2025 21:16
@bernalde
bernalde marked this pull request as ready for review January 29, 2026 22:35
@bernalde
bernalde requested a review from Copilot March 10, 2026 22:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Documenter to test/Project.toml so doctests can run during Pkg.test.
  • Removes DocumenterDiagrams and QUBOTools from the docs environment dependencies and updates docs/make.jl accordingly.

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.

Comment thread test/integration/docs.jl Outdated
Comment thread test/integration/docs.jl Outdated
Comment thread docs/Project.toml

@bernalde bernalde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread test/integration/docs.jl Outdated
Comment thread docs/Project.toml
Copilot AI requested a review from bernalde March 12, 2026 16:37
Copilot stopped work on behalf of bernalde due to an error March 12, 2026 16:38

@bernalde bernalde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the outstanding review comments in f96856c. The package tests now run the full docs build, and the local docs commands from the README were verified as well.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/build.jl Outdated
Comment thread docs/Project.toml

@bernalde bernalde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/build.jl Outdated
Comment thread docs/src/manual/7-analysis.md Outdated
@bernalde
bernalde merged commit e75d7ed into main Mar 12, 2026
4 checks passed
@bernalde
bernalde deleted the copilot/write-documentation-for-prs branch March 18, 2026 22:14
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.

Write Documentation

3 participants