Port README content into examples/README.jl#21
Merged
Conversation
The previous examples/README.jl was the bare ITensorPkgSkeleton template stub (added in 7a79fb5 to unblock the docs build), so every itpkgfmt run regenerated README.md as the empty stub, wiping the actual usage prose and `@visualize` examples that lived in README.md on main. Move the description, the UnicodePlots contraction example, the GLMakie backend example, and the backend-switching session into examples/README.jl as runnable Literate input. The contraction setup and both `@visualize` calls are now bare Julia so they execute via the shared ITensorPkgSkeleton.runtests examples sweep; the ASCII output, GLMakie window snippet, and `julia>` prompt blocks remain wrapped in `#= ... =#` so they pass through as raw markdown without trying to run. Image references switch to absolute raw.githubusercontent.com URLs so the same source renders correctly in both README.md and docs/src/index.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dropped accidentally in the previous commit; the template structure expects it before the usage prose. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mtfishman
added a commit
that referenced
this pull request
Apr 25, 2026
## Summary - The README port in #21 split the runnable Julia in `examples/README.jl` into two bare-Julia code blocks (imports, then setup + `@visualize` calls) separated by prose. Literate's `DocumenterFlavor` turned each into its own `@example index` block in `docs/src/index.md`. Inter-block state did not propagate on the Documentation CI runner, so `Index` was undefined when the second block ran. Independently, `docs/Project.toml` was missing `ITensors` as a dependency — so even a single-block setup couldn't have resolved `using ITensors: Index, random_itensor` during the Documenter build. - Consolidate the runnable Julia in `examples/README.jl` into one bare-Julia block so it lands as a single `@example index` block in `index.md`. Both `@visualize` calls now sit together; the surrounding prose was rearranged so the lead-in still flows. - Add `ITensors` to `docs/Project.toml` `[deps]` and `[compat]` (matching the root `Project.toml` compat range) so the Documenter build can resolve the import. - Bump `Project.toml` patch version 0.1.16 → 0.1.17. Verified locally: `docs/make.jl` now completes successfully, and `include("examples/README.jl")` from the test environment still runs the example through the no-op default backend. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/README.jlwas the bare ITensorPkgSkeleton template stub (added to unblock the docs build, sincemake_index!requires that input file). Everyitpkgfmtrun regeneratedREADME.mdfrom the stub, which was about to wipe the actual usage prose and@visualizeexamples that lived inREADME.mdon main — see Automatic ITensorFormatter run #18 for the regeneration that captured the deletion.examples/README.jlas Literate input. The contraction setup and both@visualizecalls are bare Julia so they execute as part of the sharedITensorPkgSkeleton.runtestsexamples sweep. Output blocks (ASCII art, GLMakie window snippet,julia>prompts) stay wrapped in#= ... =#so they pass through as raw markdown without trying to execute.raw.githubusercontent.comURLs so the same source renders correctly in bothREADME.mdanddocs/src/index.md.Closes #18.