Skip to content

Literate cleanup#135

Merged
kdayday merged 2 commits intomainfrom
kd/literate-clean
May 5, 2026
Merged

Literate cleanup#135
kdayday merged 2 commits intomainfrom
kd/literate-clean

Conversation

@kdayday
Copy link
Copy Markdown
Contributor

@kdayday kdayday commented May 5, 2026

Copy link
Copy Markdown

Copilot AI left a comment

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 ports a set of “Literate cleanup” improvements from PowerFlows.jl into PowerGraphics.jl’s documentation build pipeline, mainly around tutorial generation/linking and doc-preview workflow behavior.

Changes:

  • Moves docs base-URL logic into docs/make_tutorials.jl and uses it to generate correct absolute tutorial download/view-online links across preview/dev/tagged/stable deployments.
  • Improves Literate tutorial generation utilities (DataFrame display bounding, safer APPEND_MARKDOWN(...) replacement, tutorial artifact cleanup, clearer comments).
  • Updates GitHub Actions docs workflow to set DOCUMENTER_CURRENT_VERSION, and restricts doc preview cleanup to non-fork PRs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
docs/make.jl Removes now-redundant _DOCS_BASE_URL constant (URL is computed in tutorial pipeline).
docs/make_tutorials.jl Adds docs URL computation, download link policy, and refactors/clarifies Literate postprocessing and cleanup utilities.
.github/workflows/docs.yml Adds a step to populate DOCUMENTER_CURRENT_VERSION for correct deployed tutorial links.
.github/workflows/doc-preview-cleanup.yml Skips preview cleanup for forked PRs (since it pushes to gh-pages).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/make_tutorials.jl
Comment on lines +25 to +29
maximum_number_of_columns = _DF_MAX_COLS,
show_omitted_cell_summary = true,
compact_printing = false,
limit_printing = true)
limit_printing = true,
kwargs...)
Comment thread docs/make_tutorials.jl
Comment on lines +35 to +40
maximum_number_of_rows = _DF_MAX_ROWS,
maximum_number_of_columns = _DF_MAX_COLS,
show_omitted_cell_summary = true,
compact_printing = false,
limit_printing = true)
limit_printing = true,
kwargs...)
Comment on lines +26 to +29
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "DOCUMENTER_CURRENT_VERSION=${GITHUB_REF_NAME}" >> "$GITHUB_ENV"
elif [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.ref }}" =~ ^refs/heads/release- ]]; then
echo "DOCUMENTER_CURRENT_VERSION=dev" >> "$GITHUB_ENV"
@kdayday kdayday merged commit 03f8208 into main May 5, 2026
8 of 9 checks passed
@kdayday kdayday deleted the kd/literate-clean branch May 5, 2026 20:46
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