diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..b0e4394 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,69 @@ +name: CI +on: + push: + branches: + - main + pull_request: + branches: + - main +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +permissions: + actions: write + contents: read +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - 'lts' + - '1' + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - name: Add Julia Registries + run: | + julia -e ' + using Pkg + Pkg.Registry.add( + RegistrySpec(url = "https://github.com/tensor4all/T4ARegistry.git") + )' + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v3 + + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + - name: Add Julia Registries + run: | + julia -e ' + using Pkg + Pkg.Registry.add( + RegistrySpec(url = "https://github.com/tensor4all/T4ARegistry.git") + )' + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + + diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml new file mode 100644 index 0000000..bbacdd1 --- /dev/null +++ b/.github/workflows/CompatHelper.yml @@ -0,0 +1,18 @@ +name: CompatHelper +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: +jobs: + CompatHelper: + runs-on: ubuntu-latest + steps: + - name: Pkg.add("CompatHelper") + run: julia -e 'using Pkg; Pkg.add("CompatHelper")' + - name: CompatHelper.main() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + run: julia -e 'using CompatHelper; CompatHelper.main()' + + diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..12917b5 --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,33 @@ +name: TagBot +on: + issue_comment: + types: + - created + workflow_dispatch: + inputs: + lookback: + default: "3" +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read +jobs: + TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} + + diff --git a/.gitignore b/.gitignore index bd54414..54c1515 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ docs/build/ # Local logs (do not commit) *.log +/docs/Manifest.toml +/docs/*.log +/docs_build.log diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..d214956 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,9 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +T4ATensorTrain = "ec6ec972-96ae-4a21-b859-3911b77e305f" + +[compat] +Documenter = "1" +julia = "1.10" + + diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..300ce63 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,20 @@ +using Pkg + +Pkg.activate(@__DIR__) +Pkg.develop(PackageSpec(path=joinpath(@__DIR__, ".."))) +Pkg.instantiate() + +using Documenter +using T4ATensorTrain + +makedocs( + modules=[T4ATensorTrain], + sitename="T4ATensorTrain.jl", +) + +deploydocs( + repo="github.com/tensor4all/T4ATensorTrain.jl.git", + devbranch="main", +) + + diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..a85d403 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,11 @@ +# T4ATensorTrain.jl + +Tensor Train core functionality for tensor4all. + +## API + +```@autodocs +Modules = [T4ATensorTrain] +``` + + diff --git a/src/tensortrain.jl b/src/tensortrain.jl index d9f2161..0075af4 100644 --- a/src/tensortrain.jl +++ b/src/tensortrain.jl @@ -57,7 +57,7 @@ end Convert a tensor-train-like object into a tensor train. -See also: [`TensorCI1`](@ref), [`TensorCI2`](@ref). +See also: `TensorCI1` and `TensorCI2` in `T4ATensorCI.jl`. """ function TensorTrain(tci::AbstractTensorTrain{V})::TensorTrain{V,3} where {V} return TensorTrain{V,3}(sitetensors(tci))