Skip to content

Commit 3a147cd

Browse files
authored
Merge branch 'main' into compathelper/new_version/2024-11-28-01-54-00-146-03490059899
2 parents 7545012 + 1d4f398 commit 3a147cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+826
-918
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Documentation"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: '*'
8+
pull_request:
9+
schedule:
10+
- cron: '1 4 * * 4'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }}
15+
16+
jobs:
17+
build-and-deploy-docs:
18+
name: "Documentation"
19+
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@main"
20+
with:
21+
localregistry: https://github.com/ITensor/ITensorRegistry.git
22+
secrets:
23+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/FormatCheck.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
1-
name: Format check
1+
name: "Format Check"
2+
23
on:
34
push:
4-
branches: [main]
5-
tags: [v*]
5+
branches:
6+
- 'main'
7+
tags: '*'
68
pull_request:
79

810
jobs:
9-
format:
11+
format-check:
1012
name: "Format Check"
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: julia-actions/setup-julia@v2
15-
with:
16-
version: 1
17-
- name: Install JuliaFormatter and format
18-
run: |
19-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
20-
julia -e 'using JuliaFormatter; format(".", verbose=true)'
21-
- name: Check format
22-
run: |
23-
julia -e '
24-
out = Cmd(`git diff --name-only`) |> read |> String
25-
if out == ""
26-
exit(0)
27-
else
28-
@error "The following files have not been formatted:"
29-
write(stdout, out)
30-
out_diff = Cmd(`git diff`) |> read |> String
31-
@error "Diff:"
32-
write(stdout, out_diff)
33-
exit(1)
34-
@error ""
35-
end'
13+
uses: "ITensor/ITensorActions/.github/workflows/FormatCheck.yml@main"
Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,15 @@
1-
name: Literate check
1+
name: "Literate Check"
2+
23
on:
34
push:
4-
branches: [main]
5-
tags: [v*]
5+
branches:
6+
- 'main'
7+
tags: '*'
68
pull_request:
79

810
jobs:
911
literate:
1012
name: "Literate Check"
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: julia-actions/setup-julia@v2
15-
with:
16-
version: 1
17-
- name: Install Literate and generate docs
18-
run: |
19-
julia -e '
20-
using Pkg
21-
# TODO: Delete these once they are registered.
22-
Pkg.add(url="https://github.com/ITensor/TypeParameterAccessors.jl")
23-
Pkg.add(url="https://github.com/ITensor/BroadcastMapConversion.jl")
24-
Pkg.add(url="https://github.com/ITensor/NestedPermutedDimsArrays.jl")
25-
Pkg.add(url="https://github.com/ITensor/LabelledNumbers.jl")
26-
Pkg.add(url="https://github.com/ITensor/GradedUnitRanges.jl")
27-
Pkg.add(url="https://github.com/ITensor/SparseArraysBase.jl")
28-
Pkg.add(url="https://github.com/ITensor/TensorAlgebra.jl")
29-
Pkg.develop(PackageSpec(path=pwd()))
30-
Pkg.instantiate()
31-
Pkg.add(PackageSpec(name="Literate"))'
32-
julia -e 'include("docs/make_readme.jl")'
33-
- name: Check if docs need to be updated
34-
run: |
35-
julia -e '
36-
out = Cmd(`git diff --name-only`) |> read |> String
37-
if out == ""
38-
exit(0)
39-
else
40-
@error "The docs are outdated, rerun Literate to regenerate them."
41-
write(stdout, out)
42-
out_diff = Cmd(`git diff`) |> read |> String
43-
@error "Diff:"
44-
write(stdout, out_diff)
45-
exit(1)
46-
@error ""
47-
end'
13+
uses: "ITensor/ITensorActions/.github/workflows/LiterateCheck.yml@main"
14+
with:
15+
localregistry: https://github.com/ITensor/ITensorRegistry.git

