Skip to content

[WIP] Literate examples #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ benchmark/*.json
docs/Manifest.toml
docs/build/
docs/src/index.md
docs/src/examples.md
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensorNetworks"
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7"
authors = ["Matthew Fishman <[email protected]>, Joseph Tindall <[email protected]> and contributors"]
version = "0.12.2"
version = "0.12.3"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
ITensorNetworks = "2919e153-833c-4bdc-8836-1ea460a35fc7"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"

[compat]
Documenter = "1.10.0"
Graphs = "1.12.1"
ITensorNetworks = "0.12.0"
Literate = "2.20.1"
11 changes: 9 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
using ITensorNetworks: ITensorNetworks
using Documenter: Documenter, DocMeta, deploydocs, makedocs
using ITensorNetworks: ITensorNetworks
using Literate: Literate

DocMeta.setdocmeta!(
ITensorNetworks, :DocTestSetup, :(using ITensorNetworks); recursive=true
)

include("make_index.jl")

Literate.markdown(
joinpath(@__DIR__, "src", "examples.jl"),
joinpath(@__DIR__, "src");
flavor=Literate.DocumenterFlavor(),
)

makedocs(;
modules=[ITensorNetworks],
authors="ITensor developers <[email protected]> and contributors",
Expand All @@ -16,7 +23,7 @@ makedocs(;
edit_link="main",
assets=["assets/favicon.ico", "assets/extras.css"],
),
pages=["Home" => "index.md", "Reference" => "reference.md"],
pages=["Home" => "index.md", "Examples" => "examples.md", "Reference" => "reference.md"],
warnonly=true,
)

Expand Down
5 changes: 5 additions & 0 deletions docs/src/examples.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# # Examples

using Graphs: path_graph
using ITensorNetworks: ITensorNetwork
tn = ITensorNetwork(path_graph(4); link_space=2)
Loading