Fix Documentation build broken by README port#22
Merged
Conversation
The `examples/README.jl` shipped in #21 split the runnable Julia into two bare-Julia code blocks (the imports and the index/`@visualize` setup) separated by prose. Literate's `DocumenterFlavor` turned each into its own `@example index` block in `docs/src/index.md`. State did not propagate across the two blocks on the Documentation CI runner, which left `Index` undefined when the second block ran. Also, `docs/Project.toml` was missing `ITensors` as a dependency, so even a single-block setup couldn't have resolved the import. - Consolidate the runnable Julia in `examples/README.jl` into one bare block so it lands as a single `@example index` block in `index.md`, removing the cross-block-state assumption entirely. Both `@visualize` calls now sit together in that block; the description prose was rearranged so the lead-in still flows naturally. - Add `ITensors` to `docs/Project.toml` deps + compat (matching the root `Project.toml` compat range) so `using ITensors: Index, random_itensor` resolves during the Documenter build. Verified locally: `docs/make.jl` now builds without errors, 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.jlinto two bare-Julia code blocks (imports, then setup +@visualizecalls) separated by prose. Literate'sDocumenterFlavorturned each into its own@example indexblock indocs/src/index.md. Inter-block state did not propagate on the Documentation CI runner, soIndexwas undefined when the second block ran. Independently,docs/Project.tomlwas missingITensorsas a dependency — so even a single-block setup couldn't have resolvedusing ITensors: Index, random_itensorduring the Documenter build.examples/README.jlinto one bare-Julia block so it lands as a single@example indexblock inindex.md. Both@visualizecalls now sit together; the surrounding prose was rearranged so the lead-in still flows.ITensorstodocs/Project.toml[deps]and[compat](matching the rootProject.tomlcompat range) so the Documenter build can resolve the import.Project.tomlpatch version 0.1.16 → 0.1.17.Verified locally:
docs/make.jlnow completes successfully, andinclude("examples/README.jl")from the test environment still runs the example through the no-op default backend.