.github/workflows/Tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
- 'main'
7+
- 'release-'
8+
tags: '*'
9+
paths-ignore:
10+
- 'docs/**'
11+
pull_request:
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
# Cancel intermediate builds: only if it is a pull request build.
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
tests:
21+
name: "Tests"
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version:
26+
- 'lts' # minimal supported version
27+
- '1' # latest released Julia version
28+
# group:
29+
# - 'core'
30+
# - 'optional'
31+
os:
32+
- ubuntu-latest
33+
- macOS-latest
34+
- windows-latest
35+
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@main"
36+
with:
37+
group: "${{ matrix.group }}"
38+
julia-version: "${{ matrix.version }}"
39+
os: "${{ matrix.os }}"
40+
localregistry: https://github.com/ITensor/ITensorRegistry.git
41+
secrets:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repos:
77
- id: check-yaml
88
- id: end-of-file-fixer
99
exclude_types: [markdown] # incompatible with Literate.jl
10-
- repo: https://github.com/qiaojunfeng/pre-commit-julia-format
11-
rev: v0.2.0
10+
11+
- repo: "https://github.com/domluna/JuliaFormatter.jl"
12+
rev: v1.0.62
1213
hooks:
13-
- id: julia-format
14+
- id: "julia-formatter"

Project.toml

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,53 @@
11
name = "BlockSparseArrays"
22
uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.1.0"
4+
version = "0.2.3"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
88
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
99
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
10-
BroadcastMapConversion = "4a4adec5-520f-4750-bb37-d5e66b4ddeb2"
10+
DerivableInterfaces = "6c5e35bf-e59e-4898-b73c-732dcc4ba65f"
1111
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
12-
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
1312
GradedUnitRanges = "e2de450a-8a67-46c7-b59c-01d5a3d041c5"
14-
LabelledNumbers = "f856a3a6-4152-4ec4-b2a7-02c1a55d7993"
1513
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1614
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
17-
NestedPermutedDimsArrays = "2c2a8ec4-3cfc-4276-aa3e-1307b4294e58"
15+
MapBroadcast = "ebd9b9da-f48d-417c-9660-449667d60261"
1816
SparseArraysBase = "0d5efcca-f356-4864-8770-e1ed8d78f208"
1917
SplitApplyCombine = "03a91e81-4c3e-53e1-a0a4-9c0c8f19dd66"
20-
TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a"
2118
TypeParameterAccessors = "7e5a90cf-f82e-492e-a09b-e3e26432c138"
2219

23-
[sources.BroadcastMapConversion]
24-
url = "https://github.com/ITensor/BroadcastMapConversion.jl"
25-
26-
[sources.GradedUnitRanges]
27-
url = "https://github.com/ITensor/GradedUnitRanges.jl"
28-
29-
[sources.LabelledNumbers]
30-
url = "https://github.com/ITensor/LabelledNumbers.jl"
31-
32-
[sources.NestedPermutedDimsArrays]
33-
url = "https://github.com/ITensor/NestedPermutedDimsArrays.jl"
34-
35-
[sources.SparseArraysBase]
36-
url = "https://github.com/ITensor/SparseArraysBase.jl"
37-
38-
[sources.TensorAlgebra]
39-
url = "https://github.com/ITensor/TensorAlgebra.jl"
20+
[weakdeps]
21+
LabelledNumbers = "f856a3a6-4152-4ec4-b2a7-02c1a55d7993"
22+
TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a"
4023

41-
[sources.TypeParameterAccessors]
42-
url = "https://github.com/ITensor/TypeParameterAccessors.jl"
24+
[extensions]
25+
BlockSparseArraysAdaptExt = "Adapt"
26+
BlockSparseArraysTensorAlgebraExt = ["LabelledNumbers", "TensorAlgebra"]
4327

4428
[compat]
4529
Adapt = "4.1.1"
4630
Aqua = "0.8.9"
4731
ArrayLayouts = "1.10.4"
4832
BlockArrays = "1.2.0"
33+
DerivableInterfaces = "0.3.7"
4934
Dictionaries = "0.4.3"
5035
GPUArraysCore = "0.1.0, 0.2"
36+
GradedUnitRanges = "0.1.0"
37+
LabelledNumbers = "0.1.0"
5138
LinearAlgebra = "1.10"
5239
MacroTools = "0.5.13"
40+
MapBroadcast = "0.1.5"
41+
SparseArraysBase = "0.2.2"
5342
SplitApplyCombine = "1.2.3"
43+
TensorAlgebra = "0.1.0"
5444
Test = "1.10"
45+
TypeParameterAccessors = "0.2.0"
5546
julia = "1.10"
5647

5748
[extras]
5849
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
50+
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
5951
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6052

6153
[targets]

0 commit comments

Comments
 (0)