Skip to content
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/DocumentationCleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Doc Preview Cleanup

on:
pull_request:
types: [closed]

# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
concurrency:
group: doc-preview-cleanup
cancel-in-progress: false

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
if [ -d "${preview_dir}" ]; then
git config user.name "Documenter.jl"
git config user.email "documenter@juliadocs.github.io"
git rm -rf "${preview_dir}"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
env:
preview_dir: previews/PR${{ github.event.number }}
17 changes: 17 additions & 0 deletions .github/workflows/DocumentationPreview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Docs preview comment
on:
pull_request:
types: [labeled]

permissions:
pull-requests: write
jobs:
pr_comment:
runs-on: ubuntu-latest
steps:
- name: Create PR comment
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name && github.event.label.name == 'documentation'
uses: thollander/actions-comment-pull-request@v3
with:
message: 'After the build completes, the updated documentation will be available [here](https://quantumkithub.github.io/TensorKitTensors.jl/previews/PR${{ github.event.number }}/)'
comment-tag: 'preview-doc'
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@

This is a small package that aims to provide several commonly used tensors for TensorKit, with various symmetries.
For a full list of implemented tensors, see the [documentation](https://QuantumKitHub.github.io/TensorKitTensors.jl/stable/).
If there are any tensors you would like to see added, feel free to open an issue or a pull request.

## Installation

Installation is done via the Julia package manager.
You can install it by running the following command in the Julia REPL:

```julia
julia> import Pkg
julia> Pkg.add("https://github.com/QuantumKitHub/TensorKitTensors.jl")
julia> ]
pkg> add TensorKitTensors
```
8 changes: 6 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ using Documenter
DocMeta.setdocmeta!(TensorKitTensors, :DocTestSetup, :(using TensorKitTensors);
recursive=true)

operatorpages = ["spinoperators.md", "bosonoperators.md", "fermionoperators.md",
"tjoperators.md", "hubbardoperators.md"]
makedocs(;
modules=[TensorKitTensors],
authors="QuantumKitHub",
Expand All @@ -12,6 +14,8 @@ makedocs(;
canonical="https://QuantumKitHub.github.io/TensorKitTensors.jl",
edit_link="main",
assets=String[],),
pages=["Home" => "index.md"],)
pages=["Home" => "index.md", "Operators" => operatorpages],)

deploydocs(; repo="github.com/QuantumKitHub/TensorKitTensors.jl", devbranch="main")
deploydocs(; repo="github.com/QuantumKitHub/TensorKitTensors.jl",
devbranch="main",
push_preview=true)
9 changes: 9 additions & 0 deletions docs/src/bosonoperators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```@meta
CollapsedDocStrings = true
```

# Boson operators

```@autodocs
Modules = [TensorKitTensors.BosonOperators]
```
9 changes: 9 additions & 0 deletions docs/src/fermionoperators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```@meta
CollapsedDocStrings = true
```

# Fermion operators

```@autodocs
Modules = [TensorKitTensors.FermionOperators]
```
9 changes: 9 additions & 0 deletions docs/src/hubbardoperators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```@meta
CollapsedDocStrings = true
```

# Hubbard operators

```@autodocs
Modules = [TensorKitTensors.HubbardOperators]
```
8 changes: 3 additions & 5 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ CurrentModule = TensorKitTensors
# TensorKitTensors

Documentation for [TensorKitTensors](https://github.com/QuantumKitHub/TensorKitTensors.jl).
This is a lightweight package that defines several commonly used tensors for TensorKit, with various symmetries.

```@index
```

```@autodocs
Modules = [TensorKitTensors, TensorKitTensors.SpinOperators, TensorKitTensors.BosonOperators, TensorKitTensors.HubbardOperators, TensorKitTensors.TJOperators, TensorKitTensors.FermionOperators]
```@contents
Pages = Main.operatorpages
```
9 changes: 9 additions & 0 deletions docs/src/spinoperators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```@meta
CollapsedDocStrings = true
```

# Spin operators

```@autodocs
Modules = [TensorKitTensors.SpinOperators]
```
9 changes: 9 additions & 0 deletions docs/src/tjoperators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```@meta
CollapsedDocStrings = true
```

# TJ operators

```@autodocs
Modules = [TensorKitTensors.TJOperators]
